MCPcopy Create free account
hub / github.com/ActiveState/code / __sub__

Method __sub__

recipes/Python/580610_Auto_differentiation/recipe-580610.py:77–78  ·  view source on GitHub ↗
(u, v)

Source from the content-addressed store, hash-verified

75 return Num(float(u) + float(v), d(u) + d(v))
76
77 def __sub__(u, v):
78 return Num(float(u) - float(v), d(u) - d(v))
79
80 def __mul__(u, v):
81 u, v, du, dv = float(u), float(v), d(u), d(v)

Callers

nothing calls this directly

Calls 2

NumClass · 0.70
dFunction · 0.50

Tested by

no test coverage detected