MCPcopy
hub / github.com/numpy/numpy / MyClass

Class MyClass

numpy/ma/tests/test_core.py:2710–2717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2708 assert_raises(TypeError, operator.truediv, a, "abc")
2709
2710 class MyClass:
2711 __array_priority__ = a.__array_priority__ + 1
2712
2713 def __mul__(self, other):
2714 return "My mul"
2715
2716 def __rmul__(self, other):
2717 return "My rmul"
2718
2719 me = MyClass()
2720 assert_(me * a == "My mul")

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…