Tensor.reciprocal()
Returns the reciprocal of the elements of the input tensor, element-wise.
Usage
from tinygrad.tensor import Tensor
a1 = Tensor([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
a1 = a1.reciprocal()
print(a1.numpy())
Return value
[[1. 0.5 0.33333334]
[0.25 0.2 0.16666667]
[0.14285715 0.125 0.11111111]]