Skip to content

Commit 4ff8ccd

Browse files
committed
FIX: Try again [build wheels]
1 parent 73c6c13 commit 4ff8ccd

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

nitime/index_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
'tril_indices_from', 'triu_indices', 'triu_indices_from',
77
]
88

9-
from numpy.core.numeric import asanyarray, subtract, arange, \
9+
from numpy import asanyarray, subtract, arange, \
1010
greater_equal, multiply, ones, asarray, where
1111

12-
# Need to import numpy for the doctests!
13-
import numpy as np
12+
# Need to import numpy for the doctests!
13+
import numpy as np
1414

1515
def tri(N, M=None, k=0, dtype=float):
1616
"""

nitime/tests/test_utils.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,26 +230,27 @@ def test_detect_lines():
230230
"""
231231
Tests detect_lines utility in the reliable low-SNR scenario.
232232
"""
233+
rng = np.random.RandomState(0)
233234
N = 1000
234235
fft_pow = int( np.ceil(np.log2(N) + 2) )
235236
NW = 4
236-
lines = np.sort(np.random.randint(100, 2**(fft_pow-4), size=(3,)))
237+
lines = np.sort(rng.randint(100, 2**(fft_pow-4), size=(3,)))
237238
while np.any( np.diff(lines) < 2*NW ):
238-
lines = np.sort(np.random.randint(2**(fft_pow-4), size=(3,)))
239+
lines = np.sort(rng.randint(2**(fft_pow-4), size=(3,)))
239240
lines = lines.astype('d')
240-
#lines += np.random.randn(3) # displace from grid locations
241+
#lines += rng.randn(3) # displace from grid locations
241242
lines /= 2.0**(fft_pow-2) # ensure they are well separated
242243

243-
phs = np.random.rand(3) * 2 * np.pi
244+
phs = rng.rand(3) * 2 * np.pi
244245
# amps approximately such that RMS power = 1 +/- N(0,1)
245-
amps = np.sqrt(2)/2 + np.abs( np.random.randn(3) )
246+
amps = np.sqrt(2)/2 + np.abs( rng.randn(3) )
246247

247248
nz_sig = 0.05
248249
tx = np.arange(N)
249250

250251
harmonics = amps[:,None]*np.cos( 2*np.pi*tx*lines[:,None] + phs[:,None] )
251252
harmonic = np.sum(harmonics, axis=0)
252-
nz = np.random.randn(N) * nz_sig
253+
nz = rng.randn(N) * nz_sig
253254
sig = harmonic + nz
254255

255256
f, b = utils.detect_lines(sig, (NW, 2*NW), low_bias=True, NFFT=2**fft_pow)
@@ -286,11 +287,13 @@ def test_detect_lines_2dmode():
286287
Test multi-sequence operation
287288
"""
288289

290+
rng = np.random.RandomState(0)
291+
289292
N = 1000
290293

291-
sig = np.cos( 2*np.pi*np.arange(N) * 20./N ) + np.random.randn(N) * .01
294+
sig = np.cos( 2*np.pi*np.arange(N) * 20./N ) + rng.randn(N) * .01
292295

293-
sig2d = np.row_stack( (sig, sig, sig) )
296+
sig2d = np.vstack( (sig, sig, sig) )
294297

295298
lines = utils.detect_lines(sig2d, (4, 8), low_bias=True, NFFT=2**12)
296299

0 commit comments

Comments
 (0)