How to find standard deviation in Python using NumPy

You can find the standard deviation in Python using NumPy with the following code. If you want to learn Python then I will highly recommend you to read This Book.

How to find standard deviation in Python using NumPy
How to find standard deviation in Python using NumPy

Standard Deviation

import numpy as np
a = [1,2,3,4,5,6]
x = np.std(a)
print(x)

Standard Deviation of 1D NumPy Array

import numpy as np
b = np.array([1,2,3,4,5,6])
y = np.std(b)
print(y)

Standard Deviation of 2D NumPy Array

import numpy as np
c = np.array([[1,2,3],[4,5,6]])
z = np.std(c)
print(z)

People are also reading:

Best Python Books

What is Computer Vision? Examples, Applications, Techniques

Top 10 Computer Vision Books with Python

Books for Machine Learning (ML)

Free Learning Resources

Leave a Comment

Your email address will not be published.