March 2, 2007
9:58 p.m.
On Friday 02 March 2007 16:10:53 Christopher Barker wrote:
Hi all,
Should array_equal work with non-numeric types?
I'm all for that. I was regularly running into that problem when comparing object arrays or chararrays, that's why I modified assert_equal in the "maskedarray" version of testutils (scipy SVN).
from maskedarray.testutils import assert_equal a = N.array(['a','b','c']) assert_equal(a,a.copy()) assert_equal(a,a[::-1]) AssertionError: Items are not equal: item=0
ACTUAL: 'a' DESIRED: 'c'