(self, name)
return array, index
Returns `(array, index)` for a given field name.
Returns `(array, index)` for a given field name.
Returns ( array index ) for a given field name .
def _get_cached_array_and_index(self, name):
    """Returns `(array, index)` for a given field name."""
    named_indexer = self._get_cached_named_indexer(name)
    array = named_indexer._field  # pylint: disable=protected-access
    try:
      index = self._array_index_cache[name]
    except KeyError:
      # If we are indexing into a field relating to actuator internal states
      # then we must first remove the names of any stateless actuators.
      if name in _ACTUATOR_STATE_FIELDS:
        named_index = _filter_stateful_actuators(
            self._physics, self._named_index)
      else:
        named_index = self._named_index
      index = named_indexer._convert_key(named_index)  # pylint: disable=protected-access
      self._array_index_cache[name] = index
    return array, index
def _get_cached_array_and_index ( self , name ) : named_indexer = self . _get_cached_named_indexer ( name ) array = named_indexer . _field # pylint: disable=protected-access try : index = self . _array_index_cache [ name ] except KeyError : # If we are indexing into a field relating to actuator internal states # then we must first remove the names of any stateless actuators. if name in _ACTUATOR_STATE_FIELDS : named_index = _filter_stateful_actuators ( self . _physics , self . _named_index ) else : named_index = self . _named_index index = named_indexer . _convert_key ( named_index ) # pylint: disable=protected-access self . _array_index_cache [ name ] = index return array , index