diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-05-19 09:34:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 09:34:58 +0300 |
commit | ecb402499dba2d105b2714a55259352c31a62bd5 (patch) | |
tree | bcf388f945fc2eb9d4c151f776e030a65fb7fed7 /numpy/lib/tests/test_histograms.py | |
parent | db595a0c4064956d2f2f904ed4a76443322bb7e9 (diff) | |
parent | 7495de475c8c578a0c39b09bc55a88a93aa1985a (diff) | |
download | numpy-ecb402499dba2d105b2714a55259352c31a62bd5.tar.gz |
Merge branch 'master' into npy-2.1
Diffstat (limited to 'numpy/lib/tests/test_histograms.py')
-rw-r--r-- | numpy/lib/tests/test_histograms.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/numpy/lib/tests/test_histograms.py b/numpy/lib/tests/test_histograms.py index c96b01d42..afaa526af 100644 --- a/numpy/lib/tests/test_histograms.py +++ b/numpy/lib/tests/test_histograms.py @@ -554,15 +554,11 @@ class TestHistogramOptimBinNums(object): return a / (a + b) ll = [[nbins_ratio(seed, size) for size in np.geomspace(start=10, stop=100, num=4).round().astype(int)] - for seed in range(256)] + for seed in range(10)] # the average difference between the two methods decreases as the dataset size increases. - assert_almost_equal(abs(np.mean(ll, axis=0) - 0.5), - [0.1065248, - 0.0968844, - 0.0331818, - 0.0178057], - decimal=3) + avg = abs(np.mean(ll, axis=0) - 0.5) + assert_almost_equal(avg, [0.15, 0.09, 0.08, 0.03], decimal=2) def test_simple_range(self): """ |