Skip to content
Snippets Groups Projects

`create_kernel` API Update

Merged Jan Hönig requested to merge hoenig/pystencils:create_kernel_api into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
import ast
import ast
import inspect
import inspect
import textwrap
import textwrap
from typing import Callable, Union
from typing import Callable, Union, List, Dict
import sympy as sp
import sympy as sp
@@ -11,7 +11,7 @@ from pystencils.sympyextensions import SymbolCreator
@@ -11,7 +11,7 @@ from pystencils.sympyextensions import SymbolCreator
__all__ = ['kernel']
__all__ = ['kernel']
def kernel(func: Callable[..., None], return_config: bool = False, **kwargs) -> Union[list[Assignment], dict]:
def kernel(func: Callable[..., None], return_config: bool = False, **kwargs) -> Union[List[Assignment], Dict]:
"""Decorator to simplify generation of pystencils Assignments.
"""Decorator to simplify generation of pystencils Assignments.
Changes the meaning of the '@=' operator. Each line containing this operator gives a symbolic assignment
Changes the meaning of the '@=' operator. Each line containing this operator gives a symbolic assignment
Loading