Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.add

Contents

jax.numpy.add#

jax.numpy.add=<jnp.ufunc'add'>#

Add two arrays element-wise.

JAX implementation ofnumpy.add. This is a universal function,and supports the additional APIs described atjax.numpy.ufunc.This function provides the implementation of the+ operator forJAX arrays.

Parameters:
  • x – arrays to add. Must be broadcastable to a common shape.

  • y – arrays to add. Must be broadcastable to a common shape.

  • args (ArrayLike)

  • out (None)

  • where (None)

Returns:

Array containing the result of the element-wise addition.

Return type:

Any

Examples

Callingadd explicitly:

>>>x=jnp.arange(4)>>>jnp.add(x,10)Array([10, 11, 12, 13], dtype=int32)

Callingadd via the+ operator:

>>>x+10Array([10, 11, 12, 13], dtype=int32)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp