pystencils.field.Field.create_fixed_size#
- static Field.create_fixed_size(field_name, shape, index_dimensions=0, dtype=DynamicType.NUMERIC_TYPE, layout='numpy', memory_strides=None, strides=None, field_type=FieldType.GENERIC)#
Creates a field with fixed sizes i.e. can be called only with arrays of the same size and layout.
- Parameters:
field_name (
str) – symbolic name for the fieldindex_dimensions (
int) – how many of the trailing dimensions are interpreted as index (as opposed to spatial)dtype (
str|type|dtype|PsType|DynamicType) – numpy data type of the array the kernel is called with laterlayout (
str|tuple[int,...]) – full layout of array, not only spatial dimensionsmemory_strides (
Optional[Sequence[int]]) – Linearization strides for each dimension; i.e. the number of elements to skip to get from one index to the next in the respective dimension.field_type – kind of field
- Return type: