-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Expose inner1d and other generalized universal functions from numpy.core.umath_tests #16983
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
Comments
They were put there for a very particular reason - they were a simple way to test the internals of ufuncs, and that third party modules could define their own. They were definitely intended as functions to be used internally in numpy's own tests. Having said that, you're right that an |
The generalized ufuncs were external contributions to NumPy. See:
The gufuncs were native in Perl Data Language and we wanted to add them to NumPy. It was a difficult process, with NumPy developers being reluctant about it. As a compromise, obviously non-test function ended up in a test module. For the list of functions, I think all but |
Thanks for digging up the history! |
It sounds like this was before my time, and presumably before numpy moved to GitHub. Are those conversations lost to time? |
I was not a first party to those conversations. But there's some memory left, #1485 for example. And then there are threads in the mail archives. The long one is https://www.mail-archive.com/[email protected]/msg11837.html |
IIRC, Travis did the merge of the infrastructure, looks like @stefanv wrote the testing implementations (2008). IIRC, the actual implementations for linalg, came in later from ContinuumIO (Anaconda) (2012-13), because some of their customers wanted them. I don't recall much list discussion when they first appeared. |
Some of these could probably go into
|
In reply to:
Originally posted by @seberg in #13568 (comment)
Please expose
inner1d
and other generalized universal functions fromnumpy.core.umath_tests
.Except
matrix_multiply
has been re-implemented asmatmul
in NumPy 1.10. Perhaps move theumath_tests
module next tomatmul
module under a new name?Originally, these functions were placed in
umath_tests
module for no particular reason. They are not test functions by any means, in fact, they are very useful functions sometimes. They make corresponding operations on "stacked arrays" faster and/or using less memory.It seems like gufuncs have been gradually gaining acceptance.
numpy.linalg
was upgraded to gufuncs in NumPy1.8. And #11492 "Use gufuncs for partition, sort, etc., so they can be overridden with__array_ufunc__
" is on the road map.Why remove several useful gufuncs? Perhaps even improve
inner1d
to use BLAS, likematmul
?The text was updated successfully, but these errors were encountered: