florpi / ili-summarizer

4 stars 1 forks source link

to_numpy -> np.array(...) #14

Closed maho3 closed 1 year ago

maho3 commented 1 year ago

https://github.com/florpi/ili-summarizer/blob/a559ae58ac2a1c26ed4435028cee82d8a0b890dc/summarizer/dataset.py#L98

xr.DataArray.to_numpy() was introduced in xarray version 0.19.0 ref.

However, the python 3.6 compatibility necessary to run pydelfi in Tensorflow 1.15 only works up to xarray==0.16.2. So, this function breaks...

However, a simple workaround is np.array(xr.DataArray) which works for all xarray versions