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

[MRG] Fix an error in numpy template, triggered when assigning to a variable with an unfulfilled scalar condition #887

Merged
merged 4 commits into from Sep 29, 2017

Conversation

Projects
None yet
2 participants
@mstimberg
Member

mstimberg commented Sep 27, 2017

This is a trivial fix, the code in the template still used np for numpy while we replaced it everywhere else by _numpy -- apparently that part of the template was never triggered by our test suite (it now is).

To trigger the code and therefore the bug you needed to assign with a condition that evaluated to False "in a scalar sense", i.e. not like in i < 0 which evaluates to False for each neuron, but rather like N < 0. The simplest example is of course to directly use False, i.e.:

group.v['False'] = 10*mV

mstimberg added some commits Sep 27, 2017

Fix an error in numpy template, triggered when assigning to a variabl…
…e with an unfulfilled scalar condition

Artificial example: group.v['False'] = 10*mV

@mstimberg mstimberg merged commit c23f7c7 into master Sep 29, 2017

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mstimberg mstimberg deleted the numpy_assignment_fix branch Sep 29, 2017

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