Skip to content

Commit 516bc19

Browse files
authored
Merge pull request matplotlib#9337 from matplotlib/auto-backport-of-pr-9242
Backport PR matplotlib#9242 on branch v2.1.x
2 parents 41aff71 + b270987 commit 516bc19

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import six
55
from six.moves import xrange, zip, zip_longest
66

7-
from collections import Sized
87
import functools
98
import itertools
109
import math
@@ -3025,8 +3024,7 @@ def extract_err(err, data):
30253024
# special case for empty lists
30263025
if len(err) > 1:
30273026
fe = safe_first_element(err)
3028-
if (len(err) != len(data)
3029-
or isinstance(fe, Sized) and len(fe) > 1):
3027+
if (len(err) != len(data) or np.size(fe) > 1):
30303028
raise ValueError("err must be [ scalar | N, Nx1 "
30313029
"or 2xN array-like ]")
30323030
# using list comps rather than arrays to preserve units

0 commit comments

Comments
 (0)