Skip to content

Commit 82dd492

Browse files
committed
add extra check for np arrays
1 parent d966462 commit 82dd492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6040,7 +6040,7 @@ def __finalize__(self, other, method: str | None = None, **kwargs) -> Self:
60406040
if all(bool(obj.attrs) for obj in objs):
60416041
# all concatenate arguments have non-empty attrs
60426042
attrs = objs[0].attrs
6043-
have_same_attrs = all(obj.attrs == attrs for obj in objs[1:])
6043+
have_same_attrs = all((obj.attrs == attrs).all() if isinstance(obj.attrs, np.darray) else obj.attrs == attrs for obj in objs[1:])
60446044
if have_same_attrs:
60456045
self.attrs = deepcopy(attrs)
60466046

0 commit comments

Comments
 (0)