jaxoplanet.light_curves.utils
#
Module Contents#
Functions#
|
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 handlesQuantity
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