Skip to content

Commit 3991dc6

Browse files
committed
workaround
1 parent 6e9fe63 commit 3991dc6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/colors.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,8 +1391,10 @@ def autoscale_None(self, A):
13911391
"""If vmin or vmax are not set, use the min/max of *A* to set them."""
13921392
A = np.asanyarray(A)
13931393

1394-
if isinstance(A, np.ma.MaskedArray) and not A.mask:
1395-
A = A.data
1394+
if isinstance(A, np.ma.MaskedArray):
1395+
# 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
13961398

13971399
if self.vmin is None and A.size:
13981400
self.vmin = A.min()

0 commit comments

Comments
 (0)