@@ -27,23 +27,24 @@ def fit(cls, sample, axis):
2727
2828 @abc .abstractmethod
2929 def cdf (self , x ):
30- """Evaluate the continuous distribution function."""
30+ """Evaluate the cumulative distribution function (CDF) ."""
3131
3232 @abc .abstractmethod
3333 def ppf (self , x ):
34- """Evaluate the inverse CDF ( percent point function)."""
34+ """Evaluate the percent point function (PPF; inverse CDF )."""
3535
3636
3737# Temporary drop-in replacement for scipy.stats.lmoment from scipy v0.15
3838def _lmoment (sample , order = (1 , 2 ), axis = 0 ):
39- """Compute first 2 L-moments of dataset along first axis."""
39+ """Compute first 2 L-moments of a dataset along the first axis."""
4040 if len (order ) != 2 or order [0 ] != 1 or order [1 ] != 2 :
4141 raise NotImplementedError
4242 if axis != 0 :
4343 raise NotImplementedError
4444
4545 nmoments = 3
4646
47+ sample = np .asarray (sample )
4748 # At least four values needed to make a sample L-moments estimation
4849 nvalues , * rest_shape = sample .shape
4950 if nvalues < 4 :
@@ -137,7 +138,7 @@ def ndim(self):
137138 return self .mu .ndim
138139
139140 def cdf (self , x ):
140- """Evaluate the cumulative distribution function.
141+ """Evaluate the cumulative distribution function (CDF) .
141142
142143 Parameters
143144 ----------
@@ -154,7 +155,7 @@ def cdf(self, x):
154155 return 1.0 - np .exp (- np .exp ((self .mu - x ) / self .sigma ))
155156
156157 def ppf (self , p ):
157- """Evaluate the inverse cumulative distribution function.
158+ """Evaluate the percent point function (PPF; inverse CDF) .
158159
159160 Parameters
160161 ----------
0 commit comments