2018-12-04
阅读量:
880
数组转换的函数有哪些
ndarray.item(*参数)将数组元素复制到标准Python标量并返回它。
ndarray.tolist()将数组作为(可能是嵌套的)列表返回。
ndarray.itemset(*参数)将标量插入数组(如果可能,将标量转换为数组的dtype)
ndarray.tostring([订购])构造包含数组中原始数据字节的Python字节。
ndarray.tobytes([订购])构造包含数组中原始数据字节的Python字节。
ndarray.tofile(fid [,sep,format])将数组作为文本或二进制写入文件(默认)。
ndarray.dump(文件)将数组的pickle转储到指定的文件。
ndarray.dumps()以字符串形式返回数组的pickle。
ndarray.astype(dtype [,order,cast,...])数组的副本,强制转换为指定的类型。
ndarray.byteswap([到位])交换数组元素的字节
ndarray.copy([订购])返回数组的副本。
ndarray.view([dtype,type])具有相同数据的数组的新视图。
ndarray.getfield(dtype [,offset])返回给定数组的字段作为特定类型。
ndarray.setflags([写,对齐,uic])分别设置数组标志WRITEABLE,ALIGNED,(WRITEBACKIFCOPY和UPDATEIFCOPY)。
ndarray.fill(值)使用标量值填充数组。
0.0000
0
2
关注作者
收藏
评论(0)
发表评论
暂无数据
推荐帖子
0条评论
0条评论
0条评论

