cr.nimble.dsp.build_signal_from_indices_and_values

cr.nimble.dsp.build_signal_from_indices_and_values(length, indices, values)[source]

Builds a sparse signal from its non-zero entries (specified by their indices and values)

Parameters
  • length (int) – Length of the sparse signal

  • indices (jax.numpy.ndarray) – An index vector of length K identifying non-zero entries

  • values (jax.numpy.ndarray) – Values to be stored in the non-zero positions

Returns

Resulting sparse signal such that x[indices] == values

Return type

(jax.numpy.ndarray)