Tensor.maximum()
Returns the maximum value of the tensor, element-wise.
Usage
from tinygrad.tensor import Tensor
a1 = Tensor([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
a1 = a1.maximum(5)
print(a1.numpy())
Return value
[[5. 5. 5.]
[5. 5. 6.]
[7. 8. 9.]]