10000 Merge pull request #23141 from oscargus/nanbarlabel2 · matplotlib/matplotlib@79f28ec · GitHub
[go: up one dir, main page]

Skip to content

Commit 79f28ec

Browse files
authored
Merge pull request #23141 from oscargus/nanbarlabel2
Minor fix for astropy units support broken in earlier PR
2 parents 0873285 + fb60cdf commit 79f28ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3505,7 +3505,7 @@ def apply_mask(arrays, mask): return [array[mask] for array in arrays]
35053505
f"'{dep_axis}err' (shape: {np.shape(err)}) must be a "
35063506
f"scalar or a 1D or (2, n) array-like whose shape matches "
35073507
f"'{dep_axis}' (shape: {np.shape(dep)})") from None
3508-
res = np.zeros_like(err, dtype=bool) # Default in case of nan
3508+
res = np.zeros(err.shape, dtype=bool) # Default in case of nan
35093509
if np.any(np.less(err, -err, out=res, where=(err == err))):
35103510
# like err<0, but also works for timedelta and nan.
35113511
raise ValueError(

0 commit comments

Comments
 (0)
0