Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__rsub__=__sub__ is a problem? #21

Open
BuxianChen opened this issue Oct 12, 2023 · 0 comments · May be fixed by #22
Open

__rsub__=__sub__ is a problem? #21

BuxianChen opened this issue Oct 12, 2023 · 0 comments · May be fixed by #22

Comments

@BuxianChen
Copy link

I find that in the codebase:

class Tensor(Value):
    __rsub__ = __sub__

Here is a test case:

import needle as ndl
1 - ndl.Tensor([0.5, 2.0, 3.0])   # get needle.Tensor([-0.5  1.   2. ]), which is wrong
@Guan-t7 Guan-t7 linked a pull request Nov 8, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant