I have an array which has the shape
>>> x.shape
>>> (10,)
>>> x.shape[0]
>>> (20,20,3)
I want to transform x into: (10,20,20,3)
.
YXes, np.stack did work. Thank you @hpaulj
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.