-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: ticket #1805, replace type char by signed char for tables. #77
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
There are other uses of char that cause problems when it is unsigned, so this patch is incomplete. However, it does allow numpy to run so that it can be tested. |
I expect the issue with the nditer perm should be a straightforward substitution of 'char' with 'signed char' or 'npy_int8' (maybe more clear) in the right places. Do you want to do that, or would you prefer I jump in? |
I've had the same thought of using 'npy_int8' for clarity, it seems more numeric. Last night I made a quick substitution in nditer and the macros just to see what happened and ended up with a lot of cast warnings, so that will take a bit of work but should be straightforward. The warnings should help get everything right. I think you would have an easier time there since you know which char variables you used for numeric purposes as opposed to simple buffering, flags, etc. |
This isn't as trivial as it looks at first, there are a lot of block level variables and explicit casts to (char) that the compiler doesn't flag, so making sure all instances are fixed isn't a sure thing. The iterator tests pass with the update, but the einsum tests are still failing. |
I pushed your changes together with a fix for the einsum fix (bug was in the label parsing). Do you want to add your newest commit which I didn't notice, validate my changes, and close up the bug? |
I added the last little commit and pushed it upstream. All the tests pass here but I'll make another check of the source tomorrow to see if I missed anything obvious. But I think this pull request can be closed. |
Merge in ~STEPAN.SINDELAR_ORACLE.COM/numpy-hpy from mq/GR-40304 to labs-hpy-port * commit 'f5a2c9c3ef2b8b13a7615410283a933df28eb3f7': doc update Revert "'HPyArrayDescr_Type' cannot be used in shared libraries" generate sources for _HPyArrayScalar_BoolValues clean up warnings Generate a multiarray HPy API
feat: Add vget_high_s8
The char type can be either signed or unsigned, the tables used for the type promotions need signed characters.