Skip to content

Conversation

@zaydabash
Copy link

This tutorial uses a NumPy array to create a tensor, which can be confusing because some conversion APIs share memory while others copy. This PR adds a short note clarifying that torch.from_numpy shares memory when possible, while torch.tensor makes a copy, and that torch.as_tensor avoids a copy when possible.

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 20, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3733

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant