UNPKG

1.11 kBTypeScriptView Raw
1import { Tensor } from '../tensor';
2import { TensorLike } from '../types';
3/**
4 * Computes the minimum value from the input.
5 *
6 * Reduces the input along the dimensions given in `axes`. Unless `keepDims`
7 * is true, the rank of the array is reduced by 1 for each entry in `axes`.
8 * If `keepDims` is true, the reduced dimensions are retained with length 1.
9 * If `axes` has no entries, all dimensions are reduced, and an array with a
10 * single element is returned.
11 *
12 * ```js
13 * const x = tf.tensor1d([1, 2, 3]);
14 *
15 * x.min().print(); // or tf.min(x)
16 * ```
17 *
18 * ```js
19 * const x = tf.tensor2d([1, 2, 3, 4], [2, 2]);
20 *
21 * const axis = 1;
22 * x.min(axis).print(); // or tf.min(x, axis)
23 * ```
24 *
25 * @param x The input Tensor.
26 * @param axis The dimension(s) to reduce. By default it reduces
27 * all dimensions.
28 * @param keepDims If true, retains reduced dimensions with size 1.
29 *
30 * @doc {heading: 'Operations', subheading: 'Reduction'}
31 */
32declare function min_<T extends Tensor>(x: Tensor | TensorLike, axis?: number | number[], keepDims?: boolean): T;
33export declare const min: typeof min_;
34export {};