cyjax.util.insert_1d#

cyjax.util.insert_1d(arr, val, index)#

Insert value into array at given index.

If index is negative, counted backwards and with respect to the generated output array.

Parameters:
  • arr (Union[Array, ndarray, bool_, number]) – 1-dimensional array.

  • index (int) – Single scalar index.

  • val (Union[Array, ndarray, bool_, number, float, int]) – 0- or 1- dimensional array.

Return type:

Union[Array, ndarray, bool_, number]

Returns:

Combined array.