MCPcopy Index your code
hub / github.com/numpy/numpy / _DomainCheckInterval

Class _DomainCheckInterval

numpy/ma/core.py:848–870  ·  view source on GitHub ↗

Define a valid interval, so that : ``domain_check_interval(a,b)(x) == True`` where ``x < a`` or ``x > b``.

Source from the content-addressed store, hash-verified

846
847
848class _DomainCheckInterval:
849 """
850 Define a valid interval, so that :
851
852 ``domain_check_interval(a,b)(x) == True`` where
853 ``x < a`` or ``x > b``.
854
855 """
856
857 def __init__(self, a, b):
858 "domain_check_interval(a,b)(x) = true where x < a or y > b"
859 if a > b:
860 (a, b) = (b, a)
861 self.a = a
862 self.b = b
863
864 def __call__(self, x):
865 "Execute the call behavior."
866 # nans at masked positions cause RuntimeWarnings, even though
867 # they are masked. To avoid this we suppress warnings.
868 with np.errstate(invalid='ignore'):
869 return umath.logical_or(umath.greater(x, self.b),
870 umath.less(x, self.a))
871
872
873class _DomainTan:

Callers 1

core.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…