interp_utils ====================== .. py:module:: jaxns.internals.interp_utils .. rubric:: :code:`jaxns.internals.interp_utils` .. rubric:: Module Contents .. py:function:: apply_interp(x, i0, alpha0, i1, alpha1, axis = 0) Apply interpolation alpha given axis. :param x: nd-array :param i0: [N] or scalar :param alpha0: [N] or scalar :param i1: [N] or scalar :param alpha1: [N] or scalar :param axis: axis to take along :returns: [N] or scalar interpolated along axis .. py:function:: left_broadcast_multiply(x, y, axis = 0) Left broadcast multiply of two arrays. Equivalent to right-padding before multiply :param x: [..., a,b,c,...] :param y: [a, b] :returns: [..., a, b, c, ...] .. py:function:: get_interp_indices_and_weights(x, xp, regular_grid = False) One-dimensional linear interpolation. Outside bounds is also linear from nearest two points. :param x: the x-coordinates at which to evaluate the interpolated values :param xp: the x-coordinates of the data points, must be increasing :returns: the interpolated values, same shape as `x` .. py:class:: InterpolatedArray .. py:attribute:: x :type: jax.Array .. py:attribute:: values :type: jax.Array .. py:attribute:: axis :type: int :value: 0 .. py:attribute:: regular_grid :type: bool :value: False .. py:method:: __post_init__() .. py:property:: shape .. py:method:: __call__(time) Interpolate at time based on input times. :param time: time to evaluate at. :returns: value at given time