[Numpy-tickets] [NumPy] #745: assert_almost_equal fails for object arrays.

NumPy numpy-tickets@scipy....
Sat Apr 19 16:58:24 CDT 2008


#745: assert_almost_equal fails for object arrays.
---------------------------+------------------------------------------------
 Reporter:  charris        |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  1.1.0   
Component:  numpy.testing  |     Version:  none    
 Severity:  normal         |    Keywords:          
---------------------------+------------------------------------------------
 This traceback refers to a test function that isn't yet committed.

 {{{
 ERROR: Test generic loops.
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib/python2.5/site-packages/numpy/core/tests/test_ufunc.py",
 line 120, in check_generic_loops
     assert_almost_equal(np.abs(x), 1, err_msg=msg)
   File "/usr/lib/python2.5/site-packages/numpy/testing/utils.py", line
 156, in assert_almost_equal
     return assert_array_almost_equal(actual, desired, decimal, err_msg)
   File "/usr/lib/python2.5/site-packages/numpy/testing/utils.py", line
 255, in assert_array_almost_equal
     header='Arrays are not almost equal')
   File "/usr/lib/python2.5/site-packages/numpy/testing/utils.py", line
 225, in assert_array_compare
     val = comparison(x,y)
   File "/usr/lib/python2.5/site-packages/numpy/testing/utils.py", line
 253, in compare
     return around(abs(x-y),decimal) <= 10.0**(-decimal)
   File "/usr/lib/python2.5/site-packages/numpy/core/fromnumeric.py", line
 1516, in around
     return round(decimals, out)
 AttributeError: 'float' object has no attribute 'rint'

 }}}

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/745>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list