Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.empty

Contents

jax.numpy.empty#

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

Create an empty array.

JAX implementation ofnumpy.empty(). Because XLA cannot create anun-initialized array,jax.numpy.empty() will always return an arrayfull of zeros.

Parameters:
Returns:

Array of the specified shape and dtype, with the given device/sharding if specified.

Return type:

Array

Examples

>>>jnp.empty(4)Array([0., 0., 0., 0.], dtype=float32)>>>jnp.empty((2,3),dtype=bool)Array([[False, False, False],       [False, False, False]], dtype=bool)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp