You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume f is a function that consumes numpy arrays of shape N x d and returns arrays of the form N (i.e., it is a map from R^d to R and allows for vectorized calls).
What is the most elegant way to compute $\partial^{n_0}{0}\dots\partial^{n_d}{d}f$ using numdifftools, if possible in a vectorized fashion as well?
The text was updated successfully, but these errors were encountered:
Currently there is no easy way to calculate the general multivariate partial derivative like this
with numdifftools. However, for n=1 and n=2 you can easily calculate partial derivatives
using the numdifftools wrappers Jacobian, Hessdiag and Hessian.
An easy fix to get high order partial derivatives from numdifftools is to modify the Jacobian by removing the restriction that n must be one. Then you can get reasonable reliable partial derivaties
up to n equal about 10 depending on the function you are differentiating.
Assume
f
is a function that consumes numpy arrays of shapeN x d
and returns arrays of the formN
(i.e., it is a map from R^d to R and allows for vectorized calls).What is the most elegant way to compute $\partial^{n_0}{0}\dots\partial^{n_d}{d}f$ using
numdifftools
, if possible in a vectorized fashion as well?The text was updated successfully, but these errors were encountered: