We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
np.long
1 parent 25655e2 commit f07deefCopy full SHA for f07deef
pandas/compat/numpy/__init__.py
@@ -1,4 +1,6 @@
1
""" support numpy compatibility across versions """
2
+import warnings
3
+
4
import numpy as np
5
6
from pandas.util.version import Version
@@ -26,8 +28,14 @@
26
28
27
29
if _nlv >= Version("2.0.0.dev0"):
30
try:
- np_long = np.long # type: ignore[attr-defined]
- np_ulong = np.ulong # type: ignore[attr-defined]
31
+ with warnings.catch_warnings():
32
+ warnings.filterwarnings(
33
+ "ignore",
34
+ r".*In the future `np\.long` will be defined as.*",
35
+ FutureWarning,
36
+ )
37
+ np_long = np.long # type: ignore[attr-defined]
38
+ np_ulong = np.ulong # type: ignore[attr-defined]
39
except AttributeError:
40
np_long = np.int_
41
np_ulong = np.uint
0 commit comments