summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2019-05-11 10:29:07 -0700
committerGitHub <noreply@github.com>2019-05-11 10:29:07 -0700
commitd38d4507ac015d7994c42318868987bf414fab78 (patch)
treeab992352b67ad9cd1ca8d413cd6d59799fe428ef /numpy/lib/tests
parent3337865dd9f1c6141199577a8a7a432551a04f9e (diff)
parent92d74d04ef5de9dfa7f5c91cdb742f5e9a318bc5 (diff)
downloadnumpy-d38d4507ac015d7994c42318868987bf414fab78.tar.gz
Merge pull request #13482 from mattip/durations
TEST: add duration report to tests, speed up two outliers
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_histograms.py10
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):
"""