Skip to content

Commit

Permalink
expand docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
njwilson23 committed Apr 25, 2016
1 parent dc1af01 commit a943af4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion karta/raster/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,24 @@ def isdata(a):
return isdata(self[:,:])

def aschunks(self, size=(-1, -1), overlap=(0, 0), copy=True):
""" Generator for grid chunks of *size* and *overlap*.
""" Generator for grid chunks, useful for parallel or memory-controlled
grid processing.
Parameters
----------
size : tuple of two integers, optional
size of the chunks ot return (default approximately one-quarter of
each dimension)
overlap : tuple of two integers, optional
number of pixels of overlap (default (0, 0))
copy : bool
whether to force returned grids to be copies
warning: output may be a copy regardless, depending on the band class
Yields
------
RegularGrid
smaller grids
"""
ny, nx = self.size
if size == (-1, -1):
Expand Down

0 comments on commit a943af4

Please sign in to comment.