List to array conversion

I have a list in python and I want to convert it to an array to be able to use ravel() function.

Use numpy.asarray:

    import numpy as np
    myarray = np.asarray(mylist)

From: stackoverflow.com/q/15868512

Back to homepage or read more recommendations: