Skip to content

Commit

Permalink
Explain why we use * (and not matmul)
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianDepriester committed Dec 11, 2024
1 parent e2642db commit e38fcbe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/Tutorial_StressStrain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ And get the stress back to the initial coordinate system:

>>> sigma = sigma_rotated * rotations.inv() # Go back to initial frame

As opposed to the matmul operator (see above), we use ``*`` operator here to keep the same dimensionality (perform
element-wise multiplication).
Finally, we can estimate the mean stresses among all the orientations:

>>> sigma_mean = sigma.mean(axis=1) # Compute the mean over all orientations
Expand Down

0 comments on commit e38fcbe

Please sign in to comment.