How to convert a 2D list into a NumPy array in Python

Converting a 2D list into a NumPy array copies the elements from the multidimensional list into an array.

Solution for How to convert a 2D list into a NumPy array in Python : You can use numpy.array() to convert a 2D list into a NumPy array Call numpy.array(object) with object as a 2D list to convert object into a NumPy array.


how-to-convert-a-2d-list-into-a-numpy-array-in-python