CyRK

CyRK.get_include()[source]

Subpackages

Submodules

CyRK.helper module

Helper function to convert conventional solve_ivp or numba diffeq’s into a format that cyrk can accept.

CyRK.helper.cy2nb(diffeq: callable, use_njit: bool = True, cache_njit: bool = False) callable[source]

Convert cyrk differential equation functions to the numba/scipy format.

Parameters:
  • diffeq (callable) – Differential equation function.

  • use_njit (bool = True) – If True, the final function will be njited.

  • cache_njit (bool = False) – If True, then the njit-complied function will be cached.

Returns:

diffeq_nbrk – numba/scipy-safe differential equation function.

Return type:

callable

CyRK.helper.nb2cy(diffeq: callable, use_njit: bool = True, cache_njit: bool = False) callable[source]

Convert numba/scipy differential equation functions to the cyrk format.

Parameters:
  • diffeq (callable) – Differential equation function.

  • use_njit (bool = True) – If True, the final function will be njited.

  • cache_njit (bool = False) – If True, then the njit-complied function will be cached.

Returns:

diffeq_cyrk – cyrk-safe differential equation function.

Return type:

callable