1# Basic syntax:
2numpy.array(list_of_lists)
3
4# Example usage:
5import numpy as np
6list_of_lists = [[1, 2, 3], [4, 5, 6]] # Create list of lists
7your_array = np.array(list_of_lists) # Convert list of lists to array
8your_array
9--> array([[1, 2, 3],
10 [4, 5, 6]])
1x=[[1,2],[1,2,3],[1]]
2y=numpy.array([numpy.array(xi) for xi in x])
3type(y)
4# <type 'numpy.ndarray'>
5type(y[0])
6# <type 'numpy.ndarray'>