To avoid confusion between standard python/numpy indexing and the bespoke indexing of State, the dunder methods __getitem__ and __setitem__ are replaced with get_timestep and set_timestep methods, respectively (as per #37).
The existing way of indexing states to retrieve a particular timestep is preserved, i.e. t at index 0, t-1 at index -1, t-2 at index -2, etc.
This special indexing is now also documented in the contributor guide (as per #60).
Also, the shape of the variables that the component contributors should expect in their intialise/run/finalise methods, and the shape of the variables returned by these methods expected by the framework are better documented (namely as per #57).
resolve #37, resolve #60, resolve #57
To avoid confusion between standard python/numpy indexing and the bespoke indexing of
State
, the dunder methods__getitem__
and__setitem__
are replaced withget_timestep
andset_timestep
methods, respectively (as per #37).The existing way of indexing states to retrieve a particular timestep is preserved, i.e. t at index 0, t-1 at index -1, t-2 at index -2, etc.
This special indexing is now also documented in the contributor guide (as per #60).
Also, the shape of the variables that the component contributors should expect in their intialise/run/finalise methods, and the shape of the variables returned by these methods expected by the framework are better documented (namely as per #57).