8000 add output argument to numpy.outer (Trac #769) · Issue #1367 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

add output argument to numpy.outer (Trac #769) #1367

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
numpy-gitbot opened this issue Oct 19, 2012 · 14 comments · Fixed by #4459
Closed

add output argument to numpy.outer (Trac #769) #1367

numpy-gitbot opened this issue Oct 19, 2012 · 14 comments · Fixed by #4459

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/769 on 2008-04-30 by trac user aisaac, assigned to unknown.

An output argument for numpy.outer would be a nice enhancement. (Motivation: I'm using outer in a loop body.)

@numpy-gitbot
Copy link
Author

Milestone changed to 1.1.0 by @jarrodmillman on 2008-05-15

@numpy-gitbot
Copy link
Author

Milestone changed to 1.2.0 by @charris on 2008-05-20

@numpy-gitbot
Copy link
Author

Milestone changed to Unscheduled by @cournape on 2008-08-12

@numpy-gitbot
Copy link
Author

@GaelVaroquaux wrote on 2008-09-04

numpy.add and numpy.multiply also would need such love. I think this ticket could be converted into 'add output argument to all ufuncs'.

@numpy-gitbot
Copy link
Author

@rkern wrote on 2008-09-04

add and multiply already take an output argument. It's just not a keyword.

@numpy-gitbot
Copy link
Author

@mwiebe wrote on 2011-03-23

Except for not supporting object arrays, this could be replaced with a call to einsum to give it an output parameter.

@charris
Copy link
Member
charris commented Feb 18, 2014

Looks like an easy fix, just replace * by multiply with out parameter.

@svmudkavi
Copy link
Contributor

@charris Did you mean this something like this?
https://github.com/Sankarshan-Mudkavi/numpy/compare/fix-gh-1367

@jaimefrio
Copy link
Member

If you try to run your code as is, it should give you a NameError: name 'out' is not defined.

You will need to add the out parameter to the function signature, document it in the docstring and add some tests to validate that it is being used properly.

@svmudkavi
Copy link
Contributor

@jaimefrio Would the tests live in test_numeric.py?

Would this be better?
https://github.com/Sankarshan-Mudkavi/numpy/compare/fix-gh-1367

@svmudkavi
Copy link
Contributor

@jaimefrio updated the docs and tests. Is this enough for a PR? (Or should the tests be more extensive?)

@jaimefrio
Copy link
Member

Your changes look good to me, but you'll have to wait until a core developer finds the time to review them and (hopefully) merge them.

@seberg
Copy link
Member
seberg commented Mar 7, 2014

It just passes through to the ufunc machinery, so should all be fine I think. Just open a pull request.

@svmudkavi
Copy link
Contributor

Will do, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
0