A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.polyder.html below:

jax.numpy.polyder — JAX documentation

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

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

JAX implementation of numpy.polyder().

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

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

Returns:

An array of polynomial coefficients representing the derivative.

Return type:

Array

Note

jax.numpy.polyder() differs from numpy.polyder() when an integer array is given. NumPy returns the result with dtype int whereas JAX returns the result with dtype float.

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)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4