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

Method __rsub__

numpy/core/tests/test_function_base.py:24–26  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

22 return PhysicalQuantity(float(self) - float(x))
23
24 def __rsub__(self, x):
25 assert_(isinstance(x, PhysicalQuantity))
26 return PhysicalQuantity(float(x) - float(self))
27
28 def __mul__(self, x):
29 return PhysicalQuantity(float(x) * float(self))

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
PhysicalQuantityClass · 0.85

Tested by

no test coverage detected