Skip to content

Commit 599f775

Browse files
committed
old-numpy compat
1 parent c3bb0b6 commit 599f775

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/core/arrays/arrow/array.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,12 +564,8 @@ def _box_pa_array(
564564
return pa_array
565565

566566
mask = None
567-
if getattr(value, "dtype", None) is None or value.dtype.kind not in "mMf":
568-
try:
569-
arr_value = np.asarray(value)
570-
except ValueError:
571-
# e.g. list dtype with mixed-length lists
572-
arr_value = np.asarray(value, dtype=object)
567+
if getattr(value, "dtype", None) is None or value.dtype.kind not in "iumMf":
568+
arr_value = np.asarray(value, dtype=object)
573569
# similar to isna(value) but exclude NaN, NaT, nat-like, nan-like
574570
mask = is_pdna_or_none(arr_value)
575571

0 commit comments

Comments
 (0)