(self, physics_state)
Sets the physics state.

    Args:
      physics_state: NumPy array containing the full physics simulation state.

    Raises:
      ValueError: If `physics_state` has invalid size.
Sets the physics state.
Sets the physics state .
def set_state(self, physics_state):
    """Sets the physics state.

    Args:
      physics_state: NumPy array containing the full physics simulation state.

    Raises:
      ValueError: If `physics_state` has invalid size.
    """
    state_items = self._physics_state_items()

    expected_shape = (sum(item.size for item in state_items),)
    if expected_shape != physics_state.shape:
      raise ValueError('Input physics state has shape {}. Expected {}.'.format(
          physics_state.shape, expected_shape))

    start = 0
    for state_item in state_items:
      size = state_item.size
      np.copyto(state_item, physics_state[start:start + size])
      start += size
def set_state ( self , physics_state ) : state_items = self . _physics_state_items ( ) expected_shape = ( sum ( item . size for item in state_items ) , ) if expected_shape != physics_state . shape : raise ValueError ( 'Input physics state has shape {}. Expected {}.' . format ( physics_state . shape , expected_shape ) ) start = 0 for state_item in state_items : size = state_item . size np . copyto ( state_item , physics_state [ start : start + size ] ) start += size