From fbb652c047632fdbf2c895184d15b7087d6b38b7 Mon Sep 17 00:00:00 2001 From: Chuck Daniels Date: Sun, 9 Jun 2024 10:40:02 -0400 Subject: [PATCH] Order code terms to match order of equation terms Reverse the order of the 2nd and 3rd terms in the code corresponding to the finite difference estimate of the 2nd derivative of a function to match the order of the terms in the equation. --- core/numpy/numpy-broadcasting.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/numpy/numpy-broadcasting.ipynb b/core/numpy/numpy-broadcasting.ipynb index ee6bee2ac..1a871acbd 100644 --- a/core/numpy/numpy-broadcasting.ipynb +++ b/core/numpy/numpy-broadcasting.ipynb @@ -587,7 +587,7 @@ "metadata": {}, "outputs": [], "source": [ - "2 * a[1:-1] - a[:-2] - a[2:]" + "2 * a[1:-1] - a[2:] - a[:-2]" ] }, {