Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserve single precision in CWT #507

Merged
merged 2 commits into from
Jul 26, 2019
Merged

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jul 26, 2019

As discussed with @alsauve in #479, cwt currently promotes single precision inputs to double precision. This behavior is inconsistent with all other transforms in PyWavelets.

In this PR:
1.) the output array is declared matching the precision of the input.
2.) the internal convolution or FFT-based convolutions operate at the precision of the input

Aside from consistency this can improve performance and reduce memory use when working with single precision data.

@grlee77 grlee77 added this to the v1.1 milestone Jul 26, 2019
@rgommers rgommers merged commit 9563a43 into PyWavelets:master Jul 26, 2019
@rgommers
Copy link
Member

LGTM, thanks @grlee77

@grlee77 grlee77 deleted the cwt_dtype_fix branch November 13, 2019 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants