Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.zeros_like

Contents

jax.numpy.zeros_like#

jax.numpy.zeros_like(a,dtype=None,shape=None,*,device=None,out_sharding=None)[source]#

Create an array full of zeros with the same shape and dtype as an array.

JAX implementation ofnumpy.zeros_like().

Parameters:
Returns:

Array of the specified shape and dtype, on the specified device if specified.

Return type:

Array

Examples

>>>x=jnp.arange(4)>>>jnp.zeros_like(x)Array([0, 0, 0, 0], dtype=int32)>>>jnp.zeros_like(x,dtype=bool)Array([False, False, False, False], dtype=bool)>>>jnp.zeros_like(x,shape=(2,3))Array([[0, 0, 0],       [0, 0, 0]], dtype=int32)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp