13 - Var method over arrays in python
Var - method over arrays in python
==============================
Var method over arrays in python returns the variance
of all elements in the array
example
import numpy as np
arr = np.array([1,2,3,4,5,6])
print("Original Array:", arr)
print("Variance value:", var(arr))
output
Original Array: [1 2 3 4 5
6]
Variance value: 2.9166666666666665
No comments:
Post a Comment