cr.nimble.dsp.hard_threshold_sorted

cr.nimble.dsp.hard_threshold_sorted(x, K)[source]

Returns the sorted indices and corresponding values of largest K non-zero entries in a vector x

Parameters
  • x (jax.numpy.ndarray) – A sparse/compressible signal

  • K (int) – The number of largest entries to be kept in x

Returns

A tuple comprising of:
  • The indices of K largest entries in x sorted in ascending order

  • Corresponding entries in x

Return type

(jax.numpy.ndarray, jax.numpy.ndarray)

See also

hard_threshold()