File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 93
93
is_array_like ,
94
94
is_bool_dtype ,
95
95
is_dataclass ,
96
- is_datetime64_any_dtype ,
97
96
is_dict_like ,
98
97
is_float ,
99
98
is_float_dtype ,
104
103
is_list_like ,
105
104
is_scalar ,
106
105
is_sequence ,
107
- is_timedelta64_dtype ,
108
106
needs_i8_conversion ,
109
107
pandas_dtype ,
110
108
)
@@ -11356,7 +11354,7 @@ def cov(
11356
11354
"""
11357
11355
data = self ._get_numeric_data () if numeric_only else self
11358
11356
dtypes = [blk .dtype for blk in self ._mgr .blocks ]
11359
- if any (is_datetime64_any_dtype ( d ) or is_timedelta64_dtype ( d ) for d in dtypes ):
11357
+ if any (d . kind in "mM" for d in dtypes ):
11360
11358
msg = (
11361
11359
"DataFrame contains columns with dtype datetime64 "
11362
11360
"or timedelta64, which are not supported for cov."
Original file line number Diff line number Diff line change @@ -1800,7 +1800,7 @@ def as_array(
1800
1800
arr = np .asarray (blk .values , dtype = dtype )
1801
1801
else :
1802
1802
arr = np .array (blk .values , dtype = dtype , copy = copy )
1803
- if passed_nan and blk .dtype .kind in [ "m" , "M" ] :
1803
+ if passed_nan and blk .dtype .kind in "mM" :
1804
1804
arr [isna (blk .values )] = na_value
1805
1805
1806
1806
if not copy :
You can’t perform that action at this time.
0 commit comments