Skip to content

Commit c2b6309

Browse files
committed
Remove deprecated scipy.scoreatpercentile.
1 parent cc97e2e commit c2b6309

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lap/tests/test_utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import numpy as np
22
import os
33
from gzip import GzipFile
4-
from scipy.stats import scoreatpercentile
54

65

76
def make_hard(cost, lo, hi):
@@ -40,7 +39,7 @@ def get_sparse_int(sz, rng, sparsity, hard=True, seed=1299821):
4039
if hard is True:
4140
cost = make_hard(cost, 0, rng)
4241
mask = np.random.rand(sz, sz)
43-
thresh = scoreatpercentile(
42+
thresh = np.percentile(
4443
mask.flat, max(0, (sparsity - sz/float(sz*sz)) * 100.))
4544
mask = mask < thresh
4645
# Make sure there exists a solution.

0 commit comments

Comments
 (0)