jax.numpy.addΒΆ

jax.numpy.add(x1, x2)ΒΆ

Add arguments element-wise.

LAX-backend implementation of add().

Original docstring below.

Parameters
  • x1 (array_like) – The arrays to be added. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).

  • x2 (array_like) – The arrays to be added. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).

Returns

add – The sum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.

Return type

ndarray or scalar