Skip to content
Snippets Groups Projects

Follow-Up Translations

Merged David Schäfer requested to merge translations into develop
Compare and Show latest version
1 file
+ 6
9
Compare changes
  • Side-by-side
  • Inline
+ 6
9
@@ -3,7 +3,7 @@
from functools import partial
from inspect import signature
from typing import Tuple, Any, Union, Callable
from typing import Tuple, Union, Callable
import numpy as np
import pandas as pd
@@ -144,8 +144,8 @@ def process(
>>> lambda temperature, uncertainty: np.round(temperature) * np.sqrt(uncertainty)
"""
# we get the data unmaskes in order to also receive flags,
# so let's ge to the masking manually
# we get the data unmasked in order to also receive flags,
# so let's do to the masking manually
data_masked, _ = _maskData(data, flags, data.columns, to_mask)
data[field] = _execGeneric(flags, data_masked, func, field, nodata).squeeze()
@@ -245,8 +245,8 @@ def flag(
>>> lambda level: np.sqrt(level) > 7
"""
# we get the data unmaskes in order to also receive flags,
# so let's ge to the masking manually
# we get the data unmasked, in order to also receive flags,
# so let's do to the masking manually
data_masked, _ = _maskData(data, flags, data.columns, to_mask)
mask = _execGeneric(flags, data_masked, func, field, nodata).squeeze()
@@ -255,9 +255,6 @@ def flag(
if not np.issubdtype(mask.dtype, np.bool_):
raise TypeError(f"generic expression does not return a boolean array")
if field not in flags.columns:
flags[field] = pd.Series(UNFLAGGED, index=mask.index, name=field)
flags[mask, field] = flag
flags[field] = mask.replace({False: UNFLAGGED, True: BAD})
return data, flags
Loading