cr.nimble.dsp.sparse_approximation¶
- cr.nimble.dsp.sparse_approximation(x, K)[source]¶
Keeps only largest K non-zero entries by magnitude in a vector x
- Parameters
x (jax.numpy.ndarray) – An data vector/point
K (int) – The number of largest entries to be kept in x
- Returns
x modified so that all entries except the K largest entries are set to 0
- Return type
(jax.numpy.ndarray)