diff --git a/src/python/minimizers/residual_fn.rs b/src/python/minimizers/residual_fn.rs index 6b1b2c4..261630c 100644 --- a/src/python/minimizers/residual_fn.rs +++ b/src/python/minimizers/residual_fn.rs @@ -143,6 +143,10 @@ impl PyHilberSchmidtResidualFn { self.cost_fn.get_residuals(¶ms) } + pub fn num_residuals(&self, _py: Python) -> usize { + self.cost_fn.num_residuals() + } + pub fn get_grad(&self, py: Python, params: Vec) -> Py> { PyArray2::from_array(py, &self.cost_fn.get_grad(¶ms)).to_owned() }