Skip to content

Apply a function along the dimension #9303

Answered by keewis
mhungen asked this question in Q&A
Discussion options

You must be logged in to vote

you can pass additional arguments to the function applied by apply_ufunc using the kwargs keyword argument. So what I'd recommend is to write a function that works on numpy arrays and is vectorized (possibly using numba.guvectorize or numpy.vectorize), and you pass in the georeference data as kwargs={"spatial_ref": crs} or similar.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mhungen
Comment options

@keewis
Comment options

Answer selected by mhungen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants