MCPcopy Create free account
hub / github.com/numpy/numpy / OptOut

Class OptOut

numpy/lib/tests/test_mixins.py:124–132  ·  view source on GitHub ↗

Object that opts out of __array_ufunc__.

Source from the content-addressed store, hash-verified

122 def test_opt_out(self):
123
124 class OptOut:
125 """Object that opts out of __array_ufunc__."""
126 __array_ufunc__ = None
127
128 def __add__(self, other):
129 return self
130
131 def __radd__(self, other):
132 return self
133
134 array_like = ArrayLike(1)
135 opt_out = OptOut()

Callers 1

test_opt_outMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_opt_outMethod · 0.56