Write a code to convert a one dimensional array into three dimensional array using built-in function.
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?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment