list to numpy array From https://stackoverflow.com/questions/15868512/list-to-array-conversion
import numpy as np myarray = np.asarray(mylist)