---
title: "pointwiseMin(_:_:)"
framework: coreml
role: symbol
role_heading: Function
path: "coreml/pointwisemin(_:_:)"
---

# pointwiseMin(_:_:)

Computes the element-wise minimum of two tensors.

## Declaration

```swift
func pointwiseMin(_ lhs: MLTensor, _ rhs: MLTensor) -> MLTensor
```

## Discussion

Discussion For example: let x = MLTensor([1.0, 3.0, 6.0]) let y = MLTensor([6.0, 3.0, 1.0]) let z = pointwiseMin(x, y) await z.shapedArray(of: Float.self) // is [1.0, 3.0, 1.0] Shapes must be broadcastable, where the broadcasted shape becomes the shape of the output.

## See Also

### Model tensor

- [MLTensor](coreml/mltensor.md)
- [MLTensorScalar](coreml/mltensorscalar.md)
- [MLTensorRangeExpression](coreml/mltensorrangeexpression.md)
- [pointwiseMax(_:_:)](coreml/pointwisemax(_:_:).md)
- [withMLTensorComputePolicy(_:_:)](coreml/withmltensorcomputepolicy(_:_:).md)
