CodeObjectTemplate class
(Shortest import: from brian2.codegen.templates import CodeObjectTemplate)
- class brian2.codegen.templates.CodeObjectTemplate(template, template_source)[source]
Bases:
object
Single template object returned by
Templater
and used for final code generationShould not be instantiated by the user, but only directly by
Templater
.Attributes
Does this template allow writing to scalar variables?
The indices over which the template iterates completely
The set of variables in this template
Read-only variables that are changed by this template
Methods
__call__
(scalar_code, vector_code, **kwds)Return a usable code block or blocks from this template.
Details
- allows_scalar_write
Does this template allow writing to scalar variables?
- iterate_all
The indices over which the template iterates completely
- variables
The set of variables in this template
- writes_read_only
Read-only variables that are changed by this template