MAINT: fix up `_sputils.get_index_dtype` for NEP 50 casting rules
authorRalf Gommers <ralf.gommers@gmail.com>
Fri, 17 Jun 2022 14:22:40 +0000 (16:22 +0200)
committerDrew Parsons <dparsons@debian.org>
Thu, 19 Jan 2023 13:54:51 +0000 (13:54 +0000)
commite63e68a24d39e0c1c0a2ac2cf68b0314ef3e2ad4
tree3a121208652f8999cf6018784c1ccfd5b3247a5e
parentd4e3b8f6adb569496576dfb2421e936f2051bb61
MAINT: fix up `_sputils.get_index_dtype` for NEP 50 casting rules

The issue boiled down to `np.iinfo(np.int32).max` being a Python int,
and comparisons between numpy scalars and Python scalars changing
behavior - so avoid using Python scalars.

Also fix other sparse issues in the test suite turned up by NEP 50
And makes the tests more concise.

Gbp-Pq: Name 0014-MAINT-fix-up-_sputils.get_index_dtype-for-NEP-50-cas.patch
scipy/sparse/_sputils.py
scipy/sparse/linalg/tests/test_matfuncs.py
scipy/sparse/tests/test_base.py
scipy/sparse/tests/test_sputils.py