Skip to content

Commit 2ca741b

Browse files
BUG: Slice Arrow buffer before passing it to numpy (pandas-dev#40896)
Change argument passed to pyarrow_array_to_numpy_and_mask() from str to np.dtype.
1 parent 1586d50 commit 2ca741b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/dtypes/dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ def __from_arrow__(
10001000

10011001
results = []
10021002
for arr in chunks:
1003-
data, mask = pyarrow_array_to_numpy_and_mask(arr, dtype="int64")
1003+
data, mask = pyarrow_array_to_numpy_and_mask(arr, dtype=np.dtype("int64"))
10041004
parr = PeriodArray(data.copy(), freq=self.freq, copy=False)
10051005
parr[~mask] = NaT
10061006
results.append(parr)

0 commit comments

Comments
 (0)