Commit 537e4d24 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

updated subsetting._clip_array_at_mapPos()

updated __version__ and __versionalias__
parent 451cfbc2
Pipeline #561 passed with stages
in 1 minute and 7 seconds
......@@ -2,8 +2,8 @@
__author__ = """Daniel Scheffler"""
__email__ = 'danschef@gfz-potsdam.de'
__version__ = '0.5.5'
__versionalias__ = 'v20170724.01'
__version__ = '0.5.6'
__versionalias__ = 'v20170726.01'
from .baseclasses import GeoArray
......
......@@ -33,7 +33,7 @@ def _clip_array_at_mapPos(arr, mapBounds, arr_gt, band2clip=None, fillVal=0):
# get array metadata
rows, cols = arr.shape[:2]
bands = arr.shape[2] if len(arr.shape) == 3 else 1
bands = arr.shape[2] if arr.ndim == 3 else 1
arr_dtype = arr.dtype
ULxy, LLxy, LRxy, URxy = get_corner_coordinates(gt=arr_gt, rows=rows, cols=cols)
arrBounds = ULxy[0], LRxy[1], LRxy[0], ULxy[1]
......@@ -90,7 +90,7 @@ def _clip_array_at_mapPos(arr, mapBounds, arr_gt, band2clip=None, fillVal=0):
# fill newly created array with read data from input array
if tgt_bands==1:
out_arr[rS_out:rE_out + 1, cS_out:cE_out + 1] = data
out_arr[rS_out:rE_out + 1, cS_out:cE_out + 1] = data if data.ndim == 2 else data[:,:,0]
else:
out_arr[rS_out:rE_out + 1, cS_out:cE_out + 1,:] = data
......
......@@ -21,7 +21,7 @@ test_requirements = ["coverage"]
setup(
name='geoarray',
version='0.5.5',
version='0.5.6',
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