You now know how to use NumPy arange()
. The function np.arange()
is one of the fundamental NumPy routines often used to create instances of NumPy ndarray
. It has four arguments:
start
: the first value of the arraystop
: where the array endsstep
: the increment or decrementdtype
: the type of the elements of the array
You also learned how NumPy arange()
compares with the Python built-in class range
when you’re creating sequences and generating values to iterate over.
You saw that there are other NumPy array creation routines based on numerical ranges, such as linspace()
, logspace()
, meshgrid()
, and so on.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
Glenn Lehman on Nov. 26, 2021
Excellent supplement to the written course! Thank You!