forgot offset in GeometryIndexed.__getitem__ with slice
This commit is contained in:
parent
ebed7aa42f
commit
24c0f2c6a9
1 changed files with 4 additions and 4 deletions
|
@ -155,10 +155,10 @@ class GeometryIndexed:
|
|||
maxy = int(math.ceil(yy.stop / self.resolution))
|
||||
|
||||
height, width = self.data.shape
|
||||
minx = min(self.x, minx)
|
||||
miny = min(self.y, miny)
|
||||
maxx = max(self.x + width, maxx)
|
||||
maxy = max(self.y + height, maxy)
|
||||
minx = min(self.x, minx) - self.x
|
||||
miny = min(self.y, miny) - self.x
|
||||
maxx = max(self.x + width, maxx) - self.y
|
||||
maxy = max(self.y + height, maxy) - self.y
|
||||
|
||||
return self.data[miny:maxy, minx:maxx].flatten()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue