{# USES_VARIABLES { t, _clock_t, _indices } #}
import numpy as _numpy

# Resize dynamic arrays
_new_len = len({{_dynamic_t}}) + 1

_owner.resize(_new_len)

# Store values
{{_dynamic_t}}[-1] = {{_clock_t}}

# scalar code
_vectorisation_idx = 1
{{scalar_code|autoindent}}

# vector code
_vectorisation_idx = {{_indices}}
_idx = {{_indices}}
{{vector_code|autoindent}}

{% for varname, var in _recorded_variables.items() %}
{{get_array_name(var, access_data=False)}}[-1, :] = _to_record_{{varname}}
{% endfor %}

