Exemplo n.º 1
0
    def test_check_constant_value(self):
        """check_constant_value return True if the array is constant."""
        # Setup
        X = np.array([1, 1, 1, 1])

        # Run
        uni = Univariate()
        constant = uni._check_constant_value(X)

        # Check
        assert constant
Exemplo n.º 2
0
    def test_check_constant_value_non_constant(self):
        """_check_constant_value returns False if the array is not constant."""
        # Setup
        X = np.array([1, 2, 3, 4])

        # Run
        uni = Univariate()
        constant = uni._check_constant_value(X)

        # Check
        assert not constant