Write a NumPy program to move axes of an array to new positions. Other axes remain in their original order
- برمجة بايثون
- 2021-09-12
- mhanasmh00489829403
الأجوبة
import numpy as np
x = np.zeros((2, 3, 4))
print(np.moveaxis(x, 0, -1).shape)
print(np.moveaxis(x, -1, 0).shape)
Sample Output:
(3, 4, 2) (4, 2, 3)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال