# Path: scikits/talkbox/tools/preprocess.py
# def demean(x, axis=-1):
#     return x - np.mean(x,axis)


import numpy as np
from numpy.testing import *
from scikits.talkbox.tools.preprocess import demean
       

class TestDeman(TestCase):
    def test1(self):
        a = np.array([1, 3, 1, 3])

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

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


# Path: scikits/talkbox/tools/preprocess.py
# def demean(x, axis=-1):
#     return x - np.mean(x,axis)


# Path: scikits/talkbox/tools/tests/test_preprocess.py
import numpy as np
from numpy.testing import *
from scikits.talkbox.tools.preprocess import demean

       

class TestDeman(TestCase):
    def test1(self):
        a = np.array([1, 3, 1, 3])

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

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


        assert_array_equal(demean(a), 