cr.nimble.dsp.hard_threshold_by

cr.nimble.dsp.hard_threshold_by(x, t)[source]

Sets all entries in x to be zero which are less than t in magnitude

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

  • t (float) – The threshold value

Returns

x modified such that all values below t are set to 0

Return type

(jax.numpy.ndarray)

Note

This function doesn’t change the length of x and can be JIT compiled

See also

hard_threshold()