Skip to content

Commit 25ac274

Browse files
committed
TST: add test for waverec approx/detail shape mismatch error
1 parent 7502b53 commit 25ac274

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pywt/tests/test_multilevel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,13 @@ def test_waverec_axis_error():
538538
assert_raises(ValueError, pywt.waverec, c, 'haar', axis=1)
539539

540540

541+
def test_waverec_shape_mismatch_error():
542+
c = pywt.wavedec(np.ones(16), 'haar')
543+
# truncate a detail coefficient to an incorrect shape
544+
c[3] = c[3][:-1]
545+
assert_raises(ValueError, pywt.waverec, c, 'haar', axis=1)
546+
547+
541548
def test_wavedec2_axes_errors():
542549
data = np.ones((4, 4))
543550
# integer axes not allowed

0 commit comments

Comments
 (0)