File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4992,9 +4992,7 @@ def reduce_C_function(C: array) -> float
49924992 # autoscale the norm with current accum values if it hasn't been set
49934993 if norm is not None :
49944994 if norm .vmin is None and norm .vmax is None :
4995- norm .autoscale_None (accum )
4996- norm .vmin = np .ma .masked if norm .vmin is None else norm .vmin
4997- norm .vmax = np .ma .masked if norm .vmax is None else norm .vmax
4995+ norm .autoscale (accum )
49984996
49994997 if bins is not None :
50004998 if not np .iterable (bins ):
Original file line number Diff line number Diff line change @@ -1718,10 +1718,14 @@ def inverse(self, value):
17181718 def autoscale (self , A ):
17191719 # i.e. A[np.isfinite(...)], but also for non-array A's
17201720 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
17211723 return super ().autoscale (in_trf_domain )
17221724
17231725 def autoscale_None (self , A ):
17241726 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
17251729 return super ().autoscale_None (in_trf_domain )
17261730
17271731 if base_norm_cls is Normalize :
You can’t perform that action at this time.
0 commit comments