List to array conversion to use ravel() function December 29, 2022 by Tarik Use numpy.asarray: import numpy as np myarray = np.asarray(mylist)