[SciPy-User] norm.logpdf fails with float128?

Jacob Biesinger jake.biesinger@gmail....
Thu Jan 31 22:55:32 CST 2013


Hi!

I know float128 support is a bit sketchy.  I've noticed the norm.pdf and
norm.logpdf functions both choke when given float128 values.  The weird
thing is the corresponding norm._pdf and norm._logpdf functions seem to
work fine:

# pdf function fails
>>> m = sp.ones(5, dtype=sp.longdouble)
>>> norm.pdf(m)
...
TypeError: array cannot be safely cast to required type

>>> norm.pdf(m, dtype=sp.longdouble)
...
TypeError: array cannot be safely cast to required type


# but the _pdf function works fine, with appropriate long-double-precision
>>> norm._pdf(m*100)
array([ 1.3443135e-2172,  1.3443135e-2172,  1.3443135e-2172,
        1.3443135e-2172,  1.3443135e-2172], dtype=float128)

Is this expected behaviour? Perhaps a problem with the `place` command? If
it's not expected, I'm happy to tinker and submit a pull request.

--
Jake Biesinger
Graduate Student
Xie Lab, UC Irvine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130131/d9792d19/attachment.html 


More information about the SciPy-User mailing list