Skip to content

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jul 23, 2019

The cython function dwt_axis did not have a guard against zero-length inputs. This could result in PyWavelets getting stuck in an infinite loop as reported in #505 for datasets with more than 1 dimension where a transform along an axis with size zero was performed. The fix applied here applies to all dwt and wavedec functions. There was already a check like this in the case of dwt and wavedec for 1D data.

The SWT functions did not suffer from the same infinite loop issue, but I have added similar checks there with the same error type for consistency with the DWT case.

closes #505

@grlee77 grlee77 added the bug label Jul 23, 2019
@rgommers rgommers merged commit 9ce883e into PyWavelets:master Jul 24, 2019
@rgommers
Copy link
Member

LGTM, merged. Thanks @grlee77

The fix applied here applies to all dwt and wavedec functions except.

incomplete sentence, want to edit that?

@rgommers rgommers added this to the v1.1 milestone Jul 24, 2019
@grlee77 grlee77 deleted the guard_against_size0_axes branch November 13, 2019 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data with an axis of length of 0 infinite loops

2 participants