Skip to content

Commit 996f62b

Browse files
committed
fix the dtype=None case
1 parent be8e57a commit 996f62b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/arrays/integer.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ def coerce_to_array(
227227
mask = mask.copy()
228228
return values, mask
229229

230-
typ = dtype.numpy_dtype()
231-
values = np.asarray(values, dtype=typ)
232-
if copy and hasattr(values, 'dtype'):
230+
values = np.asarray(values, dtype=getattr(values, "dtype", object))
231+
if copy and hasattr(values, "dtype"):
233232
values = values.copy()
234233

235234
if is_object_dtype(values):

0 commit comments

Comments
 (0)