@@ -773,6 +773,11 @@ def is_int64_dtype(arr_or_dtype) -> bool:
773
773
"""
774
774
Check whether the provided array or dtype is of the int64 dtype.
775
775
776
+ .. deprecated:: 2.1.0
777
+
778
+ is_int64_dtype is deprecated and will be removed in a future
779
+ version. Use dtype == np.int64 instead.
780
+
776
781
Parameters
777
782
----------
778
783
arr_or_dtype : array-like or dtype
@@ -792,29 +797,29 @@ def is_int64_dtype(arr_or_dtype) -> bool:
792
797
Examples
793
798
--------
794
799
>>> from pandas.api.types import is_int64_dtype
795
- >>> is_int64_dtype(str)
800
+ >>> is_int64_dtype(str) # doctest: +SKIP
796
801
False
797
- >>> is_int64_dtype(np.int32)
802
+ >>> is_int64_dtype(np.int32) # doctest: +SKIP
798
803
False
799
- >>> is_int64_dtype(np.int64)
804
+ >>> is_int64_dtype(np.int64) # doctest: +SKIP
800
805
True
801
- >>> is_int64_dtype('int8')
806
+ >>> is_int64_dtype('int8') # doctest: +SKIP
802
807
False
803
- >>> is_int64_dtype('Int8')
808
+ >>> is_int64_dtype('Int8') # doctest: +SKIP
804
809
False
805
- >>> is_int64_dtype(pd.Int64Dtype)
810
+ >>> is_int64_dtype(pd.Int64Dtype) # doctest: +SKIP
806
811
True
807
- >>> is_int64_dtype(float)
812
+ >>> is_int64_dtype(float) # doctest: +SKIP
808
813
False
809
- >>> is_int64_dtype(np.uint64) # unsigned
814
+ >>> is_int64_dtype(np.uint64) # unsigned # doctest: +SKIP
810
815
False
811
- >>> is_int64_dtype(np.array(['a', 'b']))
816
+ >>> is_int64_dtype(np.array(['a', 'b'])) # doctest: +SKIP
812
817
False
813
- >>> is_int64_dtype(np.array([1, 2], dtype=np.int64))
818
+ >>> is_int64_dtype(np.array([1, 2], dtype=np.int64)) # doctest: +SKIP
814
819
True
815
- >>> is_int64_dtype(pd.Index([1, 2.])) # float
820
+ >>> is_int64_dtype(pd.Index([1, 2.])) # float # doctest: +SKIP
816
821
False
817
- >>> is_int64_dtype(np.array([1, 2], dtype=np.uint32)) # unsigned
822
+ >>> is_int64_dtype(np.array([1, 2], dtype=np.uint32)) # unsigned # doctest: +SKIP
818
823
False
819
824
"""
820
825
# GH#52564
0 commit comments