Issue
if I have a numpy array of shape
(16, 224, 224, 6)
how can I reshape it to
(224, 224, 6*16)
so that all elements are still in the new shape? P.S.:I need a numpy answer and not an answere derived from pytorch please :)
Solution
I believe you can use transpose
and reshape
:
a.transpose([1,2,3,0]).reshape(244,244,-1)
Answered By - Quang Hoang
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.