traveler.core.typing.CategoricalArray.from_codes_predefined#
- classmethod CategoricalArray.from_codes_predefined(codes, mark, store, jax_check=True)[source]#
Create a CategoricalArray from predefined categories in the store.
- Parameters:
codes (jax.Array) – The codes representing the categories.
mark (str) – The tag identifying the predefined category set in the store.
store (Any) – The store containing the predefined categories.
jax_check (bool, optional) – Whether to perform JAX checks on the codes. Default is True. Set to False if codes are already validated or if using JAX tracing.
- Returns:
The created CategoricalArray instance.
- Return type: