Open In App

Python | Numpy matrix.std()

Improve
Improve
Like Article
Like
Save
Share
Report

With the help of matrix.std() method, we are able to find the standard deviation a matrix by using the same method.

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

Example #1 :
In this example we are able to find the standard deviation of a matrix by using matrix.std() method.




# 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)


Output:

4.18330013267

Example #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)


Output:

3.3993463424

Last Updated : 20 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads