File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4959,9 +4959,7 @@ def reduce_C_function(C: array) -> float
4959
4959
# autoscale the norm with current accum values if it hasn't been set
4960
4960
if norm is not None :
4961
4961
if norm .vmin is None and norm .vmax is None :
4962
- norm .autoscale_None (accum )
4963
- norm .vmin = np .ma .masked if norm .vmin is None else norm .vmin
4964
- norm .vmax = np .ma .masked if norm .vmax is None else norm .vmax
4962
+ norm .autoscale (accum )
4965
4963
4966
4964
if bins is not None :
4967
4965
if not np .iterable (bins ):
Original file line number Diff line number Diff line change @@ -1718,10 +1718,14 @@ def inverse(self, value):
1718
1718
def autoscale (self , A ):
1719
1719
# i.e. A[np.isfinite(...)], but also for non-array A's
1720
1720
in_trf_domain = np .extract (np .isfinite (self ._trf .transform (A )), A )
1721
+ if in_trf_domain .size == 0 :
1722
+ in_trf_domain = np .ma .masked
1721
1723
return super ().autoscale (in_trf_domain )
1722
1724
1723
1725
def autoscale_None (self , A ):
1724
1726
in_trf_domain = np .extract (np .isfinite (self ._trf .transform (A )), A )
1727
+ if in_trf_domain .size == 0 :
1728
+ in_trf_domain = np .ma .masked
1725
1729
return super ().autoscale_None (in_trf_domain )
1726
1730
1727
1731
if base_norm_cls is Normalize :
You can’t perform that action at this time.
0 commit comments