diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-05-27 13:15:16 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-06-04 09:37:02 -0400 |
commit | 3ad49aaaf497c6daadb9b66f295f58a315476e01 (patch) | |
tree | 6e0908fdcdb3e7c4130fb932119a83fb2f8c501c /numpy/doc/structured_arrays.py | |
parent | 5718b3306303b4899c017641a9282714dcf8c9b8 (diff) | |
download | numpy-3ad49aaaf497c6daadb9b66f295f58a315476e01.tar.gz |
MAINT: clean up assert_array_compare a bit further.
This brought to light two bugs in tests, which are fixed here, viz.,
that a sample ndarray subclass that tested propagation of an added
parameter was incomplete, in that in propagating the parameter in
__array_wrap__ it assumed it was there on self, but that assumption
could be broken when a view of self was taken (as is done by
x[~flagged] in the test routine), since there was no
__array_finalize__ defined.
The other subclass bug counted, incorrectly, on only needing to provide
one type of comparison, the __lt__ being explicitly tested. But flags
are compared with __eq__ and those flags will have the same subclass.
Diffstat (limited to 'numpy/doc/structured_arrays.py')
0 files changed, 0 insertions, 0 deletions