You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would we pass arguments to the apply function? For instance if we want to change the
count to 1?
import geowombat as gw
# Function with one argument
def user_func(block, n):
return block * n
with gw.open('input.tif') as ds:
# Functions are given as 'apply'
ds.attrs['apply'] = user_func
# Function arguments (n) are given as 'apply_args'
ds.attrs['apply_args'] = [10.0]
ds.gw.save(
'output.tif',
num_workers=2,
overwrite=True,
compress='lzw'
)
The text was updated successfully, but these errors were encountered:
How would we pass arguments to the apply function? For instance if we want to change the
count to 1?
The text was updated successfully, but these errors were encountered: