In [1]:
%matplotlib inline
In [2]:
import scipy.stats as stats
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
In [5]:
a = np.load('/home/taylorm/mcli/DJF/96z_mslp_meanPa.npy')
In [6]:
a.shape
Out[6]:
In [7]:
a = np.delete(a,[3300,3301],axis=0)
In [15]:
bench = a[:,18,55]
newarr=np.zeros(1)
for x in range (0,3305):
if bench[x] <100000:
if x == 0:
mean = np.expand_dims(bench[x],axis=0)
newarr=mean
else:
newarr = np.append(newarr,np.expand_dims(bench[x],axis=0),axis=0)
newarr=np.delete(newarr,[0],axis=0)
In [16]:
shape,loc,scale=stats.genextreme.fit(newarr)
In [17]:
print shape, loc, scale
In [18]:
sns.distplot(newarr)
Out[18]:
In [ ]: