Open krishnaglodha opened 6 months ago
@krishnaglodha thanks for submitting the issue. I'll take a deeper look at NDVI and see if anything changed with recent 3.12 xarray-spatial release.
Can you tell post what type dc.nir.data
is...and dtype
, and shape
?
What happens if you make sure dc.nir
etc are 2d arrays by squeezing out any empty dimensions?
what baffled me is that is worked when I passed
data = load(
search.items(),
geopolygon=geometry,
chunks={},
resolution=1,
projection="epsg:3857",
).isel(time=0)
i.e. for time =0
but when I try to get
data = load(
search.items(),
geopolygon=geometry,
chunks={},
resolution=1,
projection="epsg:3857",
)
and then loop through data , I get error
@krishnaglodha you may be triggering a computation when running isel
...I'm not totally sure.
It sounds like there may be one layer in the response that does not have the dimensionality that you expect. If you loop through the layers and print each time step out, do you see that there are only two dimensions?
Describe the bug I'm trying to get statistical values of my
xarray.DataArray
in loop , but getting the errorExpected behavior I should be able to print
max
value CodeDesktop (please complete the following information):
Additional context Add any other context about the problem here.