Skip to content

Commit

Permalink
Adapt AttrSeries.__init__ for pandas <2.1 (Python 3.8)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Jan 26, 2024
1 parent 3f26d5d commit 34b3ff9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion genno/core/attrseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ def __init__(self, data=None, *args, name=None, attrs=None, **kwargs):
# Emulate behaviour of Series.__init__
if isinstance(data, DataManager):
if not (
0 == len(args) == len(kwargs) and name is attrs is None
0 == len(args) == len(kwargs) and attrs is None
): # pragma: no cover
raise NotImplementedError
NDFrame.__init__(self, data)
if name:
self.name = name
return

attrs = Quantity._collect_attrs(data, attrs, kwargs)
Expand Down

0 comments on commit 34b3ff9

Please sign in to comment.