@@ -581,58 +581,6 @@ def is_dtype_equal(source, target) -> bool:
581
581
return False
582
582
583
583
584
- def is_any_int_dtype (arr_or_dtype ) -> bool :
585
- """
586
- Check whether the provided array or dtype is of an integer dtype.
587
-
588
- In this function, timedelta64 instances are also considered "any-integer"
589
- type objects and will return True.
590
-
591
- This function is internal and should not be exposed in the public API.
592
-
593
- The nullable Integer dtypes (e.g. pandas.Int64Dtype) are also considered
594
- as integer by this function.
595
-
596
- Parameters
597
- ----------
598
- arr_or_dtype : array-like or dtype
599
- The array or dtype to check.
600
-
601
- Returns
602
- -------
603
- boolean
604
- Whether or not the array or dtype is of an integer dtype.
605
-
606
- Examples
607
- --------
608
- >>> is_any_int_dtype(str)
609
- False
610
- >>> is_any_int_dtype(int)
611
- True
612
- >>> is_any_int_dtype(float)
613
- False
614
- >>> is_any_int_dtype(np.uint64)
615
- True
616
- >>> is_any_int_dtype(np.datetime64)
617
- False
618
- >>> is_any_int_dtype(np.timedelta64)
619
- True
620
- >>> is_any_int_dtype(np.array(['a', 'b']))
621
- False
622
- >>> is_any_int_dtype(pd.Series([1, 2]))
623
- True
624
- >>> is_any_int_dtype(np.array([], dtype=np.timedelta64))
625
- True
626
- >>> is_any_int_dtype(pd.Index([1, 2.])) # float
627
- False
628
- """
629
- return _is_dtype_type (
630
- arr_or_dtype , classes (np .integer , np .timedelta64 )
631
- ) or _is_dtype (
632
- arr_or_dtype , lambda typ : isinstance (typ , ExtensionDtype ) and typ .kind in "iu"
633
- )
634
-
635
-
636
584
def is_integer_dtype (arr_or_dtype ) -> bool :
637
585
"""
638
586
Check whether the provided array or dtype is of an integer dtype.
@@ -936,10 +884,7 @@ def is_datetime64_ns_dtype(arr_or_dtype) -> bool:
936
884
try :
937
885
tipo = get_dtype (arr_or_dtype )
938
886
except TypeError :
939
- if is_datetime64tz_dtype (arr_or_dtype ):
940
- tipo = get_dtype (arr_or_dtype .dtype )
941
- else :
942
- return False
887
+ return False
943
888
return tipo == DT64NS_DTYPE or (
944
889
isinstance (tipo , DatetimeTZDtype ) and tipo .unit == "ns"
945
890
)
@@ -1718,7 +1663,6 @@ def is_all_strings(value: ArrayLike) -> bool:
1718
1663
"is_1d_only_ea_dtype" ,
1719
1664
"is_1d_only_ea_obj" ,
1720
1665
"is_all_strings" ,
1721
- "is_any_int_dtype" ,
1722
1666
"is_any_real_numeric_dtype" ,
1723
1667
"is_array_like" ,
1724
1668
"is_bool" ,
0 commit comments