@@ -2890,10 +2890,8 @@ def xywhere(xs, ys, mask):
28902890 # above. This prevents Nx2 arrays from accidentally
28912891 # being accepted, when the user meant the 2xN transpose.
28922892 # 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 ))):
28972895 raise ValueError ("xerr must be a scalar, the same "
28982896 "dimensions as x, or 2xN." )
28992897 # using list comps rather than arrays to preserve units
@@ -2955,10 +2953,8 @@ def xywhere(xs, ys, mask):
29552953 in cbook .safezip (y , yerr [1 ])]
29562954 else :
29572955 # 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 ))):
29622958 raise ValueError ("yerr must be a scalar, the same "
29632959 "dimensions as y, or 2xN." )
29642960 # using list comps rather than arrays to preserve units
0 commit comments