ktl014
7/21/2017 - 10:53 PM

Numpy array to list From https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tolist.html

>>> a = np.array([1, 2])
>>> a.tolist()
[1, 2]
>>> a = np.array([[1, 2], [3, 4]])
>>> list(a)
[array([1, 2]), array([3, 4])]
>>> a.tolist()
[[1, 2], [3, 4]]