Commit 1f038140 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Updated minimal version of py_tools_ds which fixes a TypeError in...


Updated minimal version of py_tools_ds which fixes a TypeError in GeoArray.save if nodata value has a numpy data type. Force Python data type in GeoArray.nodata setter.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent c4f19a4b
......@@ -2,6 +2,13 @@
History
=======
0.13.4 (2021-07-12)
-------------------
* Updated minimal version of py_tools_ds which fixes a TypeError in GeoArray.save if nodata value has a numpy data type.
* Force Python data type in GeoArray.nodata setter.
0.13.3 (2021-07-12)
-------------------
......
......@@ -379,7 +379,14 @@ class GeoArray(object):
@nodata.setter
def nodata(self, value):
# type: (Union[int, None]) -> None
# type: (Optional[bool, int, float]) -> None
if isinstance(value, np.bool_):
value = bool(value)
elif isinstance(value, np.integer):
value = int(value)
elif isinstance(value, np.floating):
value = float(value)
self._nodata = value
if self._metadata and value is not None:
......
......@@ -43,7 +43,7 @@ req = [
'numpy',
'pandas',
'pyepsg', # optional dependency of cartopy, needed by geoarray
'py_tools_ds>=0.14.35',
'py_tools_ds>=0.17.6',
'scikit-image',
'shapely'
]
......
......@@ -11,7 +11,7 @@ dependencies:
- holoviews
- matplotlib
- numpy
- py-tools-ds>=0.14.35
- py-tools-ds>=0.17.6
- scikit-image
- shapely
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment