Skip to content

Commit e86192e

Browse files
committed
fix datatype conversion warnings
1 parent 029cc9c commit e86192e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/WMP.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def data(self, data):
352352
'data.shape[1] must be 3 or 4. One value for the pole.'
353353
' One each for the scattering and absorption residues. '
354354
'Possibly one more for a fission residue.')
355-
if not np.issubdtype(data.dtype, complex):
355+
if not np.issubdtype(data.dtype, np.complexfloating):
356356
raise TypeError('Multipole data arrays must be complex dtype')
357357
self._data = data
358358

@@ -362,7 +362,7 @@ def windows(self, windows):
362362
check_type('windows', windows, np.ndarray)
363363
if len(windows.shape) != 2:
364364
raise ValueError('Multipole windows arrays must be 2D')
365-
if not np.issubdtype(windows.dtype, int):
365+
if not np.issubdtype(windows.dtype, np.integer):
366366
raise TypeError('Multipole windows arrays must be integer'
367367
' dtype')
368368
self._windows = windows
@@ -373,7 +373,7 @@ def broaden_poly(self, broaden_poly):
373373
check_type('broaden_poly', broaden_poly, np.ndarray)
374374
if len(broaden_poly.shape) != 1:
375375
raise ValueError('Multipole broaden_poly arrays must be 1D')
376-
if not np.issubdtype(broaden_poly.dtype, bool):
376+
if not np.issubdtype(broaden_poly.dtype, np.bool_):
377377
raise TypeError('Multipole broaden_poly arrays must be boolean'
378378
' dtype')
379379
self._broaden_poly = broaden_poly
@@ -387,7 +387,7 @@ def curvefit(self, curvefit):
387387
if curvefit.shape[2] not in (2, 3): # sig_s, sig_a (maybe sig_f)
388388
raise ValueError('The third dimension of multipole curvefit'
389389
' arrays must have a length of 2 or 3')
390-
if not np.issubdtype(curvefit.dtype, float):
390+
if not np.issubdtype(curvefit.dtype, np.floating):
391391
raise TypeError('Multipole curvefit arrays must be float dtype')
392392
self._curvefit = curvefit
393393

0 commit comments

Comments
 (0)