Skip to content

Fixes axis and out parameters on Quantity methods - #87

Merged
ddale merged 2 commits into
python-quantities:masterfrom
burnpanck:fix-min-max-axis
Dec 16, 2015
Merged

ddale merged 2 commits into
python-quantities:masterfrom
burnpanck:fix-min-max-axis

Conversation

@burnpanck

Copy link
Copy Markdown
Contributor

Most importantly, this PR fixes #69: The axis parameters that did not get forwarded on min, max and ptp. It also properly implements the out parameter, guaranteeing that the returned Quantity is indeed the same as the passed one.

@burnpanck burnpanck mentioned this pull request Jun 9, 2015
ddale added a commit that referenced this pull request Dec 16, 2015
Fixes axis and out parameters on Quantity methods
@ddale
ddale merged commit 0fa5d78 into python-quantities:master Dec 16, 2015
@ddale

ddale commented Dec 16, 2015

Copy link
Copy Markdown
Member

Thanks!

@burnpanck

Copy link
Copy Markdown
Contributor Author

Ah, looking again at this PR; should out maybe behave differently? The current implementation changes the units of the out array to match what would be chosen if no out is specified. However, one could also interpret a function call with out specified as a request to place the result into that array, and in the units given on the out array! That would in some sense match what happens if you specify an out array with a different dtype than what would normally be returned: dtype cannot be changed, so the output is instead cast into that dtype. What do you think?

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.

numpy amax (aka max) doesn't get passed axis parameter

2 participants