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

Remove deprecated argument of pyplot.stem #6086

Merged
merged 2 commits into from
May 8, 2023

Conversation

pavoljuhas
Copy link
Collaborator

use_line_collection is deprecated and defaults to True anyway.
Prevent deprecation messages from showing up at
https://quantumai.google/cirq/experiments/fourier_checking

`use_line_collection` is deprecated and defaults to `True` anyway.
Prevent deprecation messages from showing up at
https://quantumai.google/cirq/experiments/fourier_checking
@pavoljuhas pavoljuhas requested review from a team, vtomole and cduck as code owners May 4, 2023 20:05
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pavoljuhas
Copy link
Collaborator Author

Requires #6087 to pass the CI.

@CirqBot CirqBot added the Size: XS <10 lines changed label May 6, 2023
Copy link
Collaborator

@viathor viathor left a comment

Choose a reason for hiding this comment

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

Here's what I've found:

  1. use_line_collection used to default to False. The default changed to True in matplotlib 3.3.0, see release notes.
  2. use_line_collection is deprecated since matplotlib 3.6.0, see documentation.
  3. We depend on matplotlib ~3.0, see requirements.txt.

Perhaps we should upgrade matplotlib dependency first?

@pavoljuhas
Copy link
Collaborator Author

Perhaps we should upgrade matplotlib dependency first?

Thank you for careful checking. The return value from the touched stem calls is not used.
IIUC, use_line_collection affects only the return type and a plotting performance,
but the resulting plots should look the same.
As such, I don't think it is necessary to change the matplotlib requirement.

Copy link
Collaborator

@viathor viathor left a comment

Choose a reason for hiding this comment

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

Fair enough. Thank you!

@pavoljuhas pavoljuhas merged commit df3acbe into quantumlib:master May 8, 2023
@pavoljuhas pavoljuhas deleted the notebook-tweaks branch May 8, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants