Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81075b5

Browse files
authored
Merge pull request #7868 from phobson/fix-boxplot-bootstrapper
MNT: reference the proper variable in bootstrapper
2 parents 19a830e + 3ffb884 commit 81075b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/cbook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,8 +1941,8 @@ def _bootstrap_median(data, N=5000):
19411941
M = len(data)
19421942
percentiles = [2.5, 97.5]
19431943

1944-
ii = np.random.randint(M, size=(N, M))
1945-
bsData = x[ii]
1944+
bs_index = np.random.randint(M, size=(N, M))
1945+
bsData = data[bs_index]
19461946
estimate = np.median(bsData, axis=1, overwrite_input=True)
19471947

19481948
CI = np.percentile(estimate, percentiles)

0 commit comments

Comments
 (0)