CythonCodeGenerator class

(Shortest import: from brian2.codegen.generators.cython_generator import CythonCodeGenerator)

class brian2.codegen.generators.cython_generator.CythonCodeGenerator(*args, **kwds)[source]

Bases: brian2.codegen.generators.base.CodeGenerator

Cython code generator

Methods

determine_keywords() A dictionary of values that is made available to the templated.
translate_expression(expr) Translate the given expression string into a string in the target language, returns a string.
translate_one_statement_sequence(statements)
translate_statement(statement) Translate a single line Statement into the target language, returns a string.

Details

determine_keywords()[source]

A dictionary of values that is made available to the templated. This is used for example by the CPPCodeGenerator to set up all the supporting code

translate_expression(expr)[source]

Translate the given expression string into a string in the target language, returns a string.

translate_one_statement_sequence(statements, scalar=False)[source]
translate_statement(statement)[source]

Translate a single line Statement into the target language, returns a string.