From 3ffb884447206f920f233fd9b05b43ff203fdfca Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 18 Jan 2017 09:15:27 -0800 Subject: [PATCH] MNT: reference the proper variable in bootstrapper --- lib/matplotlib/cbook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index 055d3e2f7673..8e31699142e1 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -1941,8 +1941,8 @@ def _bootstrap_median(data, N=5000): M = len(data) percentiles = [2.5, 97.5] - ii = np.random.randint(M, size=(N, M)) - bsData = x[ii] + bs_index = np.random.randint(M, size=(N, M)) + bsData = data[bs_index] estimate = np.median(bsData, axis=1, overwrite_input=True) CI = np.percentile(estimate, percentiles)