Kernelcreation functions take different assignment types
The documentation for the
create_indexed_kernel(assignments: List[Assignment], *, config: CreateKernelConfig): function has typehints for the assignments that are different to what the docstring says
assignments: can be a single assignment, sequence of assignments or an AssignmentCollection.
The same is true for
create_domain_kernel but i also did not check every single one of them.
Independently of that mismatch to me as a user it was suprising that the different kernel creation functions take different types of assignments. Since i mostly work with
create_kernel i was used to use the
AssignmentCollections which don't seem to work for the other functions.
The script i tried to use for the indexed kernel
import pystencils as ps rho = ps.fields("rho :[3D]", layout='zyxf') collection = ps.AssignmentCollection(main_assignments=[ps.Assignment(rho.center, 1.0)]) config = ps.CreateKernelConfig() assignments = ps.create_indexed_kernel(assignments=collection, config=config)
If you don't feel like this is an issue, feel free to close it.