From e77225d0f13334a6e567e9bf12b748b5eb17865c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20And=C3=A9n?= Date: Wed, 11 Sep 2024 23:22:07 +0200 Subject: [PATCH] py: fix dtype check in simple interface (#559) --- python/finufft/finufft/_interfaces.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/finufft/finufft/_interfaces.py b/python/finufft/finufft/_interfaces.py index 80b3b8b9d..8c83f65db 100644 --- a/python/finufft/finufft/_interfaces.py +++ b/python/finufft/finufft/_interfaces.py @@ -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')