1import numpy as np
2>>> np.array([[1,2,3],[4,5,6]]).tolist()
3[[1, 2, 3], [4, 5, 6]]
4
1# Basic syntax:
2numpy_array.tolist()
3
4# Example usage:
5your_array = np.array([[1, 2, 3], [4, 5, 6]])
6your_array
7--> array([[1, 2, 3],
8 [4, 5, 6]])
9
10your_array.tolist()
11--> [[1, 2, 3], [4, 5, 6]]