jax.numpy.ldexp

Warning

This page was created from a pull request (#9655).

jax.numpy.ldexpΒΆ

jax.numpy.ldexp(x1, x2)[source]ΒΆ

Returns x1 * 2**x2, element-wise.

LAX-backend implementation of ldexp().

Original docstring below.

The mantissas x1 and twos exponents x2 are used to construct floating point numbers x1 * 2**x2.

Parameters
  • x1 (array_like) – Array of multipliers.

  • x2 (array_like, int) – Array of twos exponents. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).

Returns

y – The result of x1 * 2**x2. This is a scalar if both x1 and x2 are scalars.

Return type

ndarray or scalar