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

Method __add__

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

Source from the content-addressed store, hash-verified

72 return inst
73
74 def __add__(u, v):
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))

Callers

nothing calls this directly

Calls 2

NumClass · 0.70
dFunction · 0.50

Tested by

no test coverage detected