diff options
author | Dan Schult <dschult@colgate.edu> | 2022-06-16 01:01:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 22:01:30 -0700 |
commit | 0c0eabcaebe9a4ecda37f33ee982eef2322e00cd (patch) | |
tree | 69187173e7c8002e5d715ca6d5e5edd77c3bdfff /networkx/utils | |
parent | 7f6167950849a6cf280a48250a4e1d6a72f4fbbc (diff) | |
download | networkx-0c0eabcaebe9a4ecda37f33ee982eef2322e00cd.tar.gz |
Remove decorator random_state (#5770)
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Diffstat (limited to 'networkx/utils')
-rw-r--r-- | networkx/utils/decorators.py | 22 | ||||
-rw-r--r-- | networkx/utils/tests/test_decorators.py | 1 |
2 files changed, 0 insertions, 23 deletions
diff --git a/networkx/utils/decorators.py b/networkx/utils/decorators.py index 07a4302f..6dfc9bff 100644 --- a/networkx/utils/decorators.py +++ b/networkx/utils/decorators.py @@ -16,7 +16,6 @@ __all__ = [ "not_implemented_for", "open_file", "nodes_or_number", - "random_state", "np_random_state", "py_random_state", "argmap", @@ -301,27 +300,6 @@ def np_random_state(random_state_argument): return argmap(create_random_state, random_state_argument) -def random_state(random_state_argument): - """Decorator to generate a `numpy.random.RandomState` instance. - - .. deprecated:: 2.7 - - This function is a deprecated alias for `np_random_state` and will be - removed in version 3.0. Use np_random_state instead. - """ - import warnings - - warnings.warn( - ( - "`random_state` is a deprecated alias for `np_random_state`\n" - "and will be removed in version 3.0. Use `np_random_state` instead." - ), - DeprecationWarning, - stacklevel=2, - ) - return np_random_state(random_state_argument) - - def py_random_state(random_state_argument): """Decorator to generate a random.Random instance (or equiv). diff --git a/networkx/utils/tests/test_decorators.py b/networkx/utils/tests/test_decorators.py index 865ffbd2..b89426ef 100644 --- a/networkx/utils/tests/test_decorators.py +++ b/networkx/utils/tests/test_decorators.py @@ -12,7 +12,6 @@ from networkx.utils.decorators import ( np_random_state, open_file, py_random_state, - random_state, ) from networkx.utils.misc import PythonRandomInterface |