9951 explained code solutions for 126 technologies


python-numpyHow to convert Python list to Numpy array


import numpy as np

lst = [1, 2, 3]
a = np.array(lst)ctrl + c
import numpy as np

load Numpy module for Python

[1, 2, 3]

sample Python list

np.array

create Numpy array from given list