Skip to content

Commit e77225d

Browse files
authored
py: fix dtype check in simple interface (#559)
1 parent a679d6d commit e77225d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/finufft/finufft/_interfaces.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,9 @@ def destroy(plan):
513513
### invoke guru interface, this function is used for simple interfaces
514514
def invoke_guru(dim,tp,x,y,z,c,s,t,u,f,isign,eps,n_modes,**kwargs):
515515
# infer dtype from x
516-
if x.dtype is np.dtype('float64'):
516+
if x.dtype == np.dtype('float64'):
517517
pdtype = 'complex128'
518-
elif x.dtype is np.dtype('float32'):
518+
elif x.dtype == np.dtype('float32'):
519519
pdtype = 'complex64'
520520
else:
521521
raise RuntimeError('FINUFFT x dtype should be float64 for double precision or float32 for single precision')

0 commit comments

Comments
 (0)