8000 DEP: deprecate np.testing.rand by ev-br · Pull Request #6936 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DEP: deprecate np.testing.rand #6936

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 1 commit into from
Jan 4, 2016
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
7 changes: 7 additions & 0 deletions doc/release/1.11.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,10 @@ parameter in methods like ```array.flatten``` or ```array.ravel```
that were not one of the following: 'C', 'F', 'A', 'K' (note that
all of these possible values are unicode- and case-insensitive).
Such behaviour will not be allowed in future releases.

Random number generator in the ``testing`` namespace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python standard library random number generator was previously exposed in the
``testing`` namespace as ``testing.rand``. Using this generator is not
recommended and it will be removed in a future release. Use generators from
``numpy.random`` namespace instead.
3 changes: 3 additions & 0 deletions numpy/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from .nosetester import import_nose
from numpy.core import float32, empty, arange, array_repr, ndarray
from numpy.lib.utils import deprecate

if sys.version_info[0] >= 3:
from io import StringIO
Expand Down Expand Up @@ -122,6 +123,8 @@ def gisinf(x):
raise TypeError("isinf not supported for this type")
return st

@deprecate(message="numpy.testing.rand is deprecated in numpy 1.11. "
"Use numpy.random.rand instead.")
def rand(*args):
"""Returns an array of random numbers with the given shape.

Expand Down
0