jaxoplanet.light_curves.utils

jaxoplanet.light_curves.utils#

Functions#

vectorize(→ jaxoplanet.light_curves.types.LightCurveFunc)

Vectorize a scalar light curve function to work with array inputs

Module Contents#

jaxoplanet.light_curves.utils.vectorize(func: jaxoplanet.light_curves.types.LightCurveFunc) jaxoplanet.light_curves.types.LightCurveFunc[source]#

Vectorize a scalar light curve function to work with array inputs

Like jax.numpy.vectorize, this automatically wraps a function which operates on a scalar to handle array inputs. Unlike that function, this handles Scalar inputs and outputs, but it only broadcasts the first input (time).

Parameters:

func – A function which takes a scalar Scalar time as the first input

Returns:

An updated function which can operate on Scalar times of any shape