8000 DEP: Deprecate `np.ma.MaskedArray.mini` by eric-wieser · Pull Request #8939 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DEP: Deprecate np.ma.MaskedArray.mini #8939

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

Merged
merged 5 commits into from
May 6, 2017

Conversation

eric-wieser
Copy link
Member
@eric-wieser eric-wieser commented Apr 13, 2017

This was untested, and the documentation did not mention how it differed from min anyway.

Fixes #8764

Also (movable to another PR on request):

  • Deprecates np.ma.minimum(x) as an alias for np.ma.minimum.reduce, because this alias does not exist for np.minimum(x) in core, and this makes the distinction between minimum and min confusing
  • Corrects the default axis of np.ma.minimum.reduce, which was different from that in core. (but not documented anywhere)

@eric-wieser
Copy link
Member Author

(appveyor was broken)

@stefanv
Copy link
Contributor
stefanv commented Apr 13, 2017

This looks good to me. The only other place in which we may want to mention the reduce is the docstring of minimum, as an example.

@eric-wieser
Copy link
Member Author

the docstring of minimum

You mean the one at np.ma.minimum.__doc__ that is currently just 'Object to calculate minima'?

@stefanv
Copy link
Contributor
stefanv commented Apr 13, 2017 via email

@homu
Copy link
Contributor
homu commented Apr 28, 2017

☔ The latest upstream changes (presumably #8996) made this pull request unmergeable. Please resolve the merge conflicts.

@charris
Copy link
Member
charris commented May 6, 2017

Needs rebase. Maybe deal with comment.

@charris charris added this to the 1.13.0 release milestone May 6, 2017
@eric-wieser
Copy link
Member Author
eric-wieser commented May 6, 2017

Is that last "BUG: default axis of np.ma.maximum was wrong" commit an API break, requiring deprecation like #8918 ?

This was untested, and the documentation did not mention how it differed from `min` anyway.

Fixes numpy#8764
This shorthand is just inconsistent with `np.maximum`, and just makes the
distinction between `np.ma.max` and `np.ma.maximum` even more confusing.

Also adds names to these objects, since 1) they're there in core, and 2) they
make the warning message more helpful.
@eric-wieser
Copy link
Member Author
eric-wieser commented May 6, 2017

Rebased, comment addressed. Kinda.

Seems easiest just to copy across the umath docstring, because that's all we do for everything else anyway.

@charris
Copy link
Member
charris commented May 6, 2017

requiring deprecation like #8918 ?

Hmm. Looks like it does as the default behavior is changed.

@charris
Copy link
Member
charris commented May 6, 2017

Mostly, I'm trying to get the deprecations in before branching 1.13.

This does not match np.maximum, which is confusing because the masked
version has no documentation at all. This uses a similar deprecation approach
to numpygh-8918, noting that the warning is only needed for arrays of more than one
dimension.

The same remarks apply to `np.ma.minimum`
Introduced by me in numpy#8918
Also, remove unecessary subclasses
@eric-wieser
Copy link
Member Author

Ok, respun as a deprecation, rather than an API-breaking bugfix

@charris charris merged commit bde121f into numpy:master May 6, 2017
@charris
Copy link
Member
charris commented May 6, 2017

Thanks Eric.

@charris charris changed the title DEP: Deprecate `np.ma.MaskedArray.mini DEP: Deprecate np.ma.MaskedArray.mini May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0