MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / __truediv__

Method __truediv__

maths/dual_number_automatic_differentiation.py:66–72  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

64 __rmul__ = __mul__
65
66 def __truediv__(self, other):
67 if not isinstance(other, Dual):
68 new_duals = []
69 for i in self.duals:
70 new_duals.append(i / other)
71 return Dual(self.real / other, new_duals)
72 raise ValueError
73
74 def __floordiv__(self, other):
75 if not isinstance(other, Dual):

Callers

nothing calls this directly

Calls 2

DualClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected