Skip to content

Commit c2c503f

Browse files
committed
Require scipy >1.0 and address #5, #6, #8
1 parent 9918c11 commit c2c503f

4 files changed

Lines changed: 3 additions & 26 deletions

File tree

ghost/sigtools/convolution.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
from scipy.signal import fftconvolve
99
from multiprocessing import cpu_count
1010

11-
from .fourier import clean_scipy_cache
12-
1311
try:
1412
import pyfftw
1513
except:
@@ -77,8 +75,6 @@ def fastconv_scipy(signal, kernel, *, mode=None, fft_length=None):
7775
* fft(kernel, n=fft_length))
7876
conv_chunk = ifft(conv_fd)[..., :length + M - 1]
7977
res[..., start:start+len(conv_chunk)] += conv_chunk
80-
# Usually the cache is to blame for memory errors
81-
clean_scipy_cache()
8278

8379
if mode == 'full':
8480
newsize = tot_length
@@ -277,8 +273,6 @@ def fastconv_freq_scipy(signal_td, kernel_fd, kernel_len,
277273
conv_fd = signal_fd * kernel_fd
278274
conv_td = ifft(conv_fd)[..., :length+M-1]
279275
res[..., start:start+len(conv_td)] += conv_td
280-
# Usually the cache is to blame for memory errors
281-
clean_scipy_cache()
282276

283277
if mode == 'full':
284278
newsize = tot_length

ghost/sigtools/fourier.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,9 @@
22

33
import logging
44
import numpy as np
5-
import scipy.fftpack._fftpack as sff
65
from . import convolution
76

8-
__all__ = ['clean_scipy_cache', 'chirpz_dft']
9-
10-
def clean_scipy_cache():
11-
sff.destroy_zfft_cache()
12-
sff.destroy_zfftnd_cache()
13-
sff.destroy_drfft_cache()
14-
sff.destroy_cfft_cache()
15-
sff.destroy_cfftnd_cache()
16-
sff.destroy_rfft_cache()
17-
sff.destroy_ddct2_cache()
18-
sff.destroy_ddct1_cache()
19-
sff.destroy_dct2_cache()
20-
sff.destroy_dct1_cache()
21-
sff.destroy_ddst2_cache()
22-
sff.destroy_ddst1_cache()
23-
sff.destroy_dst2_cache()
24-
sff.destroy_dst1_cache()
7+
__all__ = ['chirpz_dft']
258

269
def chirpz_dft(x):
2710
"""Computes the DFT of a signal using the Chirp Z-transform.

ghost/wave/morlet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44
from .wavelet import Wavelet
5-
from scipy.misc import logsumexp
5+
from scipy.special import logsumexp
66
import copy
77

88
__all__ = ['Morlet']

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
license='MIT License',
2828
author='Joshua Chu',
2929
install_requires=['numpy>=1.15.0',
30-
'scipy>=0.17.0', # need to check minimum version
30+
'scipy>=1.0', # need to check minimum version
3131
'matplotlib>=3.0',
3232
],
3333
author_email='jpc6@rice.edu',

0 commit comments

Comments
 (0)