jaxoplanet.light_curves.utils

jaxoplanet.light_curves.utils#

Module Contents#

Functions#

vectorize(→ jaxoplanet.light_curves.types.LightCurveFunc)

Vectorize a scalar light curve function to work with array inputs

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 Quantity inputs and outputs, but it only broadcasts the first input (time).

Parameters:

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

Returns:

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