Skip to main content

bounds

bounds(dataIn: any[] | Mat | Tensor, dim: number) : Mat | any[]

param dataIn - series of numbers, an Array, matrix/Mat or Tensor to get the min and max of

param dim (optional, default=0), '0'-(bound of all), '1'-(bound of column), '2'-(bound of row)

returns: Mat | any[] - 1-D array or 2-D matrix - [min, max] or [[min1, min2], [max1, max2]], [[min1, max1], [min2, max2]]

This function finds the minimum and maximum value of the given dataIn, which is a series of numbers, an Array, a matrix/Mat or Tensor.

For 2-D Arrays/Mat objects, you can use the dim parameter to determine if you get the bounds of all values or according to a row or column.