Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: Suggest replacement for tostring_rgb#25502

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 3 commits intomatplotlib:mainfromlarsoner:doc
Mar 23, 2023
Merged

Conversation

larsoner
Copy link
Contributor

@larsonerlarsoner commentedMar 19, 2023
edited
Loading

We hit thisDeprecationWarning in MNE-Python (EDIT: After9c79686) and I had to go to the commits to see the comment thatargb should cover most use cases.

If this makes sense to add then I'll modify the actual warning itself, too, which would have made finding the workaround even faster.

@larsonerlarsoner marked this pull request as draftMarch 19, 2023 11:02
@oscargus
Copy link
Member

I think this makes sense!

@tacaswell
Copy link
Member

I am 👍🏻 on this and adding the note to the message itself as well.

@anntzer
Copy link
Contributor

Note that it was also suggested to deprecate tostring_argb (#25484 (review)). In the use case of mne-python (mne-tools/mne-python#11574?) I would suggest using e.g.np.array(canvas.buffer_rgba()) instead.

@larsoner
Copy link
ContributorAuthor

I would suggest using e.g. np.array(canvas.buffer_rgba()) instead.

It seems like this should be the suggested replacement then, right?

anntzer reacted with thumbs up emoji

@anntzer
Copy link
Contributor

It's not really a direct replacement, as the channel order is not the same; it depends on what exactly you want (but in the case of MNE python you're really just checking that the values are the same, so the channel order doesn't matter). Also this doesn't do the conversion-to-a-string that in MNE-python's case gets immediately undone by np.frombuffer.

@larsonerlarsoner marked this pull request as ready for reviewMarch 20, 2023 18:23
@larsoner
Copy link
ContributorAuthor

Okay pushed an updated version!

@QuLogicQuLogic changed the titleDOC: Suggest replacementDOC: Suggest replacement for tostring_rgbMar 20, 2023
@QuLogic
Copy link
Member

Since you're touching this file, can you also rename it to25484-AL.rst?

@larsoner
Copy link
ContributorAuthor

@QuLogic done!

@QuLogicQuLogic added this to thev3.8.0 milestoneMar 23, 2023
@QuLogicQuLogic merged commit2f7f62e intomatplotlib:mainMar 23, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm left review comments

@QuLogicQuLogicQuLogic approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

6 participants
@larsoner@oscargus@tacaswell@anntzer@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp