Thanks to visit codestin.com Credit goes to github.com
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 6e9fe63 commit 3991dc6Copy full SHA for 3991dc6
1 file changed
lib/matplotlib/colors.py
@@ -1391,8 +1391,10 @@ def autoscale_None(self, A):
1391
"""If vmin or vmax are not set, use the min/max of *A* to set them."""
1392
A = np.asanyarray(A)
1393
1394
- if isinstance(A, np.ma.MaskedArray) and not A.mask:
1395
- A = A.data
+ if isinstance(A, np.ma.MaskedArray):
+ # we need to make the distinction between an array, False, np.bool_(False)
1396
+ if A.mask is False or not A.mask.shape:
1397
+ A = A.data
1398
1399
if self.vmin is None and A.size:
1400
self.vmin = A.min()
0 commit comments