Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
To avoid the error 'The truth value of an array with more than one element is ambiguous.', we don't use walrus operator.
  • Loading branch information
nokoshu committed Nov 25, 2023
1 parent 7de7def commit 7a576f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions seaborn/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,8 @@ def iter_data(

grouping_keys = []
for var in grouping_vars:
if key := levels.get(var):
grouping_keys.append(key)
else:
grouping_keys.append([])
key = levels.get(var) if levels.get(var) is not None else []
grouping_keys.append(key)

iter_keys = itertools.product(*grouping_keys)
if reverse:
Expand Down

0 comments on commit 7a576f0

Please sign in to comment.