tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Update Polynomial Tensor example — use torch.pi instead of math.pi

Open sekyondaMeta opened this issue 6 months ago • 4 comments

Description

The Tensors (Learning PyTorch with Examples) tutorial contains outdated patterns that should be modernized.

Changes needed

Suboptimal / Outdated Patterns

Issue Current Code Modern Alternative Notes
Using math.pi instead of torch.pi torch.linspace(-math.pi, math.pi, 2000, ...) torch.linspace(-torch.pi, torch.pi, 2000, ...) torch.pi available since PyTorch 1.8.0. Avoids the extra import math.

Files

sekyondaMeta avatar May 07 '26 16:05 sekyondaMeta

/assigntome

spzala avatar May 07 '26 19:05 spzala

/assigntome

akhil06232 avatar May 12 '26 17:05 akhil06232

The issue is already assigned. Please pick an opened and unnasigned issue with the docathon-2026 label.

github-actions[bot] avatar May 12 '26 17:05 github-actions[bot]

This issue has been resolved (related PR is merged) and will be closed eventually.

spzala avatar May 12 '26 18:05 spzala