Python Numpy matrix.std()
在matrix.std()方法的帮助下,我们能够用同样的方法找到矩阵的标准偏差。
语法: matrix.std()
返回:返回一个矩阵的标准偏差
例子#1 :
在这个例子中,我们能够通过使用matrix.std()方法找到矩阵的标准偏差。
# import the important module in python
import numpy as np
# make matrix with numpy
gfg = np.matrix('[4, 1; 12, 3]')
# applying matrix.std() method
geek = gfg.std()
print(geek)
输出:
4.18330013267
例子#2 :
# import the important module in python
import numpy as np
# make matrix with numpy
gfg = np.matrix('[4, 1, 9; 12, 3, 1; 4, 5, 6]')
# applying matrix.std() method
geek = gfg.std()
print(geek)
输出:
3.3993463424