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

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
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation ZC: PyNEST DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL
Milestone

Comments

@mschmidt87
Copy link

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 heplesser added ZC: PyNEST DO NOT USE THIS LABEL I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) ZP: PR Created DO NOT USE THIS LABEL S: High Should be handled next T: Bug Wrong statements in the code or documentation labels Mar 16, 2017
@heplesser
Copy link
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?

@mschmidt87
Copy link
Author

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

@heplesser
Copy link
Contributor

Fixed by merge of #681.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation ZC: PyNEST DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL
Projects
None yet
Development

No branches or pull requests

2 participants