Closed mattijn closed 2 years ago
@jgrss is it possible to downgrade geowombat
and/or xarray
to solve the issue?
Yes, you can use current version of geowombat with:
pip install xarray==2022.3.0
The following workaround solved the problem for me, but maybe this is not a really good solution. Only tested on calculating Band Math & Vegetation Indices following this guide.
Searching the repo: https://github.com/jgrss/geowombat/search?q=xarray.ufuncs&type=code Reveals at least one file needs updating:
In the given file I commented the lines 26 & 27 out (see above) and changed the xarray min/max function to numpy.minimum()
and numpy.maximum()
as follows:
if overlap == 'min':
ds = np.minimum(ds, dsb)
elif overlap == 'max':
ds = np.maximum(ds, dsb)
elif overlap == 'mean':
ds = (ds + dsb) / 2.0
Yes, you can use current version of geowombat with:
pip install xarray==2022.3.0
Finally, after a bit of back and forth, I was able to freshly install geowombat
and than downgrade xarray
to the suggested version with conda
. This works fine for me.
Thank you @mattijn
@jgrss just opened a pull request to resolve this.
@mmann1123 What is the status of PR #186? Was it closed because we had discussed using the fixes in jgrss/store?
Yes, you can use current version of geowombat with:
pip install xarray==2022.3.0
Thanks for comfirming this, @mattijn -- a branch in the waiting that should push geowombat to v2.0.0
has xarray>=2022.6.0
.
@jgrss I intended PR #186 to resolve the ufunc issues but then some tests were failing in ML and another elsewhere, I was worried I had inadvertently pushed some old ML code, so closed it. But I think we need to push the jgrss/store. I will try to test it today, but its first day of classes so things are busy. Might be a few days. But I figure jgrss/store can't make things worse - since people can't write out files - and would likely fix things. But I defer to you on that.
Should be addressed with #189.
Xarray has removed support for the deprecated
xarray.ufuncs
functions since versionv2022.06.rc0
: https://docs.xarray.dev/en/stable/whats-new.html#breaking-changes.Now I receive the following error:
Searching the repo: https://github.com/jgrss/geowombat/search?q=xarray.ufuncs&type=code Reveals at least one file needs updating: https://github.com/jgrss/geowombat/blob/342bb2b518350ac1617dcca3329b9645862c17c9/src/geowombat/backends/xarray_.py#L26-L27 Linked issue: https://github.com/jgrss/geowombat/issues/42