Skip to content

Commit

Permalink
fix datatype conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
liangjg committed Aug 19, 2018
1 parent 029cc9c commit e86192e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/WMP.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def data(self, data):
'data.shape[1] must be 3 or 4. One value for the pole.'
' One each for the scattering and absorption residues. '
'Possibly one more for a fission residue.')
if not np.issubdtype(data.dtype, complex):
if not np.issubdtype(data.dtype, np.complexfloating):
raise TypeError('Multipole data arrays must be complex dtype')
self._data = data

Expand All @@ -362,7 +362,7 @@ def windows(self, windows):
check_type('windows', windows, np.ndarray)
if len(windows.shape) != 2:
raise ValueError('Multipole windows arrays must be 2D')
if not np.issubdtype(windows.dtype, int):
if not np.issubdtype(windows.dtype, np.integer):
raise TypeError('Multipole windows arrays must be integer'
' dtype')
self._windows = windows
Expand All @@ -373,7 +373,7 @@ def broaden_poly(self, broaden_poly):
check_type('broaden_poly', broaden_poly, np.ndarray)
if len(broaden_poly.shape) != 1:
raise ValueError('Multipole broaden_poly arrays must be 1D')
if not np.issubdtype(broaden_poly.dtype, bool):
if not np.issubdtype(broaden_poly.dtype, np.bool_):
raise TypeError('Multipole broaden_poly arrays must be boolean'
' dtype')
self._broaden_poly = broaden_poly
Expand All @@ -387,7 +387,7 @@ def curvefit(self, curvefit):
if curvefit.shape[2] not in (2, 3): # sig_s, sig_a (maybe sig_f)
raise ValueError('The third dimension of multipole curvefit'
' arrays must have a length of 2 or 3')
if not np.issubdtype(curvefit.dtype, float):
if not np.issubdtype(curvefit.dtype, np.floating):
raise TypeError('Multipole curvefit arrays must be float dtype')
self._curvefit = curvefit

Expand Down

0 comments on commit e86192e

Please sign in to comment.