On Wed, Dec 23, 2020 at 1:06 AM Steven D'Aprano <st...@pearwood.info> wrote:
> We're not obligated to take heroic > measures to integrate numpy arrays with unittest methods. If we can do > so easily, sure, let's fix it. > > I think Ivan's suggestion that the assertSequenceEqual method fall back > on element-by-element comparisons has some merit. > If there are other common types this helps with, sure. But for numpy, as pointed out elsewhere in this thread, it would still fail for numpy arrays of > 1 dimension. Personally I think this is really an issue with the structure of unitest -- having a custom assertion for every possibility is intractable. If you want to test numpy arrays, use the utilities provided by numpy. - CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/NSZ7GLILVVITHOXIARWPVCMYHAEI7PE2/ Code of Conduct: http://python.org/psf/codeofconduct/