abstract_code_from_function function¶
(Shortest import: from brian2.parsing.functions import abstract_code_from_function)
-
brian2.parsing.functions.abstract_code_from_function(func)[source]¶ Converts the body of the function to abstract code
- Parameters
func : function, str or ast.FunctionDef
The function object to convert. Note that the arguments to the function are ignored.
- Returns
func : AbstractCodeFunction
The corresponding abstract code function
Raises
SyntaxErrorIf unsupported features are used such as if statements or indexing.