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

TVB-2719 Fix build_ext warnings #37

Merged
merged 4 commits into from
Jun 5, 2020
Merged

Conversation

ayan-b
Copy link
Member

@ayan-b ayan-b commented Jun 1, 2020

This PR aims to remove the warning generated after running python setup.py build_ext --inplace.

Closes #19

@ayan-b ayan-b changed the title TVB-2719 Fix build_ext errors [WIP] TVB-2719 Fix build_ext errors Jun 1, 2020
@ayan-b
Copy link
Member Author

ayan-b commented Jun 1, 2020

I am not entirely sure why in some places char is used for int datatype (to save space maybe?) and if I should change them to get rid of the warnings.

@ayan-b ayan-b changed the title [WIP] TVB-2719 Fix build_ext errors TVB-2719 Fix build_ext errors Jun 3, 2020
@ayan-b ayan-b changed the title TVB-2719 Fix build_ext errors TVB-2719 Fix build_ext warnings Jun 3, 2020
@ayan-b
Copy link
Member Author

ayan-b commented Jun 3, 2020

@liadomide, this PR removes some of the warnings, they are -

  • FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release!
  • local variable 'distance' referenced before assignment.

Warnings not removed -

  • numpy deprecated warning #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION", now if I add that macro the build fails altogether with error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘dimensions’. Looks like someone else has also encountered the same error https://gitlab.kwant-project.org/kwant/kwant/-/merge_requests/251.
  • char is used as an array index. An easy fix is changing the char datatype to int, however, I am not entirely sure if I should do that as the author may have some other intentions in his mind.

Also, I fixed some typos and moved a piece of code of both the functions local_gdist_matrix and compute_gdist to another function in this PR.

@liadomide liadomide added this to the GSOC2020 milestone Jun 5, 2020
@liadomide liadomide merged commit 8c2bf68 into the-virtual-brain:trunk Jun 5, 2020
@ayan-b ayan-b deleted the numpy branch June 6, 2020 05:39
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.

Numpy requirement in setup is causing installation problems
2 participants