Skip to content

Commit 6e4982c

Browse files
committed
fix assert statement in test
1 parent 0b09e55 commit 6e4982c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/test_approximators/test_approximator_standardization/test_approximator_standardization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import keras
22
from tests.utils import assert_models_equal
3-
import numpy as np
43

54

65
def test_save_and_load(tmp_path, approximator, train_dataset, validation_dataset):
@@ -9,7 +8,8 @@ def test_save_and_load(tmp_path, approximator, train_dataset, validation_dataset
98
approximator.build(data_shapes)
109
for layer in approximator.standardize_layers.values():
1110
assert layer.built
12-
np.testing.assert_allclose([c.value.numpy() for c in layer.count], 0.0)
11+
for count in layer.count:
12+
assert count == 0.0
1313
approximator.compute_metrics(**train_dataset[0])
1414

1515
keras.saving.save_model(approximator, tmp_path / "model.keras")

tests/test_approximators/test_build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ def test_build(approximator, simulator, batch_size, adapter):
1414
approximator.build(batch_shapes)
1515
for layer in approximator.standardize_layers.values():
1616
assert layer.built
17-
assert layer.count == 0
17+
for count in layer.count:
18+
assert count == 0.0

0 commit comments

Comments
 (0)