Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.float_power

Contents

jax.numpy.float_power#

jax.numpy.float_power(x,y,/)[source]#

Calculate element-wise basex exponential ofy.

JAX implementation ofnumpy.float_power.

Parameters:
  • x (ArrayLike) – scalar or array. Specifies the bases.

  • y (ArrayLike) – scalar or array. Specifies the exponents.x andy should eitherhave same shape or be broadcast compatible.

Returns:

An array containing the basex exponentials ofy, promoting to theinexact dtype.

Return type:

Array

See also

Examples

Inputs with same shape:

>>>x=jnp.array([3,1,-5])>>>y=jnp.array([2,4,-1])>>>jnp.float_power(x,y)Array([ 9. ,  1. , -0.2], dtype=float32)

Inputs with broadcast compatibility:

>>>x1=jnp.array([[2,-4,1],...[-1,2,3]])>>>y1=jnp.array([-2,1,4])>>>jnp.float_power(x1,y1)Array([[ 0.25, -4.  ,  1.  ],       [ 1.  ,  2.  , 81.  ]], dtype=float32)

jnp.float_power producesnan for negative values raised to a non-integervalues.

>>>jnp.float_power(-3,1.7)Array(nan, dtype=float32, weak_type=True)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp