PyNEST testsuite: test_quantal_stdp_synapse fails with Numpy 1.12.0 due to float index #680
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
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 thequantal_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 asint
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.
The text was updated successfully, but these errors were encountered: