MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / to_ndarray

Method to_ndarray

machine_learning/automatic_differentiation.py:62–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 return f"Variable({self.value})"
61
62 def to_ndarray(self) -> np.ndarray:
63 return self.value
64
65 def __add__(self, other: Variable) -> Variable:
66 result = Variable(self.value + other.value)

Callers 2

gradientMethod · 0.80
derivativeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected