Reshape 2D to 3D array in Python

Publié le: 07 mai 2022
sur la chaîne: SolvingBugs
1,110
19

Code example:
import numpy as np
arr = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]])
newarr = arr.reshape(arr.shape[0], 1, arr.shape[1])

If you have any further question, please write it down on the comments below...

#python #programmingpython #reshapearray #arraypython #solvingbugs


Sur cette page du site, vous pouvez voir la vidéo en ligne Reshape 2D to 3D array in Python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur SolvingBugs 07 mai 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,110 fois et il a aimé 19 téléspectateurs. Bon visionnage!