-
Notifications
You must be signed in to change notification settings - Fork 118
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
Fix (u)int8 upcasting as per docs and numpy #650
Conversation
The upcasting rules are given here: micropython-ulab/code/ndarray_operators.c Line 32 in 4bde4ef
|
code/ndarray_operators.c
Outdated
} else if(rhs->dtype == NDARRAY_INT8) { | ||
results = ndarray_new_dense_ndarray(ndim, shape, NDARRAY_INT16); | ||
BINARY_LOOP(results, int16_t, uint8_t, int8_t, larray, lstrides, rarray, rstrides, *); | ||
results = ndarray_new_dense_ndarray(ndim, shape, NDARRAY_INT8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
b095b3c
to
889d87f
Compare
I think this is OK now, thanks! Could you, please, increment the sub-minor version here Line 36 in 4bde4ef
|
889d87f
to
17f82c2
Compare
OK, thanks! |
Close #649.
For testing with CircuitPython, see the branch https://github.com/s-ol/micropython-ulab/tree/fix-int8-upcasting.
Apologies if this breaks any tests that should have been updated, I couldn't get the test build to work on my system.