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

Revise bincount checks #393

Merged
merged 2 commits into from Jul 2, 2018
Merged

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Jun 27, 2018

Check if Matrix arrays are allocated correctly

If size is too big or the computer is unable to allocate memory for the output texture matrices, the function (PyArray_SimpleNew) returns NULL. Check for this and throw a python runtime error if that is the case.

Replace the large number with INT_MAX in the size check for increased readability.

Finally, update the documentation by adding detailed description of the potential errors thrown by the C extension in the FAQ section.

cc @Radiomics/developers

If size is too big or the computer is unable to allocate memory for the output texture matrices, the function (PyArray_SimpleNew) returns NULL. Check for this and throw a python runtime error if that is the case.

Replace the large number with `INT_MAX` in the size check for increased readability.
Add an explanation of the various errors thrown by the C extensions when calculating texture features in the C extensions to the FAQ section of the documentation. Also add some pointers to potential solutions where appropriate.
@JoostJM JoostJM merged commit 69933c7 into AIM-Harvard:master Jul 2, 2018
@JoostJM JoostJM deleted the revise-bincount-checks branch July 2, 2018 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants