# Method max

#### static member max: Tensor<'T> -> 'T

Calculates the maximum of all elements.

##### Declaration

`static member max: src:Tensor<'T> -> 'T`

##### Parameters

Type | Name | Description |
---|---|---|

Tensor<'T> | src | The tensor containing the source values. |

##### Returns

Type | Description |
---|---|

'T | A scalar containing the result of this operation. |

##### Remarks

The maximum of all elements is calculated. An empty maximum gives the smallest possible value of the used data type.

##### Examples

```
let a = HostTensor.ofList2D [[1.0; 2.0; 3.0; 4.0]
[5.0; 6.0; 7.0; 8.0]]
let b = Tensor.min a // b = 8.0
```