Padding of the cwt_a function in pycwt.py fails when the signal length is odd.

Bug #1836852 reported by Takashi Sato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
swan
Fix Committed
Undecided
Unassigned

Bug Description

You are trying to reduce the odd shift, but increased it.

The problem points are as follows :
L.183 in pycwt.py
```
    padlen2 = evenp(siglen) and padlen1 or padlen1+1
```

It seems to be necessary to fix it as follows.
```
    padlen2 = evenp(siglen) and padlen1 or padlen1-1
```

Revision history for this message
A Brazhe (brazhe) wrote :

 Thank you, Takashi! I've now added the suggested fix

Changed in swan:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.