mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[rllib] Fix doctest failure (#24343)
Lint was still failing (but only caught with doctest): ``` File "../../python/ray/rllib/utils/numpy.py", line ?, in default Failed example: tree.traverse(make_action_immutable, d, top_down=False) Exception raised: Traceback (most recent call last): File "/opt/miniconda/lib/python3.6/doctest.py", line 1330, in __run compileflags, 1), test.globs) File "<doctest default[4]>", line 1, in <module> tree.traverse(make_action_immutable, d, top_down=False) NameError: name 'make_action_immutable' is not defined ```
This commit is contained in:
parent
3c3b5390d6
commit
7a4d58d80f
1 changed files with 1 additions and 0 deletions
|
@ -322,6 +322,7 @@ def make_action_immutable(obj):
|
|||
Examples:
|
||||
>>> import tree
|
||||
>>> import numpy as np
|
||||
>>> from ray.rllib.utils.numpy import make_action_immutable
|
||||
>>> arr = np.arange(1,10)
|
||||
>>> d = dict(a = 1, b = (arr, arr))
|
||||
>>> tree.traverse(make_action_immutable, d, top_down=False) # doctest: +SKIP
|
||||
|
|
Loading…
Add table
Reference in a new issue