cokelaer / spectrum

Spectral Analysis in Python
http://pyspectrum.readthedocs.io
BSD 3-Clause "New" or "Revised" License
339 stars 90 forks source link

multi-taper future deprecation warning #49

Closed xaratustrah closed 5 years ago

xaratustrah commented 6 years ago

There seems to be an issue regarding complex valued type conversion in mtm.py:

/Users/XXX/Library/anaconda3/lib/python3.6/site-packages/spectrum/mtm.py:529: FutureWarning: Conversion of the second argument of issubdtype from `complex` to `np.complexfloating` is deprecated. In future, it will be treated as `np.complex128 == np.dtype(complex).type`.
  complex_result = (np.issubdtype(in1.dtype, np.complex) or
/Users/XXX/Library/anaconda3/lib/python3.6/site-packages/spectrum/mtm.py:530: FutureWarning: Conversion of the second argument of issubdtype from `complex` to `np.complexfloating` is deprecated. In future, it will be treated as `np.complex128 == np.dtype(complex).type`.
  np.issubdtype(in2.dtype, np.complex))

I am using anaconda python 3.6.5 on macos.

anielsen001 commented 6 years ago

I made a pull request which will solve this issue. The _fftconvolve function is similar to the scipy.signal.fftconvolve function and the same change used there will work here.