pystencils.types.PsNamedArrayType

pystencils.types.PsNamedArrayType#

class pystencils.types.PsNamedArrayType(name, element_type, shape, const=False)#

Named multidimensional fixed-size array type.

Extends PsArrayType with a custom name to model C++ containers with an nd-array interface. Only through named array-types can arrays be treated fully as first-class objects with the same value semantics as scalars and structs.

Parameters:
  • name (str) – Full name of the array type

  • element_type (PsType) – Data type of array entries

  • shape (Union[SupportsIndex, Sequence[SupportsIndex]]) – Array shape

  • const (bool) – Constness of the array object

  • args (Any)

  • kwargs (Any)

Return type:

Any

property name: str#

Name of this array type