We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6931619 commit 44230b5Copy full SHA for 44230b5
lib/matplotlib/scale.py
@@ -87,12 +87,12 @@ def get_transform(self):
87
def _mask_non_positives(a):
88
"""
89
Return a Numpy masked array where all non-positive values are
90
- masked. If there are no non-positive values, the original array
91
- is returned.
+ replaced with NaNs. If there are no non-positive values, the
+ original array is returned.
92
93
mask = a <= 0.0
94
if mask.any():
95
- return ma.MaskedArray(a, mask=mask)
+ return np.where(mask, np.nan, a)
96
return a
97
98
0 commit comments