DOC: Suggest replacement for tostring_rgb#25502
Conversation
|
I think this makes sense! |
|
I am 👍🏻 on this and adding the note to the message itself as well. |
|
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. |
It seems like this should be the suggested replacement then, right? |
|
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. |
|
Okay pushed an updated version! |
|
Since you're touching this file, can you also rename it to |
|
@QuLogic done! |
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
* DOC: Suggest replacement * DOC: Better doc * DOC: Move
We hit this
DeprecationWarningin MNE-Python (EDIT: After 9c79686) and I had to go to the commits to see the comment thatargbshould 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.