@@ -493,7 +493,7 @@ def adaptive_weights(yk, eigvals, sides='onesided', max_iter=150):
493
493
""" )
494
494
# we'll hope this is a correct length for L
495
495
N = yk .shape [- 1 ]
496
- L = N / 2 + 1 if sides == 'onesided' else N
496
+ L = N // 2 + 1 if sides == 'onesided' else N
497
497
return (np .multiply .outer (np .sqrt (eigvals ), np .ones (L )), 2 * K )
498
498
rt_eig = np .sqrt (eigvals )
499
499
@@ -1161,8 +1161,8 @@ def fftconvolve(in1, in2, mode="full", axis=None):
1161
1161
"""
1162
1162
s1 = np .array (in1 .shape )
1163
1163
s2 = np .array (in2 .shape )
1164
- complex_result = (np .issubdtype (in1 .dtype , np .complex ) or
1165
- np .issubdtype (in2 .dtype , np .complex ))
1164
+ complex_result = (np .issubdtype (in1 .dtype , np .complex128 ) or
1165
+ np .issubdtype (in2 .dtype , np .complex128 ))
1166
1166
1167
1167
if axis is None :
1168
1168
size = s1 + s2 - 1
@@ -1206,10 +1206,10 @@ def fftconvolve(in1, in2, mode="full", axis=None):
1206
1206
# 'get' utils
1207
1207
#-----------------------------------------------------------------------------
1208
1208
def get_freqs (Fs , n ):
1209
- """Returns the center frequencies of the frequency decomposotion of a time
1209
+ """Returns the center frequencies of the frequency decomposition of a time
1210
1210
series of length n, sampled at Fs Hz"""
1211
1211
1212
- return np .linspace (0 , float ( Fs ) / 2 , float ( n ) / 2 + 1 )
1212
+ return np .linspace (0 , Fs / 2 , int ( n / 2 + 1 ) )
1213
1213
1214
1214
1215
1215
def circle_to_hz (omega , Fsamp ):
@@ -2037,8 +2037,8 @@ def zscore(time_series, axis=-1):
2037
2037
st = time_series .std (axis = axis )
2038
2038
sl = [slice (None )] * len (time_series .shape )
2039
2039
sl [axis ] = np .newaxis
2040
- zt = time_series - et [sl ]
2041
- zt /= st [sl ]
2040
+ zt = time_series - et [tuple ( sl ) ]
2041
+ zt /= st [tuple ( sl ) ]
2042
2042
return zt
2043
2043
2044
2044
0 commit comments