diff --git a/pystencils/kernelcreation.py b/pystencils/kernelcreation.py index bd1cd0f9260101d0cd748cd260ebd69d61410f1f..bfb2c09a37323ff30943f19396e0f3d5ef65a519 100644 --- a/pystencils/kernelcreation.py +++ b/pystencils/kernelcreation.py @@ -88,6 +88,9 @@ def create_domain_kernel(assignments: NodeCollection, *, config: CreateKernelCon """ Creates abstract syntax tree (AST) of kernel, using a list of update equations. + Note that `create_domain_kernel` is a lower level function which shoul be accessed by not providing `index_fields` + to create_kernel + Args: assignments: can be a single assignment, sequence of assignments or an `AssignmentCollection` config: CreateKernelConfig which includes the needed configuration @@ -181,6 +184,9 @@ def create_indexed_kernel(assignments: NodeCollection, *, config: CreateKernelCo 'coordinate_names' parameter. The struct can have also other fields that can be read and written in the kernel, for example boundary parameters. + Note that `create_indexed_kernel` is a lower level function which shoul be accessed by providing `index_fields` + to create_kernel + Args: assignments: can be a single assignment, sequence of assignments or an `AssignmentCollection` config: CreateKernelConfig which includes the needed configuration @@ -209,11 +215,12 @@ def create_indexed_kernel(assignments: NodeCollection, *, config: CreateKernelCo >>> d_arr = np.zeros([5, 5]) >>> kernel(s=np.ones([5, 5]), d=d_arr, idx=index_arr) >>> d_arr - array([[0., 0., 0., 0., 0.], - [0., 4.1, 0., 0., 0.], - [0., 0., 4.2, 0., 0.], - [0., 0., 0., 4.3, 0.], - [0., 0., 0., 0., 0.]]) + array([[0. , 0. , 0. , 0. , 0. ], + [0. , 4.1, 0. , 0. , 0. ], + [0. , 0. , 4.2, 0. , 0. ], + [0. , 0. , 0. , 4.3, 0. ], + [0. , 0. , 0. , 0. , 0. ]]) + """ # --- eval assignments.evaluate_terms() diff --git a/pystencils/typing/__init__.py b/pystencils/typing/__init__.py index 0bb086677ca57eaf7777d7ee90899b25af392d51..5bb560d102cecc01b787548e3cd755a4e7ab2603 100644 --- a/pystencils/typing/__init__.py +++ b/pystencils/typing/__init__.py @@ -1,4 +1,3 @@ - from pystencils.typing.cast_functions import (CastFunc, BooleanCastFunc, VectorMemoryAccess, ReinterpretCastFunc, PointerArithmeticFunc) from pystencils.typing.types import (is_supported_type, numpy_name_to_c, AbstractType, BasicType, VectorType,