def test_ctrl(self, comps, ctrl): """ctrl must be an array with the same shape as the components""" with pytest.raises(TypeError): eeglcf._mix(10, comps, 'error', comps) with pytest.raises(TypeError): eeglcf._mix(10, comps, [0, 1, 2], comps) with pytest.raises(ValueError): eeglcf._mix(10, comps, np.zeros([4] * 2), comps) with pytest.raises(ValueError): eeglcf._mix(10, comps, np.zeros([4] * 4), comps) with pytest.raises(ValueError): eeglcf._mix(10, comps, ctrl[:, 0:2], comps)
def test_core_no_comp1(self, comps, ctrl): """Mixing without *comp1*""" eeglcf._mix(10, comps, ctrl, None)
def test_comps(self, comps, ctrl): """comp0 and comp1 must have equal shape""" with pytest.raises(ValueError): eeglcf._mix(10, comps, ctrl, comps[:, 0:2])
def test_core(self, comps, ctrl): """Functional test""" eeglcf._mix(10, comps, ctrl, comps)