rosen_hess_prod#
- scipy.optimize.rosen_hess_prod(x, p)[source]#
- Product of the Hessian matrix of the Rosenbrock function with a vector. - Parameters:
- xarray_like
- 1-D array of points at which the Hessian matrix is to be computed. 
- parray_like
- 1-D array, the vector to be multiplied by the Hessian matrix. 
 
- Returns:
- rosen_hess_prodndarray
- The Hessian matrix of the Rosenbrock function at x multiplied by the vector p. 
 
 - See also - Notes - rosen_hess_prodhas experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable- SCIPY_ARRAY_API=1and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.- Library - CPU - GPU - NumPy - ✅ - n/a - CuPy - n/a - ✅ - PyTorch - ✅ - ✅ - JAX - ⛔ - ⛔ - Dask - ✅ - n/a - See Support for the array API standard for more information. - Examples - >>> import numpy as np >>> from scipy.optimize import rosen_hess_prod >>> X = 0.1 * np.arange(9) >>> p = 0.5 * np.arange(9) >>> rosen_hess_prod(X, p) array([ -0., 27., -10., -95., -192., -265., -278., -195., -180.])