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

Fix reference to np.random.poisson #4452

Merged
merged 5 commits into from
Aug 20, 2021
Merged

Conversation

viathor
Copy link
Collaborator

@viathor viathor commented Aug 20, 2021

Fixes mypy's complaint:

$ ./check/mypy 
cirq-core/cirq/contrib/acquaintance/gates_test.py:20: error: Module 'numpy.random' has no attribute 'poisson'
Found 1 error in 1 file (checked 925 source files)

See the code snippet in this document for background on this change.

@viathor viathor requested review from cduck, vtomole and a team as code owners August 20, 2021 22:25
@viathor viathor requested a review from maffoo August 20, 2021 22:25
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Aug 20, 2021
@CirqBot CirqBot added the Size: XS <10 lines changed label Aug 20, 2021
@vtomole
Copy link
Collaborator

vtomole commented Aug 20, 2021

@viathor #4451 :)

@viathor
Copy link
Collaborator Author

viathor commented Aug 20, 2021

Well, #4451 does fix the immediate problem (mypy's complaint), but it still uses the old way of doing things that is discouraged by numpy documentation. The present PR upgrades our usage, so I'm keeping it up :-)

@vtomole
Copy link
Collaborator

vtomole commented Aug 20, 2021

Oh that makes sense.

Copy link
Collaborator

@vtomole vtomole left a comment

Choose a reason for hiding this comment

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

LGTM

@vtomole vtomole added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Aug 20, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Aug 20, 2021
@CirqBot CirqBot merged commit 743c5ba into quantumlib:master Aug 20, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Aug 20, 2021
@viathor viathor deleted the poisson branch August 20, 2021 23:53
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Fixes mypy's complaint:

```
$ ./check/mypy 
cirq-core/cirq/contrib/acquaintance/gates_test.py:20: error: Module 'numpy.random' has no attribute 'poisson'
Found 1 error in 1 file (checked 925 source files)
```

See the code snippet in [this document](https://numpy.org/doc/stable/reference/random/index.html#random-quick-start) for background on this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants