Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

from numpy to list python

import numpy as np

# 1d array to list
arr = np.array([1, 2, 3])
print(f'NumPy Array:
{arr}')
#NumPy Array: [1 2 3]

list1 = arr.tolist()
print(f'List: {list1}')
#List: [1, 2, 3]
Source by www.journaldev.com #
 
PREVIOUS NEXT
Tagged: #numpy #list #python
ADD COMMENT
Topic
Name
8+7 =