CDTK.Tools.NumericalDerivatives module
- CDTK.Tools.NumericalDerivatives.gradient(f, x, ms=None, step=0.1, fast=True)[source]
Return an array with the gradient in x along the directions in modes
f – function with respect the gradient is taken x – coordinates to take the gradient ms – list of arrays with orthonormal directions step – step to take in the numerical differentiation
- CDTK.Tools.NumericalDerivatives.hessian(f, x, ms=None, step=0.1, fast=True)[source]
Return an array with the hessian in x along the directions in modes
f – function with respect the hessian taken x – coordinates to take the hessian ms – list of arrays with orthonormal directions step – step to take in the numerical differentiation