[documentation] adding docstring to all the methods.

This commit is contained in:
sebastianp
2016-08-11 16:13:53 +02:00
parent c72ed1e169
commit 36e7bc1bb2
3 changed files with 137 additions and 21 deletions

View File

@@ -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)

View File

@@ -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