0

How to flatten this array?

[ [ 1, 2, 3 ], [ 4, 5, 6 ] ]

21st May 2020, 3:38 PM
Lerninn
3 Answers
+ 3
# use .ravel method for this: import numpy as np t = np.array([1,2,3], [4,5,6]) print(t.ravel()) https://www.sololearn.com/learn/6678/?ref=app
21st May 2020, 4:05 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
Abhay thanks.
21st May 2020, 3:52 PM
Lerninn
+ 1
Kuba SiekierzyƄski Thanks, searching for this.
21st May 2020, 4:06 PM
Lerninn