fill_array_by_idx

fill_array_by_idx(array, dimension, idxs, *, unp_inner=None)

Extend a square array using specified indices.

Parameters:
  • array (ndarray | Array) – Input array to be extended.

  • dimension (int) – Dimension of the new square array.

  • idxs (List[int]) – A list of indices indicating positions in the input array to be filled.

  • unp_inner – Array namespace (numpy or jax.numpy) that performs the computation.

Return type:

ndarray | Array

Returns:

Extended square array.