[SciPy-dev] Arrays as dtypes
Ed Schofield
schofield at ftw.at
Thu Nov 17 13:19:50 EST 2005
Hi all,
Do we need to allow arrays as dtypes?
I've just found a bug in the test suite for the matrix module:
assert all(array(conjugate(transpose(B)), mB.H))
which should be
assert all(array(conjugate(transpose(B)) == mB.H))
This was silently passing before without running the desired test. This
used the dtype of mB.H to create the array instead of comparing the
elements properly.
I'd like to make a case for removing the ability to use arrays as dtypes
to avoid little bugs like these. The meaning of the explicit notation:
array(a, b.dtype)
rather than
array(a, b)
is also clearer to a reader and not difficult to type.
-- Ed
More information about the SciPy-Dev
mailing list