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 โ€บ user โ€บ basics.creation.html
Array creation โ€” NumPy v2.5 Manual
vander(x, n) defines a Vandermonde matrix as a 2D NumPy array. Each column of the Vandermonde matrix is a decreasing power of the input 1D array or list or tuple, x where the highest polynomial order is n-1. This array creation routine is helpful in generating linear least squares models, as such:
Discussions

How to create a two-dimensional array using NumPy? - Python - Data Science Dojo Discussions
I have comprehended multiple methods ... using NumPy. Now, I aspire to master methods that help in developing a two-dimensional array. For this purpose, I have found one method that aids me in defining a 2D array. Here is the code below: Apart from the above method, if you know any other method that provides me the functionality of creating a two-dimensional ... More on discuss.datasciencedojo.com
๐ŸŒ discuss.datasciencedojo.com
1
0
May 15, 2023
How to create a 2D Numpy array in Python? - Programming Language - Discussion Forum | Board Infinity
Array in Numpy is a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers. In Numpy, number of dimensions of the array is called rank of the array.A tuple of integers giving the size of the array along each dimension is known as shape of the array. More on discuss.boardinfinity.com
๐ŸŒ discuss.boardinfinity.com
0
September 27, 2022
Making a 2D array
[list1, list2]? Python doesn't have the concept of "2D lists" natively - they're just lists that contain lists. More on reddit.com
๐ŸŒ r/learnpython
2
1
April 22, 2019
Split a 2d NumPy array into 2 separate 2d arrays based on a column value
np.split isn't doing what you think it's doing and you don't need it for this. To split an original array x into two subarrays a and b the way you want, you can simply do this: x = np.array([[1, 2, 4], [1, 4, 4], [2, 2, 4], [2, 5, 9]]) a = x[x[:, 0] == 1] b = x[x[:, 0] == 2] More on reddit.com
๐ŸŒ r/AskProgramming
2
1
October 19, 2020
๐ŸŒ
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 ยท Create a 2-D array containing two arrays with the values 1,2,3 and 4,5,6:
๐ŸŒ
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 โ€บ 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.
๐ŸŒ
Data Science Dojo
discuss.datasciencedojo.com โ€บ python
How to create a two-dimensional array using NumPy? - Python - Data Science Dojo Discussions
May 15, 2023 - I have comprehended multiple methods ... using NumPy. Now, I aspire to master methods that help in developing a two-dimensional array. For this purpose, I have found one method that aids me in defining a 2D array. Here is the code below: Apart from the above method, if you know any other method that provides me the functionality of creating a two-dimensional ...
Find elsewhere
๐ŸŒ
Board Infinity
discuss.boardinfinity.com โ€บ programming language
How to create a 2D Numpy array in Python? - Programming Language - Discussion Forum | Board Infinity
September 27, 2022 - Array in Numpy is a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers. In Numpy, number of dimensions of the array is called rank of the array.A tuple of integers giving the size of the array along each dimension is known as shape of the array.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ manipulating-multidimensional-arrays-in-python-numpy
Manipulating Multidimensional Arrays in Python NumPy - GeeksforGeeks
February 19, 2026 - Each nested structure represents a new dimension in the array. 1. 2D Array from List of Lists: NumPy's np.array() function can create a 2D array from a list of lists, where each sub-list represents a row in the array.
๐ŸŒ
Sarthaks eConnect
sarthaks.com โ€บ 3542736 โ€บ how-do-i-create-a-2d-array-matrix-in-numpy
How do I create a 2D array (matrix) in NumPy? - Sarthaks eConnect | Largest Online Education Community
August 9, 2023 - LIVE Course for free ยท Creating a 2D array (matrix) in NumPy is similar to creating a 1D array. You can use the numpy.array() function or the numpy.ndarray() constructor with a nested list to represent rows and columns
๐ŸŒ
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 - The arange() function creates a sequence of numbers, and you can use the reshape() function to reshape the sequence into a 2D array. For example, the following code creates a 2D NumPy array with 3 rows and 4 columns using the arange() and reshape() ...
๐ŸŒ
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.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.3 โ€บ user โ€บ absolute_beginners.html
NumPy: the absolute basics for beginners โ€” NumPy v2.3 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 โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.array.html
numpy.array โ€” NumPy v2.5 Manual
Specifies the minimum number of dimensions that the resulting array should have. Ones will be prepended to the shape as needed to meet this requirement. ... Specifies the maximum number of dimensions to create when inferring shape from nested sequences. By default (ndmax=0), NumPy recurses through all nesting levels (up to the compile-time constant NPY_MAXDIMS).
๐ŸŒ
DataCamp
campus.datacamp.com โ€บ courses โ€บ intro-to-python-for-data-science โ€บ chapter-4-numpy
Your First 2D NumPy Array | Python
import numpy as np baseball = [[180, 78.4], [215, 102.7], [210, 98.5], [188, 75.2]] # Create a 2D numpy array from baseball: np_baseball # Print out the type of np_baseball # Print out the shape of np_baseball
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ numpy โ€บ python-numpy
Python NumPy - GeeksforGeeks
NumPy arrays are created using the np.array() function.
Published: June 12, 2026
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ user โ€บ basics.creation.html
Array creation โ€” NumPy v2.6.dev0 Manual
vander(x, n) defines a Vandermonde matrix as a 2D NumPy array. Each column of the Vandermonde matrix is a decreasing power of the input 1D array or list or tuple, x where the highest polynomial order is n-1. This array creation routine is helpful in generating linear least squares models, as such:
๐ŸŒ
Indian AI Production
indianaiproduction.com โ€บ home โ€บ blog โ€บ python numpy array โ€“ create numpy ndarray (multidimensional array)
Python NumPy array - Create NumPy ndarray (multidimensional array)
June 12, 2019 - In machine learning and data science NumPy 1D array known as vector. Specially use to store and perform an operation on target values. To create NumPy 2D array use array() function and give one argument of items of lists of the list to it.
๐ŸŒ
w3resource
w3resource.com โ€บ python-exercises โ€บ numpy โ€บ python-numpy-exercise-37.php
Python NumPy: Create a 2-dimensional array of size 2 x 3 - w3resource
August 29, 2025 - Write a NumPy program to create a 2-dimensional array of size 2 x 3 (composed of 4-byte integer elements), also print the shape, type and data type of the array. ... # Importing the NumPy library with an alias 'np' import numpy as np # Creating ...
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ multi-dimensional-arrays-in-python
Multi-Dimensional Arrays in Python โ€“ Matrices Explained with Examples
December 11, 2025 - In this example, we create a 2-dimensional array using the np.array() function, and then use slicing to access a subarray that contains rows 0 through 1 and columns 1 through 2. We then modify the subarray by multiplying it by 2, and print the ...