Skip to content

Commit

Permalink
fix single-prec py examples to use dtype=complex64
Browse files Browse the repository at this point in the history
  • Loading branch information
ahbarnett committed Feb 25, 2025
1 parent d2e0ff7 commit 19a24c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions python/finufft/examples/guru1d1f.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@

strt = time.time()

#plan
plan = fp.Plan(1,(N,),dtype='single')
# plan, using proper specifier for single-precision transform
plan = fp.Plan(1,(N,),dtype='complex64')

#set pts
# set pts
plan.setpts(x)

#exec
# exec
plan.execute(c,F)

#timing
# timing
print("Finished nufft in {0:.2g} seconds. Checking..."
.format(time.time()-strt))

#check error
# check error
n = 143 # mode to check
Ftest = 0.0
# this is so slow...
Expand Down
2 changes: 1 addition & 1 deletion python/finufft/examples/guru2d1f.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# instantiate the plan (note n_trans must be set here), also setting tolerance:
t0 = time.time()
plan = finufft.Plan(nufft_type, (N1, N2), eps=1e-4, n_trans=K, dtype='float32')
plan = finufft.Plan(nufft_type, (N1, N2), eps=1e-4, n_trans=K, dtype='complex64')

# set the nonuniform points
plan.setpts(x, y)
Expand Down

0 comments on commit 19a24c6

Please sign in to comment.