@@ -2890,10 +2890,8 @@ def xywhere(xs, ys, mask):
2890
2890
# above. This prevents Nx2 arrays from accidentally
2891
2891
# being accepted, when the user meant the 2xN transpose.
2892
2892
# special case for empty lists
2893
- if len (xerr ) and not (len (xerr ) == 1 or
2894
- (len (xerr ) == len (x ) and not (
2895
- iterable (xerr [0 ]) and
2896
- len (xerr [0 ]) > 1 ))):
2893
+ if len (xerr ) > 1 and not ((len (xerr ) == len (x ) and not (
2894
+ iterable (xerr [0 ]) and len (xerr [0 ]) > 1 ))):
2897
2895
raise ValueError ("xerr must be a scalar, the same "
2898
2896
"dimensions as x, or 2xN." )
2899
2897
# using list comps rather than arrays to preserve units
@@ -2955,10 +2953,8 @@ def xywhere(xs, ys, mask):
2955
2953
in cbook .safezip (y , yerr [1 ])]
2956
2954
else :
2957
2955
# Check for scalar or symmetric, as in xerr.
2958
- if len (yerr ) and not (len (yerr ) == 1 or
2959
- (len (yerr ) == len (y ) and not (
2960
- iterable (yerr [0 ]) and
2961
- len (yerr [0 ]) > 1 ))):
2956
+ if len (yerr ) > 1 and not ((len (yerr ) == len (y ) and not (
2957
+ iterable (yerr [0 ]) and len (yerr [0 ]) > 1 ))):
2962
2958
raise ValueError ("yerr must be a scalar, the same "
2963
2959
"dimensions as y, or 2xN." )
2964
2960
# using list comps rather than arrays to preserve units
0 commit comments