One - One Code All

Blog Content

numpy求平方,平方根,乘方

Python 统计学-科学计算   2011-12-06 21:18:59

计算乘方:

pow(4,3)
Out[16]: 64

计算平方

np.square(4)
Out[18]: 16


计算开方

np.sqrt(16)
Out[19]: 4.0



上一篇:python乘方幂运算之numpy.power()数组元素求n次方
下一篇:python中numpy数组转置

The minute you think of giving up, think of the reason why you held on so long.