bundles / numpy 2.4.4 / numpy / matrixlib / defmatrix / matrix / std
function
numpy.matrixlib.defmatrix:matrix.std
Signature
def std(self, axis = None, dtype = None, out = None, ddof = 0)Summary
Return the standard deviation of the array elements along the given axis.
Extended Summary
Refer to numpy.std for full documentation.
Notes
This is the same as ndarray.std, except that where an ndarray would be returned, a matrix object is returned instead.
Examples
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() x.std(0) x.std(1)✗
matrix([[1.118],
[1.118],
[1.118]])
See also
Aliases
numpy.matrix.std