Commit 976ca203 authored by Daniel Scheffler's avatar Daniel Scheffler

Improved GeoArray.get_subset(). Updated version info.

parent 597948bd
Pipeline #1656 passed with stages
in 1 minute and 41 seconds
......@@ -12,8 +12,8 @@ from .masks import CloudMask # noqa: E402
__author__ = """Daniel Scheffler"""
__email__ = 'danschef@gfz-potsdam.de'
__version__ = '0.7.7'
__versionalias__ = 'v20171130.01'
__version__ = '0.7.8'
__versionalias__ = 'v20171130.02'
__all__ = ['GeoArray',
'BadDataMask',
'NoDataMask',
......
......@@ -1409,8 +1409,9 @@ class GeoArray(object):
progress=progress)
return sub_arr, sub_gt, sub_prj
def get_subset(self, xslice=None, yslice=None, zslice=None, return_GeoArray=True, reset_bandnames=False):
# type: (slice, slice, slice, bool) -> GeoArray
def get_subset(self, xslice=slice(None), yslice=slice(None), zslice=slice(None), return_GeoArray=True,
reset_bandnames=False):
# type: (slice, slice, slice, bool, bool) -> GeoArray
"""Returns a new instance of GeoArray representing a subset of the initial one wit respect to given array position.
:param xslice: a slice providing the X-position for the subset in the form slice(xstart, xend, xstep)
......@@ -1421,9 +1422,6 @@ class GeoArray(object):
'B1', 'B2', 'B3', ...
:return:
"""
xslice, yslice, zslice = xslice or slice(None), yslice or slice(None), zslice or slice(None)
sub_arr = self[yslice, xslice, zslice] # row, col, band
if sub_arr is None:
......
......@@ -24,7 +24,7 @@ test_requirements = requirements + ["coverage", "nose", "nose2", "nose-htmloutpu
setup(
name='geoarray',
version='0.7.7',
version='0.7.8',
description="Fast Python interface for geodata - either on disk or in memory.",
long_description=readme + '\n\n' + history,
author="Daniel Scheffler",
......
Markdown is supported
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