giagrad.Tensor.reciprocal#

Tensor.reciprocal() Tensor[source]#

Returns a new tensor with the reciprocal of the elements of data.

\[out_i = \frac{1}{data_i}\]

Examples

>>> t = Tensor.empty(3).uniform()
>>> t
tensor: [0.00142364 0.8617358  0.30606526]
>>> t.reciprocal()
tensor: [702.4239      1.1604484   3.267277 ] fn: Reciprocal