Flatten List in Python Using NumPy Reshape

54

import numpy as np
List = np.array([[2,6,1], [3,9,4], [5,7,8]])
result = List.reshape(-1)
print(result)

Comments

Submit
0 Comments