Skip to content

Commit

Permalink
fix type derivation of kernel buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
C.A.P. Linssen committed Aug 9, 2023
1 parent f5cf1b3 commit c245319
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pynestml/utils/ast_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,9 @@ def create_initial_values_for_kernels(cls, neuron: ASTNeuron, solver_dicts: List
spike_in_port = ASTUtils.get_input_port_by_name(neuron.get_input_blocks(), spike_in_port_name)
if spike_in_port:
type_str = NESTMLPrinter().print_data_type(spike_in_port.data_type)
differential_order: int = len(re.findall("__d", var_name))
if differential_order:
type_str += "*s**-" + str(differential_order)
else:
type_str = "real"
expr = "0 " + type_str # for kernels, "initial value" returned by ode-toolbox is actually the increment value; the actual initial value is assumed to be 0
Expand Down

0 comments on commit c245319

Please sign in to comment.