Skip to content

Commit f317bf0

Browse files
committed
black code formatter
1 parent b3f7158 commit f317bf0

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

tests/test_weighting/test_ntk_weighting.py

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,56 @@
88
problem = Poisson2DSquareProblem()
99
condition_names = problem.conditions.keys()
1010

11+
1112
@pytest.mark.parametrize(
12-
"model,alpha", [(FeedForward(len(problem.input_variables), len(problem.output_variables)),0.5)]
13+
"model,alpha",
14+
[
15+
(
16+
FeedForward(
17+
len(problem.input_variables), len(problem.output_variables)
18+
),
19+
0.5,
20+
)
21+
],
1322
)
1423
def test_constructor(model, alpha):
1524
NeuralTangetKernelWeighting(model=model, alpha=alpha)
1625

26+
1727
@pytest.mark.parametrize(
18-
"model,alpha", [(FeedForward(len(problem.input_variables), len(problem.output_variables)),1.2)]
28+
"model,alpha",
29+
[
30+
(
31+
FeedForward(
32+
len(problem.input_variables), len(problem.output_variables)
33+
),
34+
1.2,
35+
)
36+
],
1937
)
20-
def test_wrong_constructor2(model,alpha):
38+
def test_wrong_constructor2(model, alpha):
2139
with pytest.raises(ValueError):
2240
NeuralTangetKernelWeighting(model, alpha)
2341

24-
@pytest.mark.parametrize(
25-
"model,alpha", [(0.5,0.5)]
26-
)
42+
43+
@pytest.mark.parametrize("model,alpha", [(0.5, 0.5)])
2744
def test_wrong_constructor1(model):
2845
with pytest.raises(TypeError):
2946
NeuralTangetKernelWeighting(model)
3047

48+
3149
@pytest.mark.parametrize(
32-
"model,alpha", [(FeedForward(len(problem.input_variables), len(problem.output_variables)),0.5)]
50+
"model,alpha",
51+
[
52+
(
53+
FeedForward(
54+
len(problem.input_variables), len(problem.output_variables)
55+
),
56+
0.5,
57+
)
58+
],
3359
)
34-
def test_train_aggregation(model,alpha):
60+
def test_train_aggregation(model, alpha):
3561
weighting = NeuralTangetKernelWeighting(model=model, alpha=alpha)
3662
problem.discretise_domain(50)
3763
solver = PINN(problem=problem, model=model, weighting=weighting)

0 commit comments

Comments
 (0)