====================================================================== 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. Chris -- Christopher Hanley Senior Systems Software Engineer Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21218 (410) 338-4338
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. Chuck
Charles R Harris wrote:
On Tue, Mar 10, 2009 at 8:57 AM, Christopher Hanley <chanley@stsci.edu <mailto: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
This is not a regression at least (I have just tested on 1.2.1). There is still a lot of work we can do to make this better - but this will have to wait for 1.4 I believe, because those are really hard to get right (they depend on both C runtimes and python versions). I will look at the mac thing, I wonder why it only appear on this OS, though, cheers, David
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
participants (3)
-
Charles R Harris
-
Christopher Hanley
-
David Cournapeau