From b2709870853a331cf3e45b2dde073c0ef6ff8ee4 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 9 Oct 2017 20:41:39 +0100 Subject: [PATCH] Backport PR #9242: Errorbar bugfix --- lib/matplotlib/axes/_axes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 512b12d32d32..0b97242c91a5 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -4,7 +4,6 @@ import six from six.moves import xrange, zip, zip_longest -from collections import Sized import functools import itertools import math @@ -3025,8 +3024,7 @@ def extract_err(err, data): # special case for empty lists if len(err) > 1: fe = safe_first_element(err) - if (len(err) != len(data) - or isinstance(fe, Sized) and len(fe) > 1): + if (len(err) != len(data) or np.size(fe) > 1): raise ValueError("err must be [ scalar | N, Nx1 " "or 2xN array-like ]") # using list comps rather than arrays to preserve units 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