MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / get_attributes

Method get_attributes

dm_control/mjcf/element.py:552–558  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

550 prefix_root, precision=precision, zero_threshold=zero_threshold)
551
552 def get_attributes(self):
553 fix_attribute_name = (
554 lambda name: constants.DCLASS if name == constants.CLASS else name)
555 return collections.OrderedDict(
556 [(fix_attribute_name(name), self._get_attribute(name))
557 for name in self._spec.attributes.keys()
558 if self._get_attribute(name) is not None])
559
560 def _set_attribute(self, attribute_name, value):
561 self._check_valid_attribute(attribute_name)

Callers 2

_sync_attributesMethod · 0.45

Calls 2

_get_attributeMethod · 0.95
keysMethod · 0.45

Tested by

no test coverage detected