def test_specific_wavelet(): a = dtwavexfm2_np(mandrill, biort=biort('antonini'), qshift=qshift('qshift_06')) b = dtwavexfm2_cl(mandrill, biort=biort('antonini'), qshift=qshift('qshift_06')) _compare_transforms(a, b)
def test_modified(): a = dtwavexfm2_np(mandrill, biort=biort('near_sym_b_bp'), qshift=qshift('qshift_b_bp')) b = dtwavexfm2_cl(mandrill, biort=biort('near_sym_b_bp'), qshift=qshift('qshift_b_bp')) _compare_transforms(a, b)
def test_simple(): _compare_transforms(dtwavexfm2_np(mandrill), dtwavexfm2_cl(mandrill))
def test_0_levels(): a = dtwavexfm2_np(lena, nlevels=0) b = dtwavexfm2_cl(lena, nlevels=0) _compare_transforms(a, b)
def test_odd_cols(): a = dtwavexfm2_np(lena[:,:509]) b = dtwavexfm2_cl(lena[:,:509]) _compare_transforms(a, b)
def test_0_levels(): a = dtwavexfm2_np(mandrill, nlevels=0) b = dtwavexfm2_cl(mandrill, nlevels=0) _compare_transforms(a, b)
def test_simple_w_scale(): Yl, Yh, Yscale = dtwavexfm2_cl(mandrill, include_scale=True) assert len(Yscale) > 0 for x in Yscale: assert x is not None
def test_simple(): _compare_transforms(dtwavexfm2_np(lena), dtwavexfm2_cl(lena))
def test_odd_rows_and_cols(): a = dtwavexfm2_np(mandrill[:509, :509]) b = dtwavexfm2_cl(mandrill[:509, :509]) _compare_transforms(a, b)
def test_3d(): with raises(ValueError): Yl, Yh = dtwavexfm2_cl(np.dstack((mandrill, mandrill)))
def test_1d(): a = dtwavexfm2_np(mandrill[0, :]) b = dtwavexfm2_cl(mandrill[0, :]) _compare_transforms(a, b)
def test_1d(): a = dtwavexfm2_np(mandrill[0,:]) b = dtwavexfm2_cl(mandrill[0,:]) _compare_transforms(a, b)
def test_1d(): a = dtwavexfm2_np(lena[0,:]) b = dtwavexfm2_cl(lena[0,:]) _compare_transforms(a, b)
def test_odd_rows_and_cols(): a = dtwavexfm2_np(mandrill[:509,:509]) b = dtwavexfm2_cl(mandrill[:509,:509]) _compare_transforms(a, b)
def test_3d(): Yl, Yh = dtwavexfm2_cl(np.dstack((lena, lena)))
def test_odd_rows(): a = dtwavexfm2_np(lena[:509,:]) b = dtwavexfm2_cl(lena[:509,:]) _compare_transforms(a, b)