Skip to content

Commit 5a0d489

Browse files
authored
Merge pull request #9242 from astromancer/errorbar-bugfix
Errorbar bugfix
2 parents f34627d + d0c5321 commit 5a0d489

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)