'Impute: As a distinct value test. Sparse support.
GH-2357'

def test_sparse(self):

    table = self._create_table()
    domain = table.domain
    table.X = sp.csr_matrix(table.X)
    (v1, v2) = impute.AsValue()(table, domain[1])
    self.assertTrue(np.all(np.isfinite(v2.compute_value(table))))
    self.assertEqual([v2.str_val(v) for v in v2.compute_value(table)], ['undef', 'def', 'undef'])
