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 - As you can see, the array has 3 rows and 4 columns. The first row contains the numbers 1, 2, 3, and 4. The second row contains the numbers 5, 6, 7, and 8. The third row contains the numbers 9, 10, 11, and 12. You can also create a 2D NumPy array using the arange() function.
🌐
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
Similarly, you can extend this for higher dimensional arrays. Numpy Indexing and Slicing gives you powerful capabilities to select your data for further analysis.
🌐
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 slicing and requires a list comprehension [e[1] for e in a[:]] instead.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί manipulating-multidimensional-arrays-in-python-numpy
Manipulating Multidimensional Arrays in Python NumPy - GeeksforGeeks
February 19, 2026 - 3. 2D Array from List of Tuples: NumPy arrays can also be created from a list of tuples, with each tuple representing a row in the array.
🌐
YouTube
youtube.com β€Ί watch
NumPy multidimensional arrays are easy! 🧊 - YouTube
#coding #python #numpy import numpy as nparray = np.array([[['A', 'B', 'C'], ['D', 'E', 'F'], ['G', 'H', 'I']], [['J', 'K', 'L']
Published: July 24, 2025
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί numpy β€Ί numpy-ndarray
Numpy - ndarray - GeeksforGeeks
July 26, 2025 - NumPy allows indexing and slicing operations on ndarrays which offers more flexibility compared to standard Python lists. Here's a overview: We can access individual elements in an array using square brackets just like Python lists.
🌐
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 Β·
🌐
Sentry
sentry.io β€Ί sentry answers β€Ί python β€Ί define a two-dimensional array in python
Python Define a Two-Dimensional Array or Matrix | Sentry
September 23, 2026 - The best way to create two-dimensional ... for manipulating multidimensional arrays. We can create a 2D array by passing a tuple to the zeros function....