pub fn central_diff<const N: usize, F>( f: &'_ dyn Fn(&[F; N]) -> Result<F, Error>, ) -> impl Fn(&[F; N]) -> Result<[F; N], Error> + '_where F: Float + FromPrimitive,