handle mixed dtype cofficients correctly across inverse transforms#450
Merged
rgommers merged 7 commits intoPyWavelets:masterfrom Feb 4, 2019
Merged
handle mixed dtype cofficients correctly across inverse transforms#450rgommers merged 7 commits intoPyWavelets:masterfrom
rgommers merged 7 commits intoPyWavelets:masterfrom
Conversation
output array dtype is upcast if any detail coefficients have higher precision than the approximation coefficients.
Member
|
LGTM. There's some code repetition, but not enough to pull this out into separate routines probably. Related: I noticed the |
Member
|
Had another look through this, all looks fine so merging. Thanks @grlee77 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
idwtallows mixed precision approximation and detail coefficients in its input, promoting to double precision in the case of mixed single and double precision coefficients. This PR extends this behaviour to other inverse transforms.The lack of support for this in
iswtwas reported in #449, but a similar problem exists for other functions as well.commit 8fc0e70 in this PR fixes a separate bug in the
dtypeup-casting inidwtwhen C99 support is enabled and mixed precision complex-valued arrays are provided (in this case, upcasting should be to complex128 not float64).New tests for the desired behaviour have been added.
closes #449