Commit 0f0bdeb1 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added type hints for 'metadata' attribute and 'meta' alias.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <>
parent f6b0fa2c
Pipeline #25486 canceled with stages
......@@ -6,6 +6,7 @@ History
* Fix for not updating the data type and array shape after the complete array was replaced.
* Added type hints for 'metadata' attribute and 'meta' alias.
0.13.1 (2021-07-09)
......@@ -35,7 +36,6 @@ History
* Updated package classifiers and added minimal Python version.
0.12.3 (2021-05-29)
......@@ -510,13 +510,14 @@ class GeoArray(object):
def metadata(self):
# type: () -> GDAL_Metadata
"""Return a DataFrame containing all available metadata (read from file if available).
Use 'metadata[band_index].to_dict()' to get a metadata dictionary for a specific band.
Use 'metadata.loc[row_name].to_dict()' to get all metadata values of the same key for all bands as dictionary.
Use 'metadata.loc[row_name, band_index] = value' to set a new value.
:return: pandas.DataFrame
:return: instance of GDAL_Metadata
if self._metadata is not None:
return self._metadata
......@@ -538,7 +539,7 @@ class GeoArray(object):
% (self.__class__.__name__, self.__class__.__name__))
self._metadata = meta
meta = alias_property('metadata')
meta = alias_property('metadata') # type: GDAL_Metadata
def __getitem__(self, given):
if isinstance(given, (int, float, slice, np.integer, np.floating)) and self.ndim == 3:
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