NumPy arange(): How to Use np.arange() (Summary)
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 array
stop: where the array ends
step: the increment or decrement
dtype: 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
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.
Become a Member to join the conversation.