Skip to content
Snippets Groups Projects
Commit 1ef06155 authored by David Schäfer's avatar David Schäfer
Browse files

bugfix: we lost the values of untouched variables in the output

parent 054faa6a
No related branches found
No related tags found
1 merge request!14WIP: Expose the function parameter 'field' to the config
Pipeline #2588 passed with stage
in 6 minutes and 36 seconds
......@@ -71,7 +71,8 @@ def evalExpression(expr, data, field, flagger, nodata=np.nan):
# mask the already flagged value to make all the functions
# called on the way through the evaluator ignore flagged values
mask = flagger.isFlagged()
data_in = data.mask(mask)
data_in = data.copy()
data_in[mask] = np.nan
local_env, code = compileExpression(expr, data_in, field, flagger, nodata)
data_result, flagger_result = evalCode(code, FUNC_MAP, local_env)
# reinject the original values, as we don't want to loose them
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment