What does the 'a' in numpy's numpy.arange
method stand for, and how does it differ from a simple range
produced by Python's builtin range
method (definitionally, not in terms of performance and whatnot)?
I tried looking online for an answer to this, but all I find is tutorials for how to use numpy.arange
by GeeksForGeeks and co.
You can inspect the return types and reason about what it could mean that way:
print(type(range(0,5)))
import numpy as np
print(type(np.arange(0,5)))
Which prints:
<class 'range'>
<class 'numpy.ndarray'>
Here's a related question: Why was the name "arange" chosen for the numpy function?
from numpy import *
which would shadow range
which causes problems.arrayrange
was not chosen because it's too long to type.