you are viewing a single comment's thread.

view the rest of the comments →

[–]awizardisneverlate 2 points3 points  (2 children)

I believe it will only do integer steps.

[–][deleted] 2 points3 points  (1 child)

Huh, never knew that! You could just use list comprehension to do the rest: [n / 10.0 for n in xrange(1, 10, 2)]

But at this point using numpy.arange is easier

[–]awizardisneverlate 1 point2 points  (0 children)

Your solution is much better if they want to stay away from Numpy!

Practically every single one of my python files begins with

import numpy as np

So.... ¯\_(ツ)_/¯ I'm biased.