Skip to content

Commit

Permalink
py: fix dtype check in simple interface (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
janden authored Sep 11, 2024
1 parent a679d6d commit e77225d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/finufft/finufft/_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,9 @@ def destroy(plan):
### invoke guru interface, this function is used for simple interfaces
def invoke_guru(dim,tp,x,y,z,c,s,t,u,f,isign,eps,n_modes,**kwargs):
# infer dtype from x
if x.dtype is np.dtype('float64'):
if x.dtype == np.dtype('float64'):
pdtype = 'complex128'
elif x.dtype is np.dtype('float32'):
elif x.dtype == np.dtype('float32'):
pdtype = 'complex64'
else:
raise RuntimeError('FINUFFT x dtype should be float64 for double precision or float32 for single precision')
Expand Down

0 comments on commit e77225d

Please sign in to comment.