Skip to main content

I am using a python scripts template instance and when executing the following workflow:


workflow = LinearWorkflow(
add_data,
add_clm,
NDVI,
NDWI,
NORM,
add_sh_valmask,
count_val_sh,
*land_cover_task_array,
concatenate,
filter_task,
linear_interp,
erosion,
spatial_sampling,
save_s2)

I got this error:


When I used this code instead of the standard from eolearn.features import EuclideanNormTask , I think it got solved because. Does it mean that the built-in EuclideanNormTask is bugged?


class EuclideanNorm(EOTask):   
"""
The tasks calculates Euclidian Norm of all bands within an array:
norm = sqrt(sum_i Bi**2),
where Bi are the individual bands within user-specified feature array.
"""
def __init__(self, feature_name, in_feature_name):
self.feature_name = feature_name
self.in_feature_name = in_feature_name

def execute(self, eopatch):
arr = eopatch.dataaself.in_feature_name]
norm = np.sqrt(np.sum(arr**2, axis=-1))

eopatch.add_feature(FeatureType.DATA, self.feature_name, normo..., np.newaxis])
return eopatch
Be the first to reply!

Reply