Skip to content

Commit 39c5b89

Browse files
authored
Merge pull request #16 from NFFT/develop
Develop
2 parents 3cb9a4e + 9e47805 commit 39c5b89

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "pyANOVAapprox"
7-
version = "2.0.0"
7+
version = "2.0.1"
88
authors = [
99
{ name="Felix Wirth", email="fwi012001@gmail.com" },
1010
]

src/pyANOVAapprox/approx.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ def addTrafo(self, settingnr=None):
246246
setting = self.getSetting(settingnr)
247247
if settingnr is None:
248248
settingnr = self.aktsetting
249-
# print(setting.U)
250-
# print(setting.N)
251249
self.trafo[settingnr] = GroupedTransform(
252250
system=gt_systems[setting.basis],
253251
U=setting.U,

src/pyANOVAapprox/bandwidth.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ def getfcu(ghat, u):
55
idx = [s.u for s in ghat.settings].index(u)
66
bws = ghat.settings[idx].bandwidths
77

8-
fcu = ghat[u].reshape(bws[::-1] - 1)
9-
fcu = np.permute_dims(fcu, range(len(bws))[::-1])
10-
8+
#fcu = ghat[u].reshape(bws[::-1] - 1)
9+
#fcu = np.permute_dims(fcu, range(len(bws))[::-1])
10+
fcu = ghat[u].reshape(bws - 1)
11+
fcu = np.permute_dims(fcu, range(len(bws)))
12+
1113
return fcu
1214

1315

@@ -30,7 +32,7 @@ def compute_bandwidth(B, D, t):
3032
us = set(D.keys()) - {()}
3133
bw = {u: [6] * len(u) for u in us}
3234
bw[()] = []
33-
35+
3436
minfreqs = sum(math.prod((bw[u][j] - 1) for j in range(len(u))) for u in us)
3537
if B < minfreqs:
3638
raise ValueError(f"Budget too small: {B} < {minfreqs}")
@@ -156,19 +158,19 @@ def estimate_rates(self, lam, settingnr=None, verbose=False):
156158
)
157159

158160
if (idx is None) or idx >= len(axissum):
159-
D[u][len(u) - j - 1] = math.nan
160-
t[u][len(u) - j - 1] = math.nan
161+
D[u][j] = math.nan
162+
t[u][j] = math.nan
161163
else:
162164
idx = min(len(axissum), len(axissum) - idx + 2)
163165
Duj, tuj = fitrate_log(np.cumsum((axissum[0:idx])[::-1])[::-1])
164-
D[u][len(u) - j - 1] = Duj
165-
t[u][len(u) - j - 1] = -tuj / 2
166+
D[u][j] = Duj
167+
t[u][j] = -tuj / 2
166168

167169
if verbose:
168170
x = np.arange(1, idx + 1)
169171
ax.plot(
170172
x,
171-
D[u][len(u) - j - 1] * x ** (-2 * t[u][len(u) - j - 1]),
173+
D[u][j] * x ** (-2 * t[u][j]),
172174
linewidth=2,
173175
# color=j
174176
)

0 commit comments

Comments
 (0)