Skip to content

Commit 8995269

Browse files
committed
replaced L1 with Linf, because I misnamed the norm, embarrassingly.
1 parent 07264e4 commit 8995269

File tree

6 files changed

+62
-56
lines changed

6 files changed

+62
-56
lines changed

notebooks/chebyshev.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@
678678
"name": "python",
679679
"nbconvert_exporter": "python",
680680
"pygments_lexer": "ipython3",
681-
"version": "3.13.1"
681+
"version": "3.13.2"
682682
}
683683
},
684684
"nbformat": 4,

notebooks/chebyshev_antiderivatives.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
"text": [
9999
"mean iy_n -0.007520096393034718\n",
100100
"mean iy 0.04580123098784975\n",
101-
"L2 3.1176992465971132e-18\n",
102-
"L1 6.675665797928332e-09\n"
101+
"L2 3.1176986577396767e-18\n",
102+
"L∞ 6.675664909749912e-09\n"
103103
]
104104
},
105105
{
@@ -126,7 +126,7 @@
126126
"print(\"mean iy\", np.mean(iy))\n",
127127
"y_n_recalc = cheb_deriv(iy_n, x_n, 1)\n",
128128
"print(\"L2\", np.mean((y_n - y_n_recalc)**2))\n",
129-
"print(\"L1\", np.max(np.abs(y_n - y_n_recalc)))\n",
129+
"print(\"L∞\", np.max(np.abs(y_n - y_n_recalc)))\n",
130130
"\n",
131131
"pyplot.plot(x_n, y_n, 'k+')\n",
132132
"pyplot.plot(x_n, iy_n, 'b+')\n",
@@ -160,7 +160,7 @@
160160
"name": "python",
161161
"nbconvert_exporter": "python",
162162
"pygments_lexer": "ipython3",
163-
"version": "3.13.1"
163+
"version": "3.13.2"
164164
}
165165
},
166166
"nbformat": 4,

notebooks/dct_types_extension_experiments.ipynb

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

notebooks/filtering_noise.ipynb

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

notebooks/stay_in_x_domain.ipynb

Lines changed: 20 additions & 14 deletions
Large diffs are not rendered by default.

specderiv/tests/test_specderiv.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def test_cheb_deriv_accurate_to_6th(dct_type, x_n):
3030
8*np.exp(x_n) * (2035*np.cos(5*x_n) - 828*np.sin(5*x_n))] # 6th
3131
# Things get less accurate for higher derivatives, so check < 10^f(nu)
3232
L2_powers = [[-19, -14, -10, -6, -3, 0], [-17, -13, -9, -6, -2, 1]]
33-
L1_powers = [[-9, -6, -4, -2, -1, 1], [-8, -6, -4, -2, 0, 1]]
33+
Linf_powers = [[-9, -6, -4, -2, -1, 1], [-8, -6, -4, -2, 0, 1]]
3434

3535
for nu in range(1,7):
3636
computed = cheb_deriv(y_n, x_n, nu, dct_type=dct_type) # strangely, this can be slightly different (but close) in CI vs local, despite same package versions
3737
assert np.nanmean((analytic_truth[nu-1] - computed)**2) < 10**L2_powers[dct_type-1][nu-1]
38-
assert np.nanmax(np.abs(analytic_truth[nu-1] - computed)) < 10**L1_powers[dct_type-1][nu-1]
38+
assert np.nanmax(np.abs(analytic_truth[nu-1] - computed)) < 10**Linf_powers[dct_type-1][nu-1]
3939

4040
def test_cheb_endpoints():
4141
"""A test of the endpoints code, specifically. Endpoints should be found accurately up to the
@@ -131,7 +131,7 @@ def test_cheb_arbitrary_domains_to_3rd():
131131
"""A test that we can take the derivative on domains that aren't the canonical [1, -1]
132132
"""
133133
L2_powers = [[-10, -6, -2],[-25, -24, -20]] # The function does *much* better on shorter
134-
L1_powers = [[-4, -2, 1],[-14, -11, -9]] # domains with an N this low and y this wobbly.
134+
Linf_powers = [[-4, -2, 1],[-14, -11, -9]] # domains with an N this low and y this wobbly.
135135

136136
for i,(t_0,t_N) in enumerate([(3.5, 0.5), (-4,-5)]):
137137
t_n = np.cos(np.arange(N+1) * np.pi / N) * (t_0 - t_N)/2 + (t_0 + t_N)/2
@@ -144,7 +144,7 @@ def test_cheb_arbitrary_domains_to_3rd():
144144
for nu in range(1,4):
145145
computed = cheb_deriv(y_n, t_n, nu)
146146
assert np.mean((analytic_truth[nu-1] - computed)**2) < 10**L2_powers[i][nu-1]
147-
assert np.max(np.abs(analytic_truth[nu-1] - computed)) < 10**L1_powers[i][nu-1]
147+
assert np.max(np.abs(analytic_truth[nu-1] - computed)) < 10**Linf_powers[i][nu-1]
148148

149149
def test_fourier_arbitrary_domains_to_3rd():
150150
"""A test that we can take the derivative on domains that aren't the canonical [0, 2pi)

0 commit comments

Comments
 (0)