Am I using the wrong syntax for the binom.ppf command, or is there a bug?

>>> stats.binom.ppf(.975,100,.5)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib64/python2.4/site-packages/scipy/stats/distributions.py", line
3590, in ppf
    insert(output,cond,self._ppf(*goodargs) + loc)
  File "/usr/lib64/python2.4/site-packages/numpy/lib/function_base.py", line
501, in insert
    return _insert(arr, mask, vals)
TypeError: array cannot be safely cast to required type
>>>
-----------------
The info pages for binom.ppf state that:
binom.ppf(q,n,pr,loc=0)
        - percent point function (inverse of cdf --- percentiles)
So I would expect binom.ppf to take three variables.

I expected the function to return a number, such as is done in matlab:
N = 100
alpha = 0.05
p1 = 0.30
cutoff = binoinv(1-alpha, N, p1)

cutoff =

    38
Any suggestions?  


JJ




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to