You are viewing a single comment's thread. Return to all comments →
import numpy as np matrix = [] dim = input() for n in range(int(dim.split(' ')[0])): row = input().rstrip() matrix.append(row.split(' ')) my_array = np.array(matrix, dtype='int') print(my_array.transpose()) print(my_array.flatten())
Seems like cookies are disabled on this browser, please enable them to open this website
Transpose and Flatten
You are viewing a single comment's thread. Return to all comments →