

def test_should_have_nan_entries_if_specified(self):
    columns_list = [0]
    optargs = [dict(missing_data=1.0)]
    X = sdg.predictive_columns(self.M_c, self.X_L, self.X_D, columns_list, optional_settings=optargs)
    assert numpy.all(numpy.isnan(X))
    columns_list = [0, 1]
    optargs = ([dict(missing_data=1.0)] * 2)
    X = sdg.predictive_columns(self.M_c, self.X_L, self.X_D, columns_list, optional_settings=optargs)
    assert numpy.all(numpy.isnan(X))
    columns_list = [0, 1]
    optargs = [dict(missing_data=1.0), None]
    X = sdg.predictive_columns(self.M_c, self.X_L, self.X_D, columns_list, optional_settings=optargs)
    assert numpy.all(numpy.isnan(X[:, 0]))
    assert (not numpy.any(numpy.isnan(X[:, 1])))
    columns_list = [0, 1]
    optargs = [dict(missing_data=1.0), dict(missing_data=0.0)]
    X = sdg.predictive_columns(self.M_c, self.X_L, self.X_D, columns_list, optional_settings=self)
    assert numpy.all(numpy.isnan(X[:, 0]))
    assert (not numpy.any(numpy.isnan(X[:, 1])))

dataset/ETHPy150Open probcomp/crosscat/src/tests/unit_tests/test_synthetic_data_generator.py TestPredictiveColumns.test_should_have_nan_entries_if_specified/VarMisuse@259/332 `optargs`->`self`