(dim = null, keepdim = false)
| 792 | } |
| 793 | |
| 794 | max(dim = null, keepdim = false) { |
| 795 | if (dim === null) { |
| 796 | // None to reduce over all dimensions. |
| 797 | const val = max(this.data)[0]; |
| 798 | return new Tensor( |
| 799 | this.type, |
| 800 | [val], |
| 801 | [ |
| 802 | /* scalar */ |
| 803 | ], |
| 804 | ); |
| 805 | } |
| 806 | const [type, result, resultDims] = reduce_helper((a, b) => Math.max(a, b), this, dim, keepdim, -Infinity); |
| 807 | return new Tensor(type, result, resultDims); |
| 808 | } |
| 809 | |
| 810 | argmin(dim = null, keepdim = false) { |
| 811 | if (dim !== null) { |
no test coverage detected