@@ -188,7 +188,7 @@ def __init__(self, ax,
188
188
norm = None ,
189
189
interpolation = None ,
190
190
origin = None ,
191
- filternorm = 1 ,
191
+ filternorm = True ,
192
192
filterrad = 4.0 ,
193
193
resample = False ,
194
194
** kwargs
@@ -424,7 +424,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
424
424
_interpd_ [self .get_interpolation ()],
425
425
self .get_resample (), 1.0 ,
426
426
self .get_filternorm (),
427
- self .get_filterrad () or 0.0 )
427
+ self .get_filterrad ())
428
428
429
429
# we are done with A_scaled now, remove from namespace
430
430
# to be sure!
@@ -459,7 +459,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
459
459
_interpd_ [self .get_interpolation ()],
460
460
True , 1 ,
461
461
self .get_filternorm (),
462
- self .get_filterrad () or 0.0 )
462
+ self .get_filterrad ())
463
463
# we are done with the mask, delete from namespace to be sure!
464
464
del mask
465
465
# Agg updates the out_mask in place. If the pixel has
@@ -492,7 +492,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
492
492
_image .resample (
493
493
A , output , t , _interpd_ [self .get_interpolation ()],
494
494
self .get_resample (), alpha ,
495
- self .get_filternorm (), self .get_filterrad () or 0.0 )
495
+ self .get_filternorm (), self .get_filterrad ())
496
496
497
497
# at this point output is either a 2D array of normed data
498
498
# (of int or float)
@@ -735,20 +735,17 @@ def get_resample(self):
735
735
736
736
def set_filternorm (self , filternorm ):
737
737
"""
738
- Set whether the resize filter norms the weights -- see
739
- help for imshow
738
+ Set whether the resize filter normalizes the weights.
740
739
741
- ACCEPTS: 0 or 1
742
- """
743
- if filternorm :
744
- self ._filternorm = 1
745
- else :
746
- self ._filternorm = 0
740
+ See help for `~.Axes.imshow`.
747
741
742
+ .. ACCEPTS: bool
743
+ """
744
+ self ._filternorm = bool (filternorm )
748
745
self .stale = True
749
746
750
747
def get_filternorm (self ):
751
- """Return the filternorm setting ."""
748
+ """Return whether the resize filter normalizes the weights ."""
752
749
return self ._filternorm
753
750
754
751
def set_filterrad (self , filterrad ):
0 commit comments