is_scalar_expression function

(Shortest import: from brian2.codegen.translation import is_scalar_expression)

brian2.codegen.translation.is_scalar_expression(expr, variables)[source]

Whether the given expression is scalar.

Parameters:

expr : str

The expression to check

variables : dict-like

Variable and Function object for all the identifiers used in expr

Returns:

scalar : bool

Whether expr is a scalar expression