Skip to content

Commit f22c1f4

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/arrays/integer.py

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

230-
typ = dtype.numpy_dtype()
230+
typ = dtype.numpy_dtype if dtype is not None else None
231231
values = np.asarray(values, dtype=typ)
232-
if copy and hasattr(values, 'dtype'):
232+
if copy:
233233
values = values.copy()
234234

235235
if is_object_dtype(values):

0 commit comments

Comments
 (0)