首页 > 其他 > 详细

import numpy as np

时间:2021-08-29 20:42:38      阅读:17      评论:0      收藏:0      [点我收藏+]
funciton interpretation
np.array()
np.arange(start, end, step)
np.linspace(start, end, count) from start to end, equal margin
np.copy()
np.hstack(tuple) Stack arrays in sequence horizontally (column wise)
np.vstack(tuple) Stack arrays in sequence vertically (row wise)
numpy.random.rand(d0,d1,d2,...,dN) d is dimention,float values betweent 0 and 1
numpy.zeros(shape, dtype=float, order=‘C‘) order = ‘C‘ is row-major, F is column-major storage in memory
numpy.nditer() iterator for array
np.dot() dot product
np.cross() cross product
np.max() get maximum value from tensor
np.amax(arr, axis) get maximum value from given axis
np.sum(arr, axis) sum of all elements if using default axis
np.average(arr, axis,weights) average of all elements if using default axis
np.mean(arr, axis) equal to np.average while weights is 1
np.std() standard deviation
np.tolist()

import numpy as np

原文:https://www.cnblogs.com/ashyLoveLoli/p/15194287.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!