(dim = null, keepdim = false)
| 776 | } |
| 777 | |
| 778 | min(dim = null, keepdim = false) { |
| 779 | if (dim === null) { |
| 780 | // None to reduce over all dimensions. |
| 781 | const val = min(this.data)[0]; |
| 782 | return new Tensor( |
| 783 | this.type, |
| 784 | [val], |
| 785 | [ |
| 786 | /* scalar */ |
| 787 | ], |
| 788 | ); |
| 789 | } |
| 790 | const [type, result, resultDims] = reduce_helper((a, b) => Math.min(a, b), this, dim, keepdim, Infinity); |
| 791 | return new Tensor(type, result, resultDims); |
| 792 | } |
| 793 | |
| 794 | max(dim = null, keepdim = false) { |
| 795 | if (dim === null) { |
no test coverage detected