def test_extents_weighted():
xs = np.random.uniform(low=-4, high=4, size=100000)
weights = norm.pdf(xs)
low, high = get_extents(xs, weights)
threshold = 0.5
assert np.abs(low + 4) < threshold
assert np.abs(high - 4) < threshold
评论列表
文章目录