Skip to content

Commit 44f1add

Browse files
yotamalimuldal
authored andcommitted
Update struct_indexer documentation: it no longer returns a namedtuple.
PiperOrigin-RevId: 217113157
1 parent 0277e43 commit 44f1add

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

dm_control/mujoco/index.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def get_name_arr_and_len(dim_idx):
582582

583583

584584
def struct_indexer(struct, struct_name, size_to_axis_indexer):
585-
"""Returns a namedtuple with a `FieldIndexer` for each dynamic array field.
585+
"""Returns an object with a `FieldIndexer` attribute for each dynamic field.
586586
587587
Usage example
588588
@@ -598,8 +598,9 @@ def struct_indexer(struct, struct_name, size_to_axis_indexer):
598598
size_to_axis_indexer: dict that maps size names to `Axis` instances.
599599
600600
Returns:
601-
A `namedtuple` with a field for every dynamically sized array field mapping
602-
to a `FieldIndexer`.
601+
An object with a field for every dynamically sized array field, mapping to a
602+
`FieldIndexer`. The returned object is immutable and has an `_asdict`
603+
method.
603604
604605
Raises:
605606
ValueError: If `struct_name` is not recognized.

dm_control/mujoco/wrapper/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ENV_MJLIB_PATH = "MJLIB_PATH"
3939
ENV_MJKEY_PATH = "MJKEY_PATH"
4040

41-
MJLIB_NAME = "mujoco150"
41+
MJLIB_NAME = "mujoco200"
4242

4343

4444
def _get_shared_library_filename():
@@ -59,7 +59,7 @@ def _get_shared_library_filename():
5959

6060

6161
DEFAULT_MJLIB_PATH = os.path.join(
62-
"~/.mujoco/mjpro150/bin", _get_shared_library_filename())
62+
"~/.mujoco/mujoco200_{}/bin".format(_PLATFORM_SUFFIX), _get_shared_library_filename())
6363
DEFAULT_MJKEY_PATH = "~/.mujoco/mjkey.txt"
6464

6565

0 commit comments

Comments
 (0)