Skip to content

Commit

Permalink
Require scipy >1.0 and address #5, #6, #8
Browse files Browse the repository at this point in the history
  • Loading branch information
jchutrue committed Feb 2, 2021
1 parent 9918c11 commit c2c503f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
6 changes: 0 additions & 6 deletions ghost/sigtools/convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
from scipy.signal import fftconvolve
from multiprocessing import cpu_count

from .fourier import clean_scipy_cache

try:
import pyfftw
except:
Expand Down Expand Up @@ -77,8 +75,6 @@ def fastconv_scipy(signal, kernel, *, mode=None, fft_length=None):
* fft(kernel, n=fft_length))
conv_chunk = ifft(conv_fd)[..., :length + M - 1]
res[..., start:start+len(conv_chunk)] += conv_chunk
# Usually the cache is to blame for memory errors
clean_scipy_cache()

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

if mode == 'full':
newsize = tot_length
Expand Down
19 changes: 1 addition & 18 deletions ghost/sigtools/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,9 @@

import logging
import numpy as np
import scipy.fftpack._fftpack as sff
from . import convolution

__all__ = ['clean_scipy_cache', 'chirpz_dft']

def clean_scipy_cache():
sff.destroy_zfft_cache()
sff.destroy_zfftnd_cache()
sff.destroy_drfft_cache()
sff.destroy_cfft_cache()
sff.destroy_cfftnd_cache()
sff.destroy_rfft_cache()
sff.destroy_ddct2_cache()
sff.destroy_ddct1_cache()
sff.destroy_dct2_cache()
sff.destroy_dct1_cache()
sff.destroy_ddst2_cache()
sff.destroy_ddst1_cache()
sff.destroy_dst2_cache()
sff.destroy_dst1_cache()
__all__ = ['chirpz_dft']

def chirpz_dft(x):
"""Computes the DFT of a signal using the Chirp Z-transform.
Expand Down
2 changes: 1 addition & 1 deletion ghost/wave/morlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np
from .wavelet import Wavelet
from scipy.misc import logsumexp
from scipy.special import logsumexp
import copy

__all__ = ['Morlet']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
license='MIT License',
author='Joshua Chu',
install_requires=['numpy>=1.15.0',
'scipy>=0.17.0', # need to check minimum version
'scipy>=1.0', # need to check minimum version
'matplotlib>=3.0',
],
author_email='[email protected]',
Expand Down

0 comments on commit c2c503f

Please sign in to comment.