Answer to Question #294727 in Python for saanvi

Question #294727

Write a code to convert a one dimensional array into three dimensional array using built-in function.


1
Expert's answer
2022-02-07T05:10:34-0500
import numpy as np

arr_1 = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
arr_3 = arr_1.reshape(3, 2, 2)
print(arr_3)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS