Skip to content
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

50.2 argmax, argmin, min, max weird behaviour int8 and uint8 datatypes #129

Closed
mz3-andrey opened this issue Jun 29, 2020 · 3 comments
Closed

Comments

@mz3-andrey
Copy link

Am running 50.2 on my openmv's now, but my code started doing weird things.
I looked further into it and noticed min, max, argmin and argmax were the culprit.
Issue #2984 mentions a fix as they weren't working for int16's before, but now only int16s seem to work.

My test:

print(min, max, argmin, argmax) of a given array.
dtypes of float, and uint16 and int16 work exactly as expected.
But for:
[-2, 4, 2, -1, 6, 1, 0, -1], dtype=np.int8 the print result is -2, 116, 0, 5
and for
[5, 7, 1, 4, 8], dtype=np.uint8 the print result is 0, 5, 2, 0

@v923z
Copy link
Owner

v923z commented Jun 29, 2020

Thanks for reporting the issue! Something is clearly wrong here, I will look into it.

v923z added a commit that referenced this issue Jun 29, 2020
v923z added a commit that referenced this issue Jun 29, 2020
fixed argmin/argmax error in issue #129
@v923z
Copy link
Owner

v923z commented Jun 29, 2020

@mz3-andrey #130 fixes the issue.

@jepler Jeff, could you, please, pull this into circuitpython? You can use the https://github.com/v923z/micropython-ulab/tree/0.51.1 tag.

@v923z v923z closed this as completed Jun 29, 2020
@mz3-andrey
Copy link
Author

Great thanks! I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants