Skip to content

Commit 380b2c3

Browse files
committed
impute: Speedup DropInstances
1 parent 8096584 commit 380b2c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Orange/preprocess/impute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class DropInstances(BaseImputeMethod):
8282
description = ""
8383

8484
def __call__(self, data, variable):
85-
index = data.domain.index(variable)
86-
return np.isnan(data[:, index]).reshape(-1)
85+
col, _ = data.get_column_view(variable)
86+
return np.isnan(col)
8787

8888

8989
class Average(BaseImputeMethod):

0 commit comments

Comments
 (0)