Skip to content

Commit afa2150

Browse files
authored
Transpose and flatten function numpy
1 parent 676d8a6 commit afa2150

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Transpose_and_flatten.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Enter your code here. Read input from STDIN. Print output to STDOUT
2+
import numpy
3+
s=list(map(int,raw_input().split()))
4+
s1=[]
5+
for i in range(s[0]):
6+
s1.append(list(map(int,raw_input().split())))
7+
arr = numpy.array(s1)
8+
print numpy.transpose(arr)
9+
print arr.flatten()
10+

0 commit comments

Comments
 (0)