[documentation] adding docstring to all the methods.
This commit is contained in:
@@ -363,13 +363,15 @@ class ProbabilityDensityFunction(object):
|
||||
return m
|
||||
|
||||
def quantile_distance(self, prob_value):
|
||||
if 0 >= prob_value or prob_value >= 0.5:
|
||||
raise ValueError('Value out of range.')
|
||||
ql = self.quantile(prob_value)
|
||||
qu = self.quantile(1 - prob_value)
|
||||
return qu - ql
|
||||
|
||||
|
||||
def qtile_dist_quot(self,x):
|
||||
if x <= 0 or x >= 0.5:
|
||||
if x <= 0 or x >= 0.25:
|
||||
raise ValueError('Value out of range.')
|
||||
return self.quantile_distance(0.5-x)/self.quantile_distance(x)
|
||||
|
||||
|
||||
@@ -223,10 +223,10 @@ def getPatternLine(fn, pattern):
|
||||
|
||||
def isSorted(iterable):
|
||||
'''
|
||||
|
||||
:param iterable:
|
||||
:type iterable:
|
||||
:return:
|
||||
Takes an iterable and checks if args* are in order.
|
||||
:param iterable: any with defined __ls__() and __gs__()
|
||||
:type iterable: list
|
||||
:return: Boolean
|
||||
'''
|
||||
return sorted(iterable) == iterable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user