Back
I have a list in python and I want to convert it to an array to be able to use ravel() function.
For converting the list to an array you can use numpy.asarray see the code below:-
import numpy as np myarray = np.asarray(mylist)
import numpy as np
myarray = np.asarray(mylist)
To know more about this you can have a look at the following video tutorial:-
31k questions
32.8k answers
501 comments
693 users