FunctionRacerProblemsRace

Count Up

BeginnerPyTorchPython

Return a tensor with the whole numbers from 0 up to n, not including n itself. They stay whole numbers: 0, 1, 2 and not 0.0, 1.0, 2.0.

Example 1

n 4
returns [0,1,2,3]

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More PyTorch problems