bounds
bounds(input: any[] | Mat | Tensor, dim: Number) : Mat | any[]
param input
a series of number, or an array, matrix, tensor to get the min and max
param dim
(optional and defualt 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], [[min1, min2], [max1, max2]], [[min1, max1], [min2, max2]]
This function simply finds the minimum and maximum value of the given input, where it is a series of numbers, an array, or a matrix/Mat. For 2d arrays/Mat objects, you can use the dim parameter to determine if you get the bounds of all values or according to row or column.