diff --git a/Orange/data/table.py b/Orange/data/table.py index 04528c6d665..5dd0357d11c 100644 --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -982,7 +982,8 @@ def total_weight(self): def has_missing(self): """Return `True` if there are any missing attribute or class values.""" - return bn.anynan(self.X) or bn.anynan(self._Y) + missing_x = not sp.issparse(self.X) and bn.anynan(self.X) # do not check for sparse X + return missing_x or bn.anynan(self._Y) def has_missing_class(self): """Return `True` if there are any missing class values."""