[SciPy-user] longfloat in numpy
Travis Oliphant
oliphant.travis at ieee.org
Wed May 10 14:49:34 EDT 2006
Sergey Dolgov wrote:
> Hi,
>
> I,m getting this type of behaviour with numpy 0.9.6:
>
>
> In [12]: import numpy
>
> In [13]: print numpy.exp( numpy.longfloat(1000))
> 1.97007111401704699387e+434
>
> In [14]: print numpy.exp( numpy.array([1000], dtype=numpy.longfloat))
> [ inf]
>
> In [15]: print numpy.version.version
> 0.9.6
>
>
> i.e. seems like longfloat "doesn't work" inside array.
>
It does work, the error occurs only in the printing. Apparently the
printing is trying to convert it to a float (which gives the inf) --- I
suspect the right special-casing is not being applied in the printing
code.
You should file a ticket on the NumPy Trac pages.
-Travis
More information about the SciPy-User
mailing list