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

Adds extra normalization to make np.random.choice happy #278

Merged
merged 8 commits into from
Aug 27, 2021
Merged

Conversation

nquesada
Copy link
Collaborator

Add extra normalization of binary probabilities so that numpy choice gets exactly what it wants. Relevant for this

https://github.com/XanaduAI/photonics/pull/43#issuecomment-906603908

@nquesada nquesada requested a review from josh146 August 26, 2021 17:43
Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this so quickly @nquesada!

Do you want to add this to the changelog, and then we can do a very small bugfix release?

@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #278 (6c4c3ed) into master (1542332) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #278   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         1439      1441    +2     
=========================================
+ Hits          1439      1441    +2     
Impacted Files Coverage Δ
thewalrus/samples.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1542332...6c4c3ed. Read the comment docs.

@josh146 josh146 merged commit e75ade1 into master Aug 27, 2021
@josh146 josh146 deleted the normalize branch August 27, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants