From f7590a2e480a5613546bef42f0f044e279c32cf6 Mon Sep 17 00:00:00 2001 From: Manuel Goacolou Date: Thu, 20 Jun 2019 10:25:49 +0200 Subject: [PATCH] use only hashable objects --- lib/matplotlib/figure.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 2896a2477ddd..43db5c68e371 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -1072,6 +1072,11 @@ def fixitems(items): # to tuples for the key ret = [] for k, v in items: + # some objects are not hashable: skip them + try: + hash(v) + except Exception: + continue # some objects can define __getitem__ without being # iterable and in those cases the conversion to tuples # will fail. So instead of using the np.iterable(v) function pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy