Skip to content

Commit f2e33dc

Browse files
Remove repeated tests
1 parent b00c897 commit f2e33dc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pytensor/tensor/nlinalg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ def L_op(
638638
# will be DisconnectedType, which have type(Variable). Matrices that are on the backwards compute path
639639
# have type TensorVariable. Thus, we replace Variables with zero matrices of the correct shapes.
640640
new_output_grads = []
641+
641642
for output_grad, output in zip(output_grads, outputs):
642643
if not isinstance(output_grad, ptb.TensorVariable):
643644
new_output_grads.append(ptb.zeros_like(output))

tests/tensor/test_nlinalg.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,11 @@ def svd_fn(A, case=0):
273273
elif case == 6:
274274
return U.sum() + s.sum() + V.sum()
275275

276-
for case in range(7):
277-
utt.verify_grad(
278-
partial(svd_fn, case=gradient_test_case),
279-
[A_v],
280-
rng=rng,
281-
)
276+
utt.verify_grad(
277+
partial(svd_fn, case=gradient_test_case),
278+
[A_v],
279+
rng=rng,
280+
)
282281

283282
else:
284283
utt.verify_grad(

0 commit comments

Comments
 (0)