pub fn central_diff<F>( f: &'_ dyn Fn(&Vec<F>) -> Result<F, Error>, ) -> impl Fn(&Vec<F>) -> Result<Vec<F>, Error> + '_where F: Float + FromPrimitive,