Skip to content

Commit 73a95d2

Browse files
committed
old-numpy compat
1 parent d2aeeff commit 73a95d2

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
@@ -562,12 +562,8 @@ def _box_pa_array(
562562
return pa_array
563563

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

0 commit comments

Comments
 (0)