NumPy Array Creation
In this lesson, array creation using NumPy is explained.
We'll cover the following...
We'll cover the following...
If you don’t know what an array is, please read this short article.
Creating an array
NumPy has the power to create multi-dimensional arrays beyond 2 dimensions, but for this course, we focus on 1-D and 2-D array creation.
1-D array
The following program creates a 1-D array:
Python 3.5
import numpy as np# Creating 1-D arrayn_array = np.array([1,2,3,4,5])print(n_array)
A single list of numbers is ...