Skip to content

Commit 3664438

Browse files
author
Svetlana Karslioglu
authored
Merge branch 'main' into store-artifacts-2
2 parents 2211321 + 48d8207 commit 3664438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beginner_source/introyt/tensors_deeper_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,11 @@
544544
print(c) # contents of c have changed
545545

546546
assert c is d # test c & d are same object, not just containing equal values
547-
assert id(c), old_id # make sure that our new c is the same object as the old one
547+
assert id(c) == old_id # make sure that our new c is the same object as the old one
548548

549549
torch.rand(2, 2, out=c) # works for creation too!
550550
print(c) # c has changed again
551-
assert id(c), old_id # still the same object!
551+
assert id(c) == old_id # still the same object!
552552

553553

554554
##########################################################################

0 commit comments

Comments
 (0)