mani_skill.trajectory.utils#

Utils for working with ManiSkill trajectory files

Submodules#

Functions#

_get_dict_len(x)

dict_to_list_of_dicts(x)

index_dict(x, i)

list_of_dicts_to_dict(x)

Convert a list of dictionaries into a dictionary of lists/arrays.

Package Contents#

mani_skill.trajectory.utils._get_dict_len(x)[source]#
mani_skill.trajectory.utils.dict_to_list_of_dicts(x)[source]#
mani_skill.trajectory.utils.index_dict(x, i)[source]#
mani_skill.trajectory.utils.list_of_dicts_to_dict(x)[source]#

Convert a list of dictionaries into a dictionary of lists/arrays.

This is the inverse operation of dict_to_list_of_dicts.

Parameters:

x – List of dictionaries with the same structure

Returns:

Dictionary where each value is a list/array containing the corresponding values from input dicts