TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.log

tensorplay.functional.log(input, *, out=None) → Tensor[source]

Returns a new tensor with the natural logarithm of the elements of input.

yi=log⁡e(xi)y_{i} = \log_{e} (x_{i})
Parameters:

input (Tensor) – the input tensor.

Keyword Arguments:

out (Tensor, optional) – the output tensor.

Example:

>>> a = tensorplay.rand(5) * 5
>>> a
tensor([4.7767, 4.3234, 1.2156, 0.2411, 4.5739])
>>> tensorplay.log(a)
tensor([ 1.5637,  1.4640,  0.1952, -1.4226,  1.5204])

On this page

Ask DeepWiki