1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
{# Note that we don't write to scalar variables conditionally. The scalar code
should therefore only include the calculation of scalar expressions
that are used below for writing to a vector variable #}
{% extends 'common_group.py_' %}
{% block maincode %}
# scalar code
_vectorisation_idx = 1
{{scalar_code|autoindent}}
{# Get the name of the array that stores these events (e.g. the spikespace array) #}
{% set _eventspace = get_array_name(eventspace_variable) %}
# vector code
_idx = {{_eventspace}}[:{{_eventspace}}[-1]]
_vectorisation_idx = _idx
{{vector_code|autoindent}}
{% endblock %}
|