Jonah T
0
Q:

python array to list

# Basic syntax:
numpy_array.tolist()

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

my_array.tolist()
--> [[1, 2, 3], [4, 5, 6]]
6
a = np.array([1, 2])
list(a)
3
// This function tolist() converts the array into a list.
arrayname.tolist()
1

New to Communities?

Join the community