1import numpy as np
2my_list = [2,4,6,8,10]
3my_array = np.array(my_list)
4# printing my_array
5print my_array
6# printing the type of my_array
7print type(my_array)
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]]