File tree 1 file changed +5
-14
lines changed 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 18
18
except ImportError :
19
19
# LPy workaround
20
20
from fractions import gcd
21
- import warnings
22
21
23
22
import numpy as np
24
23
import matplotlib as mpl
@@ -363,19 +362,11 @@ def contains(self, mouseevent):
363
362
if not self .get_visible ():
364
363
return False , {}
365
364
366
- if self ._picker is True : # the Boolean constant, not just nonzero or 1
367
- pickradius = self ._pickradius
368
- else :
369
- try :
370
- pickradius = float (self ._picker )
371
- except TypeError :
372
- # This should not happen if "contains" is called via
373
- # pick, the normal route; the check is here in case
374
- # it is called through some unanticipated route.
375
- warnings .warn (
376
- "Collection picker %s could not be converted to float"
377
- % self ._picker )
378
- pickradius = self ._pickradius
365
+ pickradius = (
366
+ float (self ._picker )
367
+ if cbook .is_numlike (self ._picker ) and
368
+ self ._picker is not True # the bool, not just nonzero or 1
369
+ else self ._pickradius )
379
370
380
371
transform , transOffset , offsets , paths = self ._prepare_points ()
381
372
You can’t perform that action at this time.
0 commit comments