jgrss / geowombat

GeoWombat: Utilities for geospatial data
https://geowombat.readthedocs.io
MIT License
182 stars 10 forks source link

Apply example #272

Closed mmann1123 closed 10 months ago

mmann1123 commented 1 year ago
def my_func(block, arg):
    return block * arg
import geowombat as gw

gw.apply('input.tif', 'output.tif', my_func, args=(10.0,), n_jobs=4)

I just tried the following example from the docs and I'm getting

TypeError: my_func() takes 2 positional arguments but 3 were given

Should be:

def my_func(w, block, arg):
    return w, block * arg
import geowombat as gw

gw.apply('input.tif', 'output.tif', my_func, args=(10.0,), n_jobs=4)