Ticket #654 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Numpy tests failure on solaris

Reported by: yippi Owned by: cdavid
Priority: normal Milestone: 1.1.0
Component: Other Version: none
Keywords: Cc:

Description

I find that numpy has test programs in this directory:

/usr/lib/python2.4/vendor-packages/numpy/core/tests

Two tests seem to have failures. test_scalarmath.py and test_numeric.py. The other tests seem to pass okay. I am running on Solaris Nevada x86. Are you seeing these errors on other platforms?

I see the following output with the two failed tests.

% python test_scalarmath.py

Found 6/6 tests for main

.F.... ====================================================================== FAIL: check_large_types (main.TestPower?)


Traceback (most recent call last):

File "test_scalarmath.py", line 52, in check_large_types

assert b == 6765201, "error with %r: got %r" % (t,b)

AssertionError?: error with <type 'numpy.float96'>: got 6765201.00000000000364


Ran 6 tests in 0.078s

FAILED (failures=1)

$ python test_numeric.py

Found 62/62 tests for main

.......................................................................Warning: invalid value encountered in absolute Warning: invalid value encountered in absolute Warning: invalid value encountered in less_equal .....


Ran 76 tests in 0.124s

OK

Attachments

fix_missing_ctypes_test.patch (0.8 KB) - added by cdavid 2 years ago.
Patch to fix test failure when ctypes is not available

Change History

Changed 3 years ago by nils

I cannot confirm the failures here (32 bit, Linux SuSe? 9,3)

>>> import numpy
>>> numpy.__version__
'1.0.5.dev4766'
/usr/bin/python svn/numpy/numpy/core/tests/test_scalarmath.py
  Found 6/6 tests for __main__
......
----------------------------------------------------------------------
Ran 6 tests in 0.037s

OK
/usr/bin/python svn/numpy/numpy/core/tests/test_numeric.py
  Found 62/62 tests for __main__
..............................................................
----------------------------------------------------------------------
Ran 62 tests in 0.031s

OK

Changed 3 years ago by charris

This may be a compiler problem with extended double support. Where did your Numpy come from and what compiler was used to make it?

Changed 2 years ago by cdavid

  • owner changed from somebody to cdavid
  • summary changed from problems with numpy tests to Numpy tests failure on solaris

Changed 2 years ago by cdavid

  • status changed from new to assigned

On solaris indiana, beta2, I see one failure and one error, when used with sunstudio compilers.

The error is due to missing ctypes, which is normal since there is no ctypes available by default on python 2.4. There should not be any error, though, but a simple message. Is there a mechanism to say something like "skipping this test", or just printing the message is enough ?

The failure does not make sense to me: using == with float is bound to cause problems, no ? So this is not so much a problem with solaris, but a problem with the test itself (is assert_array_almost_equal enough ? Or should the test be stronger ?)

Changed 2 years ago by cdavid

Patch to fix test failure when ctypes is not available

Changed 2 years ago by cdavid

  • status changed from assigned to closed
  • resolution set to fixed

The error about missing ctypes is fixed in r4937. I close this ticket, and open a new one for the other error.

Note: See TracTickets for help on using tickets.