Reputation: 3659
I have this numpy ndarray nd
with shape (4,4)
.
[
[1.07 1.16 1.00 1.11]
[1.13 1.19 1.11 1.17]
[1.17 1.17 1.13 1.16]
[1.14 1.16 1.03 1.04]
]
I would like to reshape it to a ndarray to (2,2,4)
and it should look like this.
[
[
[1.07 1.16 1.00 1.11]
[1.13 1.19 1.11 1.17]
]
[
[1.17 1.17 1.13 1.16]
[1.14 1.16 1.03 1.04]
]
]
I am using python v3.6
Upvotes: 0
Views: 128