python怎么将numpy类转为string类

python怎么将numpy类转为string类


HUH函数
浏览 7543回答 2
2回答

饮歌长啸

# -*- coding:utf-8 -*-import numpy as npmystr = "100110"print np.array(list(mystr)print np.array(list(mystr)).tostring()

慕桂英4014372

1234567Python 3.6.1 (default, Mar 22 2017, 06:17:05) [GCC 6.3.0 20170321] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import numpy as np>>> a = np.arange(10)>>> str(a)'[0 1 2 3 4 5 6 7 8 9]' 
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python