Skip to content

Commit a1211e5

Browse files
committed
Attempt to fix issue with new pandas where Index no longer inherits from ndarray
1 parent 3862ea0 commit a1211e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

patsy/design_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def from_array(cls, array_like, default_column_prefix="column"):
277277
if arr.ndim > 2:
278278
raise ValueError("design matrix can't have >2 dimensions")
279279
columns = getattr(arr, "columns", range(arr.shape[1]))
280-
if (isinstance(columns, np.ndarray)
280+
if (hasattr(columns, "dtype")
281281
and not np.issubdtype(columns.dtype, np.integer)):
282282
column_names = [str(obj) for obj in columns]
283283
else:

0 commit comments

Comments
 (0)