---
title: "min(alongAxes:keepRank:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mltensor/min(alongaxes:keeprank:)"
---

# min(alongAxes:keepRank:)

Returns the minimum values along the specified axes.

## Declaration

```swift
func min(alongAxes axes: Int..., keepRank: Bool = false) -> MLTensor
```

## Parameters

- `axes`: The axes to reduce.
- `keepRank`: A Boolean indicating whether to keep the reduced axes or not. The default value is false.

## Return Value

Return Value The reduced tensor.

## Discussion

Discussion let x = MLTensor(shape: [3, 2], scalars: [2, 3, 4, 5, 6, 7], scalarType: Float.self) let y = x.min(alongAxes: 0) y.shape // is [1, 2] await y.shapedArray(of: Float.self) // is [2.0 3.0]

## See Also

### Accessing the minimum, maximum and mean

- [min(keepRank:)](coreml/mltensor/min(keeprank:).md)
- [max(alongAxes:keepRank:)](coreml/mltensor/max(alongaxes:keeprank:).md)
- [max(keepRank:)](coreml/mltensor/max(keeprank:).md)
- [mean(alongAxes:keepRank:)](coreml/mltensor/mean(alongaxes:keeprank:).md)
- [mean(keepRank:)](coreml/mltensor/mean(keeprank:).md)
