pycopancore.private._trajectory_dictionary module

_Trajectory Dictionary Class.

This class defines the trajectory dictionary class, that is used to save trajectories in the runner. It inherits from dictionary and its aim is to have an extra save and load function, so that these processes are easily done by the user.

class _TrajectoryDictionary[source]

Bases: dict

Trajectory Dictionary Class.

Inherits from dict

save(*, filename, path='./', data_type='pickle')[source]

Save function.

Use this to save a trajectory in some format.

Parameters:
  • filename (string) – name of the file saved

  • path (string) – path or directory to save to

  • data_type (string) – ‘pickle’, ‘json’ or ‘hdf5’

traverse(item, tree_types=(<class 'list'>, <class 'tuple'>))[source]