Handles NaN's#30
Merged
Merged
Conversation
csala
approved these changes
Sep 9, 2021
csala
left a comment
Contributor
There was a problem hiding this comment.
This looks fine to go!
Maybe it would be interesting to open an issue here, in DeepEcho, explaining the lack of support for np.nan and pointing at it from this PR, just to make everything consistent and keep track of the change.
| mu_idx, sigma_idx, missing_idx = props['indices'] | ||
| x[mu_idx] = 0.0 if (data[key][i] is None or props['std'] == 0) else ( | ||
| data[key][i] - props['mu']) / props['std'] | ||
| if pd.isnull(data[key][i]) or props['std'] == 0: |
Contributor
There was a problem hiding this comment.
I like the change from one-liner to if / else block!
It improves readability a lot, in this case.
This was referenced Sep 9, 2021
katxiao
approved these changes
Oct 11, 2021
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.
This PR has two purposes:
Resolves ValueError: The parameter loc has invalid values SDV#353. In that issue the user was passing NaN`s to SDV, and in turn SDV was passing them to DeepEcho, which was unable to handle them. This PR addresses this.
Update dependency versions. Since no one has worked on DeepEcho in a while, the latest versions of some libraries became incompatible. This PR caps those dependencies to working versions.
Resolves #35.