Use tolist():

>>> import numpy as np
>>> np.array([[1,2,3],[4,5,6]]).tolist()
[[1, 2, 3], [4, 5, 6]]

Note that this converts the values from whatever numpy type they may have (e.g. np.int32 or np.float32) to the "nearest compatible Python type" (in a list). If you want to preserve the numpy data types, you could call list() on your array instead, and you'll end up with a list of numpy scalars. (Thanks to Mr_and_Mrs_D for pointing that out in a comment.)

Answer from Peter Hansen on Stack Overflow
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ convert list to array python
Convert List to Array Python - Scaler Topics
May 4, 2023 - Python provides us with an inbuilt function array() that can be used to convert list to array in python. We have to pass the "data type" and the list to the function. This function will convert the list to the provided "data-type".
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-convert-list-to-python-array
Convert list to Python array - Python - GeeksforGeeks
July 12, 2025 - This is an inbuilt function in Python to convert to an array. The data type indicator "i" is used in the case of integers, which restricts data type. ... Explanation: In array("i", a) "i" indicates that the data type of the array elements will ...
Discussions

Convert NumPy array to Python list - Stack Overflow
How do I convert a NumPy array into a Python List? More on stackoverflow.com
๐ŸŒ stackoverflow.com
How do I convert a list to a numpy array?
https://docs.scipy.org/doc/numpy-1.10.4/reference/generated/numpy.asarray.html More on reddit.com
๐ŸŒ r/learnpython
6
1
April 15, 2020
python - List to array conversion to use ravel() function - Stack Overflow
I have a list in python and I want to convert it to an array to be able to use ravel() function. More on stackoverflow.com
๐ŸŒ stackoverflow.com
python - List of lists into numpy array - Stack Overflow
this automatically convert a list ... do that: make an array of list even if all the lists have the same length? Or is it possible to convert a 2D array in a 1D array of 1D array (efficiently I mean, no iterative method or python map stuff) 2012-10-04T09:58:00.463Z+00:... More on stackoverflow.com
๐ŸŒ stackoverflow.com
People also ask

What is the difference between list and array in Python?
A list can store mixed data types and is more flexible. An array usually stores only one data type but is faster and uses less memory. Conversion depends on whether you need speed or flexibility.
๐ŸŒ
wscubetech.com
wscubetech.com โ€บ resources โ€บ python โ€บ programs โ€บ list-to-array
Convert List to Array in Python (5 Programs)
Can I convert nested lists into arrays in Python?
Yes, NumPy allows this easily. If you have [[1,2],[3,4]], just call np.array() on it, and it will create a 2D array, like a matrix.
๐ŸŒ
wscubetech.com
wscubetech.com โ€บ resources โ€บ python โ€บ programs โ€บ list-to-array
Convert List to Array in Python (5 Programs)
What should I use for big lists: array or NumPy?
For small tasks, use the normal array module. For big datasets, always prefer NumPy because itโ€™s optimized for large arrays and gives many ready-to-use mathematical functions.
๐ŸŒ
wscubetech.com
wscubetech.com โ€บ resources โ€บ python โ€บ programs โ€บ list-to-array
Convert List to Array in Python (5 Programs)
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_ref_list.asp
Python List/Array Methods
Note: Python does not have built-in support for Arrays, but Python Lists can be used instead.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ convert-lists-to-arrays-and-back-in-python
How to Convert a List to an Array and Back in Python
December 11, 2025 - To convert a list to an array in Python, you can use the array module that comes with Python's standard library.
Find elsewhere
๐ŸŒ
WsCube Tech
wscubetech.com โ€บ resources โ€บ python โ€บ programs โ€บ list-to-array
Convert List to Array in Python (5 Programs)
November 3, 2025 - Master list to array conversion in Python with 5 programs. Get clear examples, logic, and outputs explained in a step-by-step manner. Learn now!
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ how do i convert a list to a numpy array?
r/learnpython on Reddit: How do I convert a list to a numpy array?
April 15, 2020 -

The list I am working with has around 50 entries, I cannot simply do

Example:
list = [1,2,3,4,5,6,......50]

arr = numpy.array([ list ])

because it will place the entire list in 1 address. I am trying to use loops to append the values to the array but it is not working. Please help, thank you.

๐ŸŒ
Net Informations
net-informations.com โ€บ q โ€บ py โ€บ ltoa.htm
Convert List to Array Python
The easiest way to convert a list to an array is to use the array() function from the array module in Python. The array() function creates an array of specified type and size from a Python list.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_dsa_lists.asp
Python Lists and Arrays
In Python, lists are the built-in data structure that serves as a dynamic array. Lists are ordered, mutable, and can contain elements of different types. ... A list is a built-in data structure in Python, used to store multiple elements.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-convert-array-ordinary-list-items
Python - Convert an array to an ordinary list with the same items - GeeksforGeeks
December 17, 2024 - import array # Example with a regular ... 'a' print(b) ... If we are working with a NumPy array, we can use the tolist() method to convert it into a regular Python list....
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ convert-python-list-to-numpy-arrays
Convert Python List to numpy Arrays - GeeksforGeeks
July 12, 2025 - The numpy.array() function is the most common way to convert a list into an array. It takes the Python list as an argument and returns a NumPy array containing the same elements.
๐ŸŒ
APXML
apxml.com โ€บ courses โ€บ essential-numpy-pandas โ€บ chapter-2-getting-started-numpy-arrays โ€บ creating-arrays-from-lists
NumPy Array from Python List
NumPy arrays can have more than one dimension. You can create multi-dimensional arrays by passing nested Python lists (lists containing other lists) to np.array().
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ convert-python-nested-lists-to-multidimensional-numpy-arrays
Convert Python Nested Lists to Multidimensional NumPy Arrays - GeeksforGeeks
July 15, 2025 - Initialize the nested 4-dimensional list and then use numpy.asarray() function to convert the list to the array and store it in a different object.
๐ŸŒ
Built In
builtin.com โ€บ data-science โ€บ how-to-create-list-array-python
How to Create Python Lists & NumPy Arrays | Built In
Both lists and NumPy arrays have a wide array of built-in methods for performing a variety of tasks including sorting, finding min/max, truncating, appending, concatenating and much more. Introduction to lists in Python.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.ndarray.tolist.html
numpy.ndarray.tolist โ€” NumPy v2.5 Manual
>>> import numpy as np >>> a = np.uint32([1, 2]) >>> a_list = list(a) >>> a_list [np.uint32(1), np.uint32(2)] >>> type(a_list[0]) <class 'numpy.uint32'> >>> a_tolist = a.tolist() >>> a_tolist [1, 2] >>> type(a_tolist[0]) <class 'int'> Additionally, for a 2D array, tolist applies recursively:
๐ŸŒ
Dive into Python
diveintopython.org โ€บ home โ€บ learn python programming โ€บ variables in python โ€บ array variables โ€บ how to convert an array to other types
Convert Operations for Arrays in Python: Lists, Strings and NumPy Arrays
May 3, 2024 - NumPy upcasts all the elements to the common data type, which in this case is str. The resulting array contains strings representing the elements of the list. Converting between strings and arrays in Python can be useful when working with textual data or when manipulating individual characters.