UNPKG

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