Linear Algebra, Math, Mathematics, Python, Jupyter Notebook.
x = np.array([1,2,3,4]) x array([1, 2, 3, 4]) Create a 3×2 matrix with nested brackets. The array() function can also create 2-dimensional arrays with nested brackets: A = np.array([[1,2],[3,4],[5,6]]) A array([[1, 2], [3, 4], [5, 6]]) Shape The shape of an array (that is to say its dimensions)