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

PyNEST testsuite: test_quantal_stdp_synapse fails with Numpy 1.12.0 due to float index #680

Closed
mschmidt87 opened this Issue Mar 15, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@mschmidt87

mschmidt87 commented Mar 15, 2017

I recently installed the latest release of numpy, which is 1.12.0. Note that the release contained in the Ubuntu repositories is 1:1.11.1~rc1-1ubuntu1 for Ubuntu 16.10. To my understanding, numpy 1.12.0 will be contained in the repositories of Ubuntu 17.04 (see http://packages.ubuntu.com/search?keywords=python-numpy).

In this version of numpy, using float as an index for numpy arrays throws an error (instead of a warning as in the previous releases). This causes the quantal_stdp_synapse test to file with the error:

TypeError: 'float' object cannot be interpreted as an index

To solve this, I suggest to replace the float variables used as indices by int() when they are used as indices to numpy arrays. Alternatively, one could also define them as int in the first place, but the first option is already being used in the test script, so I will implement this and create a pull request.

If I understand the configuration file for travis correctly, we are using 14.04 (Trusty) for Travis. is this intentional? Don't we want to use the newest version of Ubuntu? Or at least the newest LTS version?

To use the newest version of numpy, I suggest to add numpy to the packages installed by pip rather than apt-get and specify 1.12.0 directly, just like it is done for cython.

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Mar 16, 2017

Contributor

@mschmidt87 Thanks for reporting and fixing this!

Concerning the change of tools/versions, this is a more complicated issue and should be handled in a separate issue here. I much agree that we need to test with up-to-date tools, but we also need to test against old versions of tools. Otherwise, we risk that people running, e.g., LTS versions of Linux distributions or work on supercomputers (which tend to be rather late wrt versions), may no longer be able to run NEST because we added features that are not supported in older versions. We need to agree on a range of versions that we support and have a test for the oldest as well as cutting-edge. Could you open a separate issue for this?

Contributor

heplesser commented Mar 16, 2017

@mschmidt87 Thanks for reporting and fixing this!

Concerning the change of tools/versions, this is a more complicated issue and should be handled in a separate issue here. I much agree that we need to test with up-to-date tools, but we also need to test against old versions of tools. Otherwise, we risk that people running, e.g., LTS versions of Linux distributions or work on supercomputers (which tend to be rather late wrt versions), may no longer be able to run NEST because we added features that are not supported in older versions. We need to agree on a range of versions that we support and have a test for the oldest as well as cutting-edge. Could you open a separate issue for this?

@mschmidt87

This comment has been minimized.

Show comment
Hide comment
@mschmidt87

mschmidt87 Mar 16, 2017

Okay, sure, I certainly agree. I will open an issue with regards to this and take the travis modification out of #681 .

mschmidt87 commented Mar 16, 2017

Okay, sure, I certainly agree. I will open an issue with regards to this and take the travis modification out of #681 .

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Mar 30, 2017

Contributor

Fixed by merge of #681.

Contributor

heplesser commented Mar 30, 2017

Fixed by merge of #681.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment