Skip to content

Commit 885f12f

Browse files
committed
fixed index_set helper function
1 parent ac88125 commit 885f12f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/pyGroupedTransforms/NFCTtools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ def nfct_index_set(
7777
if d == 1:
7878
return np.array([i for i in range(0, bandwidths[0])], "int")
7979

80-
bandwidths = bandwidths[::-1]
81-
tmp = tuple([list(range(0, bw)) for bw in bandwidths])
80+
tmp = tuple([list(range(0, bw)) for bw in bandwidths[::-1]])
8281
tmp = itertools.product(*(tmp[::-1]))
8382

8483
freq = np.empty((d, np.prod(bandwidths)), dtype=int)

src/pyGroupedTransforms/NFFTtools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ def nfft_index_set(
8787
return np.array(
8888
list(range(int(-bandwidths[0] / 2), int(bandwidths[0] / 2))), dtype="int"
8989
)
90-
91-
tmp = [list(range(int(-bw / 2), int(bw / 2))) for bw in bandwidths]
90+
91+
92+
tmp = [list(range(int(-bw / 2), int(bw / 2))) for bw in bandwidths[::-1]]
9293
tmp = itertools.product(*(tmp[::-1]))
9394

9495
freq = np.empty((d, np.prod(bandwidths)), dtype=int)
@@ -134,7 +135,6 @@ def get_transform(
134135
# Output:
135136
* `F::LinearMap{ComplexF64}` ... Linear map of the Fourier-transform implemented by the NFFT
136137
"""
137-
138138
if bandwidths.ndim > 1 or bandwidths.dtype != "int32":
139139
return "Please use an zero or one-dimensional numpy.array with dtype 'int32' as input"
140140

0 commit comments

Comments
 (0)