Skip to content

Commit 80e0130

Browse files
add conditional to check ndim
Change dimensionality check for NumpyExtensionArray.
1 parent 58da429 commit 80e0130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/arrays/numpy_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __init__(
118118
f"'values' must be a NumPy array, not {type(values).__name__}"
119119
)
120120

121-
if values.ndim != 1:
121+
if values.ndim == 0:
122122
# Technically we support 2, but do not advertise that fact.
123123
raise ValueError("NumpyExtensionArray must be 1-dimensional.")
124124

0 commit comments

Comments
 (0)