pub fn central_diff_vec<F>( x: &[F], f: &'_ dyn Fn(&Vec<F>) -> Result<F, Error>, ) -> Result<Vec<F>, Error>where F: Float + FromPrimitive,