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

Class _DomainTan

numpy/ma/core.py:873–888  ·  view source on GitHub ↗

Define a valid interval for the `tan` function, so that: ``domain_tan(eps) = True`` where ``abs(cos(x)) < eps``

Source from the content-addressed store, hash-verified

871
872
873class _DomainTan:
874 """
875 Define a valid interval for the `tan` function, so that:
876
877 ``domain_tan(eps) = True`` where ``abs(cos(x)) < eps``
878
879 """
880
881 def __init__(self, eps):
882 "domain_tan(eps) = true where abs(cos(x)) < eps)"
883 self.eps = eps
884
885 def __call__(self, x):
886 "Executes the call behavior."
887 with np.errstate(invalid='ignore'):
888 return umath.less(umath.absolute(umath.cos(x)), self.eps)
889
890
891class _DomainSafeDivide:

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…