Skip to main content

is_local_min

is_local_min(matrix: any[] | Mat | Tensor, dim: number) : Mat | Tensor

param matrix an Array, Mat or Tensor, i.e. the structure to find the local minima locations

param dim '0'-(row) or '1'-(column) - the direction to traverse for finding the local minima

returns - Mat | Tensor - a Mat or Tensor with '1' denoting a local min value and '0' denoting otherwise.

Notice if dim is 1, then matrix must be at least 2-D.

This function finds all the local minimum value locations of the input.