[SciPy-user] Pb with scipy.stats

LB berthe.loic@gmail....
Sun Nov 18 13:08:52 CST 2007


Hi,
I've got some problem with some of the continuous distributions
defined in scipy.stats :

>>> from scipy import stats, __version__
>>> __version__
'0.7.0.dev3440'
>>> beta = stats.betaprime(5., 5.)
>>> beta.pdf( 0.5 )
array(0.68282274043590918)
>>> beta.cdf( 0.5>>> from scipy import stats, __version__
>>> __version__
'0.7.0.dev3440'
>>> beta = stats.betaprime(5., 5.)
>>> beta.pdf( 0.5 )
array(0.68282274043590918)
>>> beta.cdf( 0.5 )
array(0.14484580602550423)

So, PDF and CDF methods work, but not PPF :

>>> beta.ppf( 0.5 )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/loic/tmp/pycvs/lib/python2.6/site-packages/scipy/stats/
distributions.py", line 112, in ppf
    return self.dist.ppf(q,*self.args,**self.kwds)
  File "/home/loic/tmp/pycvs/lib/python2.6/site-packages/scipy/stats/
distributions.py", line 563, in ppf
    place(output,cond,self._ppf(*goodargs)*scale + loc)
  File "/home/loic/tmp/pycvs/lib/python2.6/site-packages/scipy/stats/
distributions.py", line 382, in _ppf
    return self.vecfunc(q,*args)
  File "/home/loic/tmp/pycvs/lib/python2.6/site-packages/numpy/lib/
function_base.py", line 949, in __call__
    raise ValueError, "mismatch between python function inputs"\
ValueError: mismatch between python function inputs and received
arguments


It seems the same problem appears with at least foldcauchy, foldnorm
and  genexpon

Is there any way to avoid this ?

--
LB


More information about the SciPy-user mailing list