-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Description
Describe the issue:
iinfo
on int
or numpy.int64
looks OK, but on numpy.integer
, one gets:
Python 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.iinfo(numpy.integer)
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
numpy.iinfo(numpy.integer)
~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/kieffer/.venv/py313/lib/python3.13/site-packages/numpy/_core/getlimits.py", line 707, in __init__
raise ValueError(f"Invalid integer data type {self.kind!r}.")
ValueError: Invalid integer data type 'O'.
>>> numpy.iinfo(numpy.int64)
iinfo(min=-9223372036854775808, max=9223372036854775807, dtype=int64)
>>> numpy.iinfo(int)
iinfo(min=-9223372036854775808, max=9223372036854775807, dtype=int64)
>>> numpy.integer
<class 'numpy.integer'>
>>> numpy.version.version
'2.3.2'
Reproduce the code example:
import numpy
numpy.iinfo(numpy.integer)
Error message:
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
numpy.iinfo(numpy.integer)
~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/kieffer/.venv/py313/lib/python3.13/site-packages/numpy/_core/getlimits.py", line 707, in __init__
raise ValueError(f"Invalid integer data type {self.kind!r}.")
ValueError: Invalid integer data type 'O'.
Python and NumPy Versions:
python 3.13
numpy: 2.3.2
Runtime Environment:
[{'numpy_version': '2.3.2',
'python': '3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]',
'uname': uname_result(system='Linux', node='mac13', release='6.12.41+deb13-amd64', version='#1 SMP PREEMPT_DYNAMIC Debian 6.12.41-1 (2025-08-12)', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2'],
'not_found': ['AVX512F',
'AVX512CD',
'AVX512_KNL',
'AVX512_KNM',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL',
'AVX512_SPR']}},
{'architecture': 'Haswell',
'filepath': '/home/kieffer/.venv/py313/lib/python3.13/site-packages/numpy.libs/libscipy_openblas64_-8fb3d286.so',
'internal_api': 'openblas',
'num_threads': 4,
'prefix': 'libscipy_openblas',
'threading_layer': 'pthreads',
'user_api': 'blas',
'version': '0.3.30'}]
Context for the issue:
No response