MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / val_in_range

Method val_in_range

lib/matplotlib/scale.py:436–445  ·  view source on GitHub ↗

Return whether the value(s) are within the valid range for this scale. This is True for value(s) > 0 except +inf and NaN.

(self, val)

Source from the content-addressed store, hash-verified

434 minpos if vmax <= 0 else vmax)
435
436 def val_in_range(self, val):
437 """
438 Return whether the value(s) are within the valid range for this scale.
439
440 This is True for value(s) > 0 except +inf and NaN.
441 """
442 arr = np.asarray(val)
443 with np.errstate(invalid='ignore'):
444 result = np.isfinite(arr) & (arr > 0)
445 return bool(result) if arr.ndim == 0 else result
446
447
448class FuncScaleLog(LogScale):

Callers 5

_scale_invalid_maskFunction · 0.45
_point_in_data_domainMethod · 0.45
test_val_in_rangeFunction · 0.45
test_val_in_range_arrayFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_val_in_rangeFunction · 0.36
test_val_in_range_arrayFunction · 0.36