---
title: "pointwiseMax(_:_:)"
framework: coreml
role: symbol
role_heading: Function
path: "coreml/pointwisemax(_:_:)"
---

# pointwiseMax(_:_:)

Computes the element-wise minimum between two tensors.

## Declaration

```swift
func pointwiseMax(_ 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 = pointwiseMax(x, y) await z.shapedArray(of: Float.self) // is [6.0, 3.0, 6.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)
- [pointwiseMin(_:_:)](coreml/pointwisemin(_:_:).md)
- [withMLTensorComputePolicy(_:_:)](coreml/withmltensorcomputepolicy(_:_:).md)
