Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 07c80a2

Browse files
committed
ENH: try to allow any hashable key
1 parent 42dab11 commit 07c80a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/figure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,10 +1629,10 @@ def _process_layout(layout):
16291629
for k, v in enumerate(row):
16301630
if v == empty_sentinel:
16311631
continue
1632-
elif isinstance(v, (int, str, Axes)):
1633-
unique_ids.add(v)
1634-
else:
1632+
elif not isinstance(v, str) and isinstance(v, Iterable):
16351633
nested[(j, k)] = v
1634+
else:
1635+
unique_ids.add(v)
16361636

16371637
return unique_ids, nested
16381638

0 commit comments

Comments
 (0)