removed lambda function as it can't be pickled and therefore prevents multiprocessing
@@ -39,7 +39,7 @@ class FeatureParser:
self.rename_function = rename_function
if rename_function is None:
- self.rename_function = lambda x: x
+ self.rename_function = self._identity_rename_function # <- didn't use lambda function - it can't be pickled
def __call__(self, eopatch=None):
return self._get_features(eopatch)
@@ -232,6 +232,10 @@ class FeatureParser:
new_feature_name)
return feature_type, feature_name
+ @staticmethod
+ def _identity_rename_function(name):
+ return name
+
def get_common_timestamps(source, target):
"""Return indices of timestamps from source that are also found in target.
