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

WIP: Add matmul ufunc with support for @ operator #865

Closed
wants to merge 1 commit into from

Conversation

jthielen
Copy link
Contributor

Adds support for __matmul__ and __rmatmul__ (the @ operator), by way of numpy matmul ufunc.

I'm not sure if the tests belong with the issues tests, or the ufunc tests. If you'd like me to move them to the ufunc tests, just let me know.

Closes #859.

@jthielen jthielen force-pushed the add-matmul-ufunc branch 2 times, most recently from 066a175 to b872544 Compare August 30, 2019 16:23
@jthielen jthielen changed the title Add matmul ufunc with support for @ operator WIP: Add matmul ufunc with support for @ operator Aug 30, 2019
@jthielen
Copy link
Contributor Author

Changed to WIP, since I need to dig into the Travis failures more, which I haven't been able to replicate locally.

Adds support for __matmul__ and __rmatmul__ (@) operator, by way of
numpy matmul ufunc (only supported in Python >= 3.5). Includes
workaround for np.matmul returning units in numpy > 1.15 and not in
numpy <= 1.15.

Closes hgrecco#859
@jthielen
Copy link
Contributor Author

There appears to be inconsistent behavior with np.matmul() between numpy versions, so I think I'll just wait on further changes to this until #764 is settled (i.e. whether or not the minimum numpy version will be bumped to 1.16).

jthielen added a commit to jthielen/pint that referenced this pull request Dec 5, 2019
@jthielen jthielen closed this Dec 5, 2019
@jthielen
Copy link
Contributor Author

jthielen commented Dec 5, 2019

Closed in favor of implementation in #905.

jthielen added a commit to jthielen/pint that referenced this pull request Dec 5, 2019
jthielen added a commit to jthielen/pint that referenced this pull request Dec 5, 2019
jthielen added a commit to jthielen/pint that referenced this pull request Dec 5, 2019
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 this pull request may close these issues.

Missing __matmul__ @ operator.
1 participant