convert array to list numpy code example
Example 1: ndarray to list
a = np.array([1, 2])
a.tolist()
Example 2: np.array to list
>>> a = np.array([1, 2])
>>> list(a)
[1, 2]
>>> a.tolist()
[1, 2]
a = np.array([1, 2])
a.tolist()
>>> a = np.array([1, 2])
>>> list(a)
[1, 2]
>>> a.tolist()
[1, 2]