Skip to content

Commit

Permalink
Update _tensor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Jan 12, 2025
1 parent 743c1b4 commit 4a262e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tensortrax/_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,11 @@ def init(self, gradient=False, hessian=False, sym=False, δx=None, Δx=None):
δx = np.zeros(self.size**2).reshape(shape)
else:
δx = np.eye(self.size).reshape(shape)

else:
δx = δx.reshape(*self.shape, *self.trax)
Δx = δx.copy()

Δx = δx.copy()

elif hessian:
# add additional trailing axes for dual values
Expand Down

0 comments on commit 4a262e2

Please sign in to comment.