jax_elementwise_function

probly.representation.sample.jax_functions.jax_elementwise_function(func: Callable, args: tuple[Any, ...], kwargs: dict[str, Any]) → Any[source]

Apply elementwise operations while preserving aligned sample axes and weights.

Parameters:
  • func – The JAX wrapper to apply.

  • args – Positional arguments to the function.

  • kwargs – Keyword arguments to the function.

Returns:

Samples when sample axes align, or native results otherwise.