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

Support for @ operator ? #35

Closed
eserie opened this issue Apr 18, 2021 · 6 comments
Closed

Support for @ operator ? #35

eserie opened this issue Apr 18, 2021 · 6 comments

Comments

@eserie
Copy link
Contributor

eserie commented Apr 18, 2021

It could be great to have support for the @ operator.

Given two tensors:

a = ep.astensor(np.random.normal(size=(2, 10)))
b = ep.astensor(np.random.normal(size=(10, 3)))

The expression:

c = a.matmul(b)

could be written as:

c = a @ b
@jonasrauber
Copy link
Owner

Agree. I think all we have to do is to overwrite __matmul__ to delegate to matmul.

@eserie
Copy link
Contributor Author

eserie commented Apr 19, 2021

Ok great!
Do you want I propose a PR for that?

@jonasrauber
Copy link
Owner

Feel free to do so.

@eserie
Copy link
Contributor Author

eserie commented Apr 20, 2021

I created the PR #37.

@jonasrauber
Copy link
Owner

merged #37, so closing this :)

@eserie
Copy link
Contributor Author

eserie commented May 3, 2021

Thanks!

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

No branches or pull requests

2 participants