Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.polyder

Contents

jax.numpy.polyder#

jax.numpy.polyder(p,m=1)[source]#

Returns the coefficients of the derivative of specified order of a polynomial.

JAX implementation ofnumpy.polyder().

Parameters:
  • p (ArrayLike) – Array of polynomials coefficients.

  • m (int) – Order of differentiation (positive integer). Default is 1. It must bespecified statically.

Returns:

An array of polynomial coefficients representing the derivative.

Return type:

Array

Note

jax.numpy.polyder() differs fromnumpy.polyder() when an integerarray is given. NumPy returns the result with dtypeint whereas JAXreturns the result with dtypefloat.

See also

Examples

The first order derivative of the polynomial\(2 x^3 - 5 x^2 + 3 x - 1\)is\(6 x^2 - 10 x +3\):

>>>p=jnp.array([2,-5,3,-1])>>>jnp.polyder(p)Array([  6., -10.,   3.], dtype=float32)

and its second order derivative is\(12 x - 10\):

>>>jnp.polyder(p,m=2)Array([ 12., -10.], dtype=float32)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp