10000 MAINT: Move histogram and histogramdd into their own module by eric-wieser · Pull Request #10186 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Move histogram and histogramdd into their own module #10186

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 3 commits into from
Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/release/1.15.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ builtin arbitrary-precision `Decimal` and `long` types.
Improvements
============

``histogram`` and ``histogramdd` functions have moved to ``np.lib.histograms``
------------------------------------------------------------------------------
These were originally found in ``np.lib.function_base``. They are still
available under their un-scoped ``np.histogram(dd)`` names, and
to maintain compatibility, aliased at ``np.lib.function_base.histogram(dd)``.

Code that does ``from np.lib.function_base import *`` will need to be updated
with the new location, and should consider not using ``import *`` in future.
Copy link
Member Author
@eric-wieser eric-wieser Dec 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably we can get away with this? The alternative is to have duplicate entries in __all__, but we already do that (#10198)...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with this.


``MaskedArray.astype`` now is identical to ``ndarray.astype``
-------------------------------------------------------------
This means it takes all the same arguments, making more code written for
Expand Down
2 changes: 2 additions & 0 deletions numpy/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .stride_tricks import *
from .twodim_base import *
from .ufunclike import *
from .histograms import *

from . import scimath as emath
from .polynomial import *
Expand Down Expand Up @@ -43,6 +44,7 @@
__all__ += npyio.__all__
__all__ += financial.__all__
__all__ += nanfunctions.__all__
__all__ += histograms.__all__

from numpy.testing import _numpy_tester
test = _numpy_tester().test
Expand Down
Loading
0