cokelaer/spectrum

multi-taper future deprecation warning

Closed this issue · 1 comments

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.

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.