How to create a NP array in Python?

You can create numpy array casting python list. Simply pass the python list to np.array() method as an argument and you are done. This will return 1D numpy array or a vector. In case you want to create 2D numpy array or a matrix, simply pass python list of list to np.array() method.
For More Information Please Refer:


You May Also Like to Read: