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

fixed bug: using a variable not listed in the configuration file

within in a generic test failed
parent 1b956e77
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,9 @@ def flagGeneric(data, field, flagger, func, **kwargs):
# DmpFlagger.isFlagged does not preserve the name of the column
# it was executed on -> would be nice to overcome this restriction
flags_field = func.name if func.name in data.columns else field
mask = func.squeeze() | flagger.isFlagged(flags_field)
mask = func.squeeze()
if flags_field in flagger.getFlags():
mask |= flagger.isFlagged(flags_field)
if np.isscalar(mask):
raise TypeError(f"generic expression does not return an array")
if not np.issubdtype(mask.dtype, np.bool_):
......
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