We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2211321 + 48d8207 commit 3664438Copy full SHA for 3664438
beginner_source/introyt/tensors_deeper_tutorial.py
@@ -544,11 +544,11 @@
544
print(c) # contents of c have changed
545
546
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
+assert id(c) == old_id # make sure that our new c is the same object as the old one
548
549
torch.rand(2, 2, out=c) # works for creation too!
550
print(c) # c has changed again
551
-assert id(c), old_id # still the same object!
+assert id(c) == old_id # still the same object!
552
553
554
##########################################################################
0 commit comments