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

Method __init__

machine_learning/automatic_differentiation.py:51–57  ·  view source on GitHub ↗
(self, value: Any)

Source from the content-addressed store, hash-verified

49 """
50
51 def __init__(self, value: Any) -> None:
52 self.value = np.array(value)
53
54 # pointers to the operations to which the Variable is input
55 self.param_to: list[Operation] = []
56 # pointer to the operation of which the Variable is output of
57 self.result_of: Operation = Operation(OpType.NOOP)
58
59 def __repr__(self) -> str:
60 return f"Variable({self.value})"

Callers

nothing calls this directly

Calls 1

OperationClass · 0.85

Tested by

no test coverage detected