Skip to content

Commit aeb0dd7

Browse files
Terji PetersenTerji Petersen
authored andcommitted
fix arraylike
1 parent d562eef commit aeb0dd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/arrays/interval.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
from pandas.core.dtypes.cast import LossySetitemError
5050
from pandas.core.dtypes.common import (
51+
is_array_like,
5152
is_categorical_dtype,
5253
is_dtype_equal,
5354
is_float_dtype,
@@ -181,6 +182,9 @@
181182

182183
def maybe_convert_numeric_to_64bit(arr: NumpyIndexT) -> NumpyIndexT:
183184
# IntervalTree only supports 64 bit numpy array
185+
186+
if not is_array_like(arr):
187+
return arr
184188
dtype = arr.dtype
185189
if not np.issubclass_(dtype.type, np.number):
186190
return arr

0 commit comments

Comments
 (0)