We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce4c01a commit 58da429Copy full SHA for 58da429
pandas/core/arrays/numpy_.py
@@ -119,8 +119,12 @@ def __init__(
119
)
120
121
if values.ndim != 1:
122
+ # Technically we support 2, but do not advertise that fact.
123
raise ValueError("NumpyExtensionArray must be 1-dimensional.")
124
125
+ if (values.dtype == object and values.ndim != 1):
126
+ raise ValueError("NumpyExtensionArray must be 1-dimensional.")
127
+
128
if copy:
129
values = values.copy()
130
0 commit comments