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