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>
Wed, 25 Jan 2023 14:32:10 +0000 (14:32 +0000)
commit2418f6e74351c80b0c35d8516cb00c18a5809330
tree4373170050b4980642e67aa399f708df7764a006
parent272a00cda5df2f06eb679af6e885994e8dbca5f7
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