TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.nextafter

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

Return the next floating-point value after input towards other, elementwise.

The shapes of input and other must be broadcastable.

Parameters:
  • input (Tensor) – the first input tensor

  • other (Tensor) – the second input tensor

Keyword Arguments:

out (Tensor, optional) – the output tensor.

Example:

>>> eps = tensorplay.finfo(tensorplay.float32).eps
>>> tensorplay.nextafter(tensorplay.tensor([1.0, 2.0]), tensorplay.tensor([2.0, 1.0])) == tensorplay.tensor([eps + 1, 2 - eps])
tensor([True, True])

On this page

Ask DeepWiki