We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Transpose and Flatten
- Discussions
Transpose and Flatten
Transpose and Flatten
Sort by
recency
|
344 Discussions
|
Please Login in order to post a comment
import numpy as np
x = list(map(int, input().split())) a = [] for i in range(x[0]): a1 = list(map(int,input().split())) a.append(a1)
a = np.array(a)
print(np.transpose(a)) print(a.flatten())
import numpy