@@ -188,7 +188,7 @@ def __init__(self, ax,
188188 norm = None ,
189189 interpolation = None ,
190190 origin = None ,
191- filternorm = 1 ,
191+ filternorm = True ,
192192 filterrad = 4.0 ,
193193 resample = False ,
194194 ** kwargs
@@ -424,7 +424,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
424424 _interpd_ [self .get_interpolation ()],
425425 self .get_resample (), 1.0 ,
426426 self .get_filternorm (),
427- self .get_filterrad () or 0.0 )
427+ self .get_filterrad ())
428428
429429 # we are done with A_scaled now, remove from namespace
430430 # to be sure!
@@ -459,7 +459,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
459459 _interpd_ [self .get_interpolation ()],
460460 True , 1 ,
461461 self .get_filternorm (),
462- self .get_filterrad () or 0.0 )
462+ self .get_filterrad ())
463463 # we are done with the mask, delete from namespace to be sure!
464464 del mask
465465 # 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,
492492 _image .resample (
493493 A , output , t , _interpd_ [self .get_interpolation ()],
494494 self .get_resample (), alpha ,
495- self .get_filternorm (), self .get_filterrad () or 0.0 )
495+ self .get_filternorm (), self .get_filterrad ())
496496
497497 # at this point output is either a 2D array of normed data
498498 # (of int or float)
@@ -735,20 +735,17 @@ def get_resample(self):
735735
736736 def set_filternorm (self , filternorm ):
737737 """
738- Set whether the resize filter norms the weights -- see
739- help for imshow
738+ Set whether the resize filter normalizes the weights.
740739
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`.
747741
742+ .. ACCEPTS: bool
743+ """
744+ self ._filternorm = bool (filternorm )
748745 self .stale = True
749746
750747 def get_filternorm (self ):
751- """Return the filternorm setting ."""
748+ """Return whether the resize filter normalizes the weights ."""
752749 return self ._filternorm
753750
754751 def set_filterrad (self , filterrad ):
0 commit comments