Skip to content

Commit bcf965a

Browse files
Terji Petersentopper-123
Terji Petersen
authored andcommitted
fix arraylike
1 parent 65efe5d commit bcf965a

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
@@ -49,6 +49,7 @@
4949

5050
from pandas.core.dtypes.cast import LossySetitemError
5151
from pandas.core.dtypes.common import (
52+
is_array_like,
5253
is_categorical_dtype,
5354
is_dtype_equal,
5455
is_float_dtype,
@@ -185,6 +186,9 @@
185186

186187
def maybe_convert_numeric_to_64bit(arr: NumpyIndexT) -> NumpyIndexT:
187188
# IntervalTree only supports 64 bit numpy array
189+
190+
if not is_array_like(arr):
191+
return arr
188192
dtype = arr.dtype
189193
if not np.issubclass_(dtype.type, np.number):
190194
return arr

0 commit comments

Comments
 (0)