Skip to content

Commit 035c9ca

Browse files
committed
Allow burn-in in memory leak test
1 parent c77ff14 commit 035c9ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/tensor/test_elemwise.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ def test_memory_leak(self, inplace):
242242
blocks_last = blocks_i
243243

244244
tracemalloc.stop()
245-
assert np.allclose(np.mean(block_diffs), 0)
245+
burn_in = 1
246+
assert np.allclose(np.mean(block_diffs[burn_in:]), 0)
246247

247248
def test_static_shape(self):
248249
x = tensor(dtype=np.float64, shape=(1, 2), name="x")

0 commit comments

Comments
 (0)