ベクトルのスカラー関数の勾配です。R の numDeriv::grad(func, x, method) と同等です。
numDeriv::grad(func, x, method)
grad((x) => x[0]! ** 2 + Math.sin(x[1]!), [1, 0]); // [2, 1] コピー
grad((x) => x[0]! ** 2 + Math.sin(x[1]!), [1, 0]); // [2, 1]
ベクトルのスカラー関数の勾配です。R の
numDeriv::grad(func, x, method)と同等です。