Add support for exponential - #75
Merged
Merged
Conversation
gausshj
commented
Nov 3, 2025
Collaborator
- Add support for exponential
- Add test cases for exponential
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
hzhangxyz
reviewed
Nov 3, 2025
| _tensor=tensor, | ||
| ) | ||
|
|
||
| def _group_legs( |
Member
There was a problem hiding this comment.
这个平时确实会叫legs/edge/index/..., 他们都是同一个东西, 不过这个库里之前都是称呼edge的, 就统一用edge这个名字吧
|
|
||
| tensor_exp = dataclasses.replace(tensor, _tensor=tensor_exp) | ||
|
|
||
| if axes_to_reverse: |
Member
There was a problem hiding this comment.
别用axes, 前面的legs, axes都是同一个东西, 用同一个名字吧.
| edges_after_permute = tuple(self.edges[i] for i in order) | ||
| tensor_exp = tensor_exp.reshape(edges_after_permute) | ||
|
|
||
| inv = [0] * self.tensor.dim() |
Member
There was a problem hiding this comment.
这个地方后面应该会经常使用, 可以单独变成一个函数. 另外, 变量名尽量写全点吧.
- Add support for exponential - Add test cases for exponential
gausshj
force-pushed
the
dev/add-support-for-exponential
branch
from
November 3, 2025 07:52
4d8b40e to
f55d7f4
Compare
This was referenced Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.