Skip to content

Commit

Permalink
Fixed python issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Barbone committed May 10, 2024
1 parent 95138ab commit fb562b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/finufft/finufft/_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,22 +775,22 @@ def _set_nufft_doc(f, dim, tp, example='python/finufft/test/accuracy_speed_tests
v['pt_spacing'] = ' ' * (len(v['pt_idx']) - 2)
v['pt_inner'] = ' + '.join('k{0} {1}(j)'.format(i, x) for i, x in zip(dims, pts[:dim]))
v['pt_constraint'] = ', '.join('-N{0}/2 <= k{0} <= (N{0}-1)/2'.format(i) for i in dims)
v['pts_doc'] = '\n'.join(' {} (float[M]): nonuniform points, valid only in [-pi, pi), values outside will be folded'.'.format(x) for x in pts[:dim])
v['pts_doc'] = '\n'.join('{}(float[M]): nonuniform points, in [-pi, pi), values outside will be folded'.format(x) for x in pts[:dim])

# for example
v['pts'] = ', '.join(str(x) for x in pts[:dim])
v['pts_generate'] = '\n'.join(' {} = 2 * np.pi * np.random.uniform(size=M)'.format(x) for x in pts[:dim])
v['pts_generate'] = '\n'.join('{} = 2 * np.pi * np.random.uniform(size=M)'.format(x) for x in pts[:dim])
v['sample_modes'] = ', '.join(str(n) for n in sample_modes[:dim])
v['example'] = example

# for type 3 only
v['src_pts_doc'] = '\n'.join(' {} (float[M]): nonuniform source points.'.format(x) for x in pts[:dim])
v['target_pts_doc'] = '\n'.join(' {} (float[N]): nonuniform target points.'.format(x) for x in target_pts[:dim])
v['src_pts_doc'] = '\n'.join('{}(float[M]): nonuniform points, valid in [-pi, pi), values outside will be folded'.format(x) for x in pts[:dim])
v['target_pts_doc'] = '\n'.join('{}(float[N]): nonuniform target points.'.format(x) for x in target_pts[:dim])
v['pt_inner_type3'] = ' + '.join('{0}[k] {1}[j]'.format(s, x) for s, x in zip(target_pts[:dim], pts[:dim]))

# for type 3 example only
v['target_pts'] = ', '.join(str(x) for x in target_pts[:dim])
v['target_pts_generate'] = '\n'.join(' {} = 2 * np.pi * np.random.uniform(size=N)'.format(x) for x in target_pts[:dim])
v['target_pts_generate'] = '\n'.join('{} = 2 * np.pi * np.random.uniform(size=N)'.format(x) for x in target_pts[:dim])

if dim > 1:
v['pt_inner'] = '(' + v['pt_inner'] + ')'
Expand Down

0 comments on commit fb562b8

Please sign in to comment.