[Numpy-discussion] new numpy error in 1.3.0.dev6618
Charles R Harris
charlesr.harris@gmail....
Wed Mar 11 00:59:04 CDT 2009
On Tue, Mar 10, 2009 at 11:45 PM, Charles R Harris <
charlesr.harris@gmail.com> wrote:
>
>
> On Tue, Mar 10, 2009 at 8:57 AM, Christopher Hanley <chanley@stsci.edu>wrote:
>
>> ======================================================================
>> ERROR: test_float_repr (test_scalarmath.TestRepr)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File
>>
>> "/Users/chanley/dev/site-packages/lib/python/numpy/core/tests/test_scalarmath.py",
>> line 101, in test_float_repr
>> val2 = t(eval(val_repr))
>> File "<string>", line 1, in <module>
>> NameError: name 'nan' is not defined
>>
>> ----------------------------------------------------------------------
>> Ran 2018 tests in 10.311s
>>
>> FAILED (KNOWNFAIL=1, SKIP=1, errors=1)
>> <nose.result.TextTestResult run=2018 errors=1 failures=0>
>> >>> numpy.__version__
>> '1.3.0.dev6618'
>> >>>
>>
>>
>> This was run on a Intel Mac running OS X 10.5.6.
>>
>
> There are other problems:
>
> >>> np.float64(-0.0)
> -0.0
> >>> np.float128(-0.0)
> -0
> >>> np.float32(-0.0)
> -0
>
> I suppose this is a side effect of float64 being derived from python float.
>
> Now that we have endian (and we should expose it to python somewhere, maybe
> in info/finfo) it should be possible to simplify the test using honest ieee
> for various extreme values. I suppose we will also need to distinguish
> between quad precision (SPARC) and extended precision somewhere. Numpy can't
> do that at the moment. However, it can be detected at runtime or we could
> use some architecture specific macros.
>
I also wonder if this is related to ticket #1038. That's on SPARC and ppc,
but I suspect problems in finfo for longdoubles. If you print out the values
that cause this error, one of them doesn't look right to me even on linux.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090310/b2865cb5/attachment.html
More information about the Numpy-discussion
mailing list