(model)
return size_name_to_element_sizes
Returns a dict that maps size names to element sizes for ragged axes.

  Args:
    model: An instance of `mjbindings.mjModelWrapper`.

  Returns:
    A `dict` mapping from a size name (e.g. `'nv'`) to a numpy array of element
      sizes. Size names corresponding to non-ragged axes are omitted.
Returns a dict that maps size names to element sizes for ragged axes.
Returns a dict that maps size names to element sizes for ragged axes .
def _get_size_name_to_element_sizes(model):
  """Returns a dict that maps size names to element sizes for ragged axes.

  Args:
    model: An instance of `mjbindings.mjModelWrapper`.

  Returns:
    A `dict` mapping from a size name (e.g. `'nv'`) to a numpy array of element
      sizes. Size names corresponding to non-ragged axes are omitted.
  """

  size_name_to_element_sizes = {}

  for size_name, address_field_name in _RAGGED_ADDRS.items():
    addresses = getattr(model, address_field_name).ravel()
    total_length = getattr(model, size_name)
    element_sizes = np.diff(np.r_[addresses, total_length])
    size_name_to_element_sizes[size_name] = element_sizes

  return size_name_to_element_sizes
def _get_size_name_to_element_sizes ( model ) : size_name_to_element_sizes = { } for size_name , address_field_name in _RAGGED_ADDRS . items ( ) : addresses = getattr ( model , address_field_name ) . ravel ( ) total_length = getattr ( model , size_name ) element_sizes = np . diff ( np . r_ [ addresses , total_length ] ) size_name_to_element_sizes [ size_name ] = element_sizes return size_name_to_element_sizes