This works:

a = [[1, 2, 3], [4, 5, 6]]
nd_a = np.array(a)

So this should work too:

nd_a = np.array([[x for x in y] for y in a])
Answer from Marijn van Vliet on Stack Overflow
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ arrays.ndarray.html
The N-dimensional array (ndarray) โ€” NumPy v2.5 Manual
An ndarray is a (usually fixed-size) multidimensional container of items of the same type and size. The number of dimensions and items in an array is defined by its shape, which is a tuple of N non-negative integers that specify the sizes of each dimension. The type of items in the array is ...
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ numpy โ€บ numpy_creating_arrays.asp
NumPy Creating Arrays
An array that has 1-D arrays as its elements is called a 2-D array. These are often used to represent matrix or 2nd order tensors. NumPy has a whole sub module dedicated towards matrix operations called numpy.mat
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ user โ€บ absolute_beginners.html
NumPy: the absolute basics for beginners โ€” NumPy v2.6.dev0 Manual
Using np.newaxis will increase the dimensions of your array by one dimension when used once. This means that a 1D array will become a 2D array, a 2D array will become a 3D array, and so on.
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ reference โ€บ arrays.ndarray.html
The N-dimensional array (ndarray) โ€” NumPy v2.6.dev0 Manual
An ndarray is a (usually fixed-size) multidimensional container of items of the same type and size. The number of dimensions and items in an array is defined by its shape, which is a tuple of N non-negative integers that specify the sizes of each dimension. The type of items in the array is ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ indexing-multi-dimensional-arrays-in-python-using-numpy
Indexing Multi-dimensional arrays in Python using NumPy - GeeksforGeeks
November 4, 2025 - Indexing in multi-dimensional arrays allows us to access, modify or extract specific elements or sections from arrays efficiently. In Python, NumPy provides tools to handle this through index numbers, slicing and reshaping.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.1 โ€บ reference โ€บ arrays.ndarray.html
The N-dimensional array (ndarray) โ€” NumPy v2.1 Manual
An ndarray is a (usually fixed-size) multidimensional container of items of the same type and size. The number of dimensions and items in an array is defined by its shape, which is a tuple of N non-negative integers that specify the sizes of each dimension. The type of items in the array is ...
Find elsewhere
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ user โ€บ basics.creation.html
Array creation โ€” NumPy v2.5 Manual
>>> import numpy as np >>> np.diag([1, 2, 3]) array([[1, 0, 0], [0, 2, 0], [0, 0, 3]]) >>> np.diag([1, 2, 3], 1) array([[0, 1, 0, 0], [0, 0, 2, 0], [0, 0, 0, 3], [0, 0, 0, 0]]) >>> a = np.array([[1, 2], [3, 4]]) >>> np.diag(a) array([1, 4]) vander(x, n) defines a Vandermonde matrix as a 2D NumPy array.
๐ŸŒ
Medium
medium.com โ€บ @bouimouass.o โ€บ what-does-a-numpy-2d-array-look-like-in-python-38752ccde895
What does a numpy 2D array look like in python? | by Omar | Medium
July 23, 2023 - What does a numpy 2D array look like in python? A NumPy 2D array is a rectangular array of data. It is a two-dimensional array, which means it has rows and columns. The rows are represented by the โ€ฆ
๐ŸŒ
DataCamp
campus.datacamp.com โ€บ courses โ€บ intro-to-python-for-data-science โ€บ chapter-4-numpy
2D NumPy Arrays | Python
Let's try to create one numpy array for all height and weight data of your family, like this. If you print out np_2d now, you'll see that it is a rectangular data structure: Each sublist in the list, corresponds to a row in the two dimensional numpy array. From np_2d.shape, you can see that ...
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.4 โ€บ reference โ€บ arrays.ndarray.html
The N-dimensional array (ndarray) โ€” NumPy v2.4 Manual
An ndarray is a (usually fixed-size) multidimensional container of items of the same type and size. The number of dimensions and items in an array is defined by its shape, which is a tuple of N non-negative integers that specify the sizes of each dimension. The type of items in the array is ...
๐ŸŒ
Pluralsight
pluralsight.com โ€บ blog โ€บ tech guides & tutorials
Working with Numpy Arrays: Indexing & Slicing | Pluralsight
For example, let me define a one-dimensional array ... Index โ€˜3โ€™ represents the starting element of the slice and it's inclusive. Index โ€˜6โ€™ represents the stopping element of the slice and itโ€™s exclusive. That's the reason why we did not get the value โ€˜6โ€™ in the output. If you do not specify the starting and the stopping index you will get all the values. ... That's because if the indices are missing, by default, Numpy inserts the starting and stopping indices that select the entire array.
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
2D NumPy array of objects vs. 2D Python list efficiency - Python Help - Discussions on Python.org
March 9, 2023 - I have a 2D list a of varying shape NumPy arrays and equivalent NumPy array of objects b = np.array(a, dtype='object'). It is inconvenient to slice a, e.g. a[:][1] is not equivalent to b[:, 1], canโ€™t be expressed by slicโ€ฆ
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ numpy โ€บ numpy-ndarray
Numpy - ndarray - GeeksforGeeks
July 26, 2025 - Understanding the attributes of an ndarray is important while working with NumPy effectively. Here are the key attributes: ndarray.shape: Returns a tuple representing the shape (dimensions) of the array.
๐ŸŒ
Pygame
pygame.org โ€บ docs
Pygame Front Page โ€” pygame v2.6.0 documentation
Pygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters.
๐ŸŒ
Instagram
instagram.com โ€บ popular โ€บ numpy-2d-array-matrix
Numpy 2d Array Matrix
March 19, 2026 - Welcome back to Instagram. Sign in to see what your friends, family and interests have been capturing and sharing around the world.
๐ŸŒ
SciPy
docs.scipy.org โ€บ doc โ€บ scipy โ€บ reference โ€บ generated โ€บ scipy.stats.binned_statistic_2d.html
binned_statistic_2d โ€” SciPy v1.18.0 Manual
binnumber(N,) array of ints or (2,N) ndarray of ints ยท This assigns to each element of sample an integer that represents the bin in which this observation falls. The representation depends on the expand_binnumbers argument. See Notes for details. See also ยท numpy.digitize, numpy.histogram2d, binned_statistic, binned_statistic_dd ยท
๐ŸŒ
QuantInsti
quantra.quantinsti.com โ€บ generic
2D Arrays in Python - Generic - Quantra Community
April 2, 2025 - The primer on Python reads about 2D arrays as follows,โ€˜Two-dimensional arrays have more than one row and more than one columnโ€™ However while trying this: Two_d_array=np.array([[1],[2],[3]]) (I am sure you noticed that โ€ฆ