-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Fix order='K' behavior for tobytes #19718
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
Conversation
At the very least this PR should have some text description
There should also be tests that fail before the PR and pass after |
Sure, I will write a description. |
There are no conflicts and all checks have passed, please merge it with the main, so I can close the Pull Request. |
That is not the way this works. Your PR will be reviewed. If there are no corrections or modifications needed (which is rare), and if it does not require further consideration, it may be merged. If it is not commented on for week, then you can ping with a reminder, but certainly not after 2 hours. |
If the PR is meant to solve an issue, please use the magic incantation "Fixes #16569" so github will connect the two and close the issue if the PR is merged. Note how after I made this comment the "Linked issues" section on the right hand side now relates to that issue. |
I think this should do, it is ready to be merged. |
It is not ready to be reviewed. You need to add a test. I would suggest |
I added a test in |
Please merge it with main. |
Rather than requesting a merge, please request a review. It may be only a small semantic difference, but it shows you understand that reviewing code can be as hard as fixing code, and that it may take a few days or weeks for review to happen. Changes like these often have unwanted side effects that must be carefully considered before approval. |
Where is the test? |
This looks a lot like it is currently (mostly?) equivalent to gh-16328. Now that PR was possibly almost practically ready... I had some pending comments there: 1. |
Ahh, so I think we should close this and continue the work in #16328. |
The code part that implements the tobytes is almost the same. This passes all the checks. |
I committed it, so the branch has no conflicts with the base branch and it is ready to merge. |
This patch (77f8226) seems to match gh-16328 exactly. @shubham11941140, it is fine to copy code from stale PRs, but only if you make it clear what the original PR was and who the original author was (preferably with a In the likely event that your contribution is to fulfill part of a degree requirement, you are at risk of breaching plagiarism rules, which in many institutions including yours can be a serious offence that if repeated can lead to disqualification from your course:
|
I can do that, but I am unaware of the process. Could you please do that? |
Ok can you open it again, I will commit again with a different code. Please could you delete the plag comments. |
Please reopen the PR as I cant open it |
Please reopen it. |
@eric-wieser please reopen the PR. |
I have mentioned revival of PR. |
Please remove the comments that involve the copy keyword. |
The tobytes method of ndarray accepts 'K' for the order keyword argument, but appears not to keep the order as expected.
Reproducing Code Example:
The above stated test case
This edit in the "convert.c" file actually solves the tobyte conversion issue. It parses the array and converts each value to the necessary byte value as expected.
Reviving #16328
"Fixes #16569"