traveler.core.omx.OMX.to_jax_arrays_3d#

OMX.to_jax_arrays_3d(time_periods=('EA', 'AM', 'MD', 'PM', 'EV'), time_period_sep='__', tag='TV', hashlength=20)[source]#

Load OMX matrices into JAX arrays grouped by time period.

Parameters:
  • time_periods (sequence of str, optional) – Ordered time-period labels that define the third array dimension.

  • time_period_sep (str, optional) – Separator between a matrix base name and its time-period suffix.

  • tag (str, optional) – Prefix for temporary shared-memory names.

  • hashlength (int, optional) – Length of the hash used in shared-memory names.

Returns:

Matrix arrays keyed by base name. Time-dependent matrices have a third dimension ordered according to time_periods.

Return type:

dict[str, jax.Array]

Raises:
  • OMXBadFormat – If an existing shared-memory buffer is too small for a matrix.

  • ValueError – If a matrix suffix is not present in time_periods.