diff --git a/Orange/preprocess/preprocess.py b/Orange/preprocess/preprocess.py index 44f7cc6f6f2..6843dc1072c 100644 --- a/Orange/preprocess/preprocess.py +++ b/Orange/preprocess/preprocess.py @@ -307,7 +307,8 @@ def __call__(self, data, threshold=None): self.threshold if isinstance(threshold, float): threshold = threshold * data.X.shape[0] - nans = np.sum(np.isnan(data.X), axis=0) + # compute nans in advance, otherwise dask will do it for every attribute + nans = np.asarray(np.sum(np.isnan(data.X), axis=0)) att = [a for a, n in zip(data.domain.attributes, nans) if n < threshold] domain = Orange.data.Domain(att, data.domain.class_vars, data.domain.metas)