How to flatten this array? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How to flatten this array?

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

21st May 2020, 3:38 PM
Lerninn
3 Réponses
+ 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