Skip to content

Resolve "Strange looking type of trajs in data_generation.py"

Update sysvars to have a better initialization. I got distracted and tweaked the API a bit:

  1. generate_traj and generate_batch are no longer class methods, but normal methods (i.e. they must be called on an instance). IMO this makes the initialization values more clear, avoids needing to pass **asdict(instance) as kwargs.
  2. tree_map_relaxed can now take an optional typ kwarg, and this allows direct casting to Traj, Batch, or TrajBatch. If not given, the type of the first tree argument is used. The goal is to make it easier to cast when needing to tree_map something that doesn't work with generate_* methods.

Closes #16 (closed)

Merge request reports