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

Avoid NaN values in WeightedSnapshot #1233

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

arteam
Copy link
Member

@arteam arteam commented Dec 19, 2017

Theoretically, we could have a snapshot with the values which have zero weights. In this case a normalized weight will have a NaN value, because 0/0 = NaN. We should avoid it and in case a weight is zero, make the normalized weight zero too.

See #1230 and #1173

Theoretically, we could have a snapshot with the values which have
zero weights. In this case a normalized weight will have a NaN value,
because 0/0 = NaN. We should avoid it and in case a weight is zero,
make the normalized weight zero too.
@arteam arteam merged commit 6d44afd into 4.0-development Dec 19, 2017
@arteam arteam deleted the add_weighted_snapshot_nan_check branch December 19, 2017 20:45
@arteam arteam added this to the 3.2.6 milestone Dec 19, 2017
@arteam arteam added the bug label Dec 19, 2017
arteam added a commit that referenced this pull request Dec 19, 2017
Theoretically, we could have a snapshot with the values which have
zero weights. In this case a normalized weight will have a NaN value,
because 0/0 = NaN. We should avoid it and in case a weight is zero,
make the normalized weight zero too.
arteam added a commit that referenced this pull request Dec 21, 2017
Theoretically, we could have a snapshot with the values which have
zero weights. In this case a normalized weight will have a NaN value,
because 0/0 = NaN. We should avoid it and in case a weight is zero,
make the normalized weight zero too.
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.

1 participant