-
Dear professor, why data_reprojected.shape produces (x,y,band) but data_reprojected.rio.shape drops the band (x,y) |
Beta Was this translation helpful? Give feedback.
Answered by
giswqs
Oct 13, 2024
Replies: 1 comment
-
It is probably because the result only has one band, the band is automatically dropped. You can https://numpy.org/doc/2.0/reference/generated/numpy.expand_dims.html |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
giswqs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is probably because the result only has one band, the band is automatically dropped. You can
numpy.expand_dims
to add dimensions if needed.https://numpy.org/doc/2.0/reference/generated/numpy.expand_dims.html