Beispiel #1
0
    def test2(self):
        a = np.array([[1, 3], [1, 3]])

        assert_array_equal(demean(a), 
                           np.array([[-1, 1], [-1, 1]]))

        assert_array_equal(demean(a,0), 
                           np.zeros((2, 2), a.dtype))
Beispiel #2
0
    def test1(self):
        a = np.array([1, 3, 1, 3])

        assert_array_equal(demean(a), 
                           np.array([-1, 1, -1, 1]))