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)
committerJochen Sprickerhof <jspricke@debian.org>
Tue, 3 Jan 2023 20:59:59 +0000 (20:59 +0000)
commite702986568e3dc43ceb2d6aa323f39b8b96aac2b
tree4623563411c99ae0cecf3f06ab9b74b7ed7c44aa
parentf5546fd92f58ba6be141ee45068a3d208bd7a13a
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