Python | Numpy matrix.std ()



With the matrix.std() method we can find the standard deviation of a matrix using the same method.

Syntax: matrix.std ()
Return: Return standard deviation of a matrix

Example # 1:
In this example, we can find the standard deviation of a matrix using matrix.std () .

# import important module in python

import numpy as np

 
# make a matrix with NumPy

gfg = np.matrix ( `[ 4, 1; 12, 3] ` )

  
# applying the matrix.std () method

geek = gfg.std ()

 

print (geek)

Exit:

 4.18330013267 

Example # 2:

# import important module in python

import numpy as np

 
# make a matrix with NumPy

gfg = np.matrix ( `[4, 1, 9; 12, 3, 1; 4, 5, 6] ` )

  
# applying the matrix.std () method

geek = gfg.std ()

 

print (geek)

Exit :

 3.3993463424