Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.ones

Contents

jax.numpy.ones#

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

Create an array full of ones.

JAX implementation ofnumpy.ones().

Parameters:
Returns:

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

Return type:

Array

Examples

>>>jnp.ones(4)Array([1., 1., 1., 1.], dtype=float32)>>>jnp.ones((2,3),dtype=bool)Array([[ True,  True,  True],       [ True,  True,  True]], dtype=bool)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp