Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python numpy array to list

# Basic syntax:
numpy_array.tolist()

# Example usage:
your_array = np.array([[1, 2, 3], [4, 5, 6]])
your_array
--> array([[1, 2, 3],
           [4, 5, 6]])

your_array.tolist()
--> [[1, 2, 3], [4, 5, 6]]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #numpy #array #list
ADD COMMENT
Topic
Name
1+6 =