Commit c3e7c860 authored by Paul Schultz's avatar Paul Schultz
Browse files

cluster problem

parent d0d77b7d
......@@ -164,9 +164,7 @@ from numba import njit, float64, complex128, void, int32
"""
def_network_rhs_string = """
@njit(float64[:](float64[:], float64), cache={cache_flag})
def network_rhs_numba(y, t):
def_network_rhs_string = """def network_rhs_numba(y, t):
dydt = np.empty({total_length} + {length})
v = y[:{total_length}].view(np.complex128)
......@@ -183,10 +181,14 @@ def network_rhs_numba(y, t):
""".format(total_length=total_length,
length=length,
l_indptr=l_indptr,
cache_flag=cache_flag
l_indptr=l_indptr
)
if cache_flag:
def_network_rhs_string = "@njit(float64[:](float64[:], float64), cache=True)".join(def_network_rhs_string)
else:
def_network_rhs_string = "@njit(float64[:](float64[:], float64))".join(def_network_rhs_string)
def_network_rhs_string += "".join([node.node_dynamics_string(j) for j, node in enumerate(node_list)])
def_network_rhs_string += """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment