-
matrix.std(axis=None, dtype=None, out=None, ddof=0)
[source] -
Return the standard deviation of the array elements along the given axis.
Refer to
numpy.std
for full documentation.See also
Notes
This is the same as
ndarray.std
, except that where anndarray
would be returned, amatrix
object is returned instead.Examples
12345678910111213>>> x
=
np.matrix(np.arange(
12
).reshape((
3
,
4
)))
>>> x
matrix([[
0
,
1
,
2
,
3
],
[
4
,
5
,
6
,
7
],
[
8
,
9
,
10
,
11
]])
>>> x.std()
3.4520525295346629
>>> x.std(
0
)
matrix([[
3.26598632
,
3.26598632
,
3.26598632
,
3.26598632
]])
>>> x.std(
1
)
matrix([[
1.11803399
],
[
1.11803399
],
[
1.11803399
]])
matrix.std()

2025-01-10 15:47:30
Please login to continue.