8000 Quantity numpy ufunc additions: ufunc.at, reduce, reduceat, accumulate, outer by mhvk · Pull Request #2948 · astropy/astropy · GitHub
[go: up one dir, main page]

Skip to content

Quantity numpy ufunc additions: ufunc.at, reduce, reduceat, accumulate, outer #2948

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

Closed
wants to merge 5 commits into from

Conversation

mhvk
Copy link
Contributor
@mhvk mhvk commented Sep 16, 2014

This follows on the introdoction of __numpy_ufunc__ in #2583 (so only look at last commit), adding support to Quantity for ufunc methods [1]: ufunc.at, reduce, reduceat, accumulate, and outer. It think it will be useful, though one problem is that I do not know how to support this without __numpy_ufunc__; thus, it will only work in numpy >=1.10.

[1] http://docs.scipy.org/doc/numpy/reference/ufuncs.html#methods

@mhvk mhvk force-pushed the quantity-numpy-ufunc-additions branch from 69f42ce to fc14c4a Compare September 16, 2014 12:58
@mhvk mhvk changed the title Quantity numpy ufunc additions: ufunc.at, reduce, reduceat, accumulate Quantity numpy ufunc additions: ufunc.at, reduce, reduceat, accumulate, outer Sep 16, 2014
@mdboom
Copy link
Contributor
mdboom commented Mar 23, 2015

I think this is fine, but it's sort of a documentation issue -- people may write code with Numpy 1.10 and be surprised when it doesn't work with earlier versions. Don't know how best to communicate that, though.

@mdboom mdboom mentioned this pull request Mar 23, 2015
@mhvk
Copy link
Contributor Author
mhvk commented Mar 23, 2015

@mdboom - indeed, the problem is that with previous numpy versions, there is no way to interact with these ufunc methods, so also no way to warn users that it doesn't work. Obviously, I'll add to the documentation once #2583 is in and this PR can be considered by itself.

@mhvk mhvk force-pushed the quantity-numpy-ufunc-additions branch from fc14c4a to b773713 Compare March 24, 2015 01:07
@mhvk
Copy link
Contributor Author
mhvk commented Mar 24, 2015

Rebased to use the new converters instead of scales. Of course, still needs #2583 to be merged first.

@mhvk
Copy link
Contributor Author
mhvk commented Apr 28, 2017

Closing since this is now part of #2583

@mhvk mhvk closed this Apr 28, 2017
@mhvk mhvk deleted the quantity-numpy-ufunc-additions branch April 28, 2017 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0