np array describe

Solutions on MaxInterview for np array describe by the best coders in the world

showing results for - "np array describe"
Tyler
28 Feb 2017
1>>> from scipy import stats
2>>> a = np.arange(10)
3>>> stats.describe(a)
4DescribeResult(nobs=10, minmax=(0, 9), mean=4.5, variance=9.166666666666666,
5               skewness=0.0, kurtosis=-1.2242424242424244)
6>>> b = [[1, 2], [3, 4]]
7>>> stats.describe(b)
8DescribeResult(nobs=2, minmax=(array([1, 2]), array([3, 4])),
9               mean=array([2., 3.]), variance=array([2., 2.]),
10               skewness=array([0., 0.]), kurtosis=array([-2., -2.]))
11