-
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
added first implementation of utils sub-module #342
Conversation
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.
This is probably the cause for the exception I saw.. About to recompile and test .. 🏃
code/utils/utils.c
Outdated
} | ||
} | ||
} else { | ||
for(uint8_t i = 0; i < len; i++) { |
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.
use size_t? uint8_t will probably not reach the end condition...
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.
Yes, this was the issue! with the documented crash.
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.
Indeed! 😊 Thanks for catching this!
This PR should address the issue raised in #341
The general problem is that peripheral devices do not necessarily supply data compatible with
ulab
's 5 supporteddtypes
. However, for the most common tasks, simple conversion functions can be added. With the help of these, arbitrary data formats could be converted to the supporetddtype
s. After the conversion, the standardulab
operations can be carried out on the data arrays.In the future, the
utils
sub-module could be the place, where useful, but notnumpy
-compatible functions working with or returningndarray
s could be stored.