[NumPy-Tickets] [NumPy] #1825: assert_array_less behavior with inf/nan
NumPy Trac
numpy-tickets@scipy....
Tue Aug 9 12:28:45 CDT 2011
#1825: assert_array_less behavior with inf/nan
---------------------------+------------------------------------------------
Reporter: rgommers | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.testing | Version: devel
Keywords: |
---------------------------+------------------------------------------------
Comment(by warren.weckesser):
Adding to Ralf's description: the second of the two examples that
previously passed comes from a test in scipy that is now failing:
{{{
======================================================================
FAIL: test_expon (test_morestats.TestAnderson)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/warren/local_scipy/lib/python2.7/site-
packages/scipy/stats/tests/test_morestats.py", line 72, in test_expon
assert_array_less(crit[:-1], A)
File "/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7
/site-packages/numpy/testing/utils.py", line 869, in assert_array_less
header='Arrays are not less-ordered')
File "/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7
/site-packages/numpy/testing/utils.py", line 613, in assert_array_compare
chk_same_position(x_id, y_id, hasval='inf')
File "/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7
/site-packages/numpy/testing/utils.py", line 588, in chk_same_position
raise AssertionError(msg)
AssertionError:
Arrays are not less-ordered
x and y inf location mismatch:
x: array([ 0.911, 1.065, 1.325, 1.587])
y: array(inf)
----------------------------------------------------------------------
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1825#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list