pystencils.types.PsVectorType#

class pystencils.types.PsVectorType(scalar_type, vector_entries, const=False)#

Packed vector of numeric type.

The packed vector’s element type will always be made non-const.

Parameters:
  • element_type – Underlying scalar data type

  • num_entries – Number of entries in the vector

  • args (Any)

  • kwargs (Any)

Return type:

Any

property itemsize: int | None#

If this type has a valid in-memory size, return that size in bytes.

property numpy_dtype#

A np.dtype object representing this data type.

Available both for backward compatibility and for interaction with the numpy-based runtime system.

create_constant(value)#

Create the internal representation of a constant with this type.

Raises:

PsTypeError – If the given value cannot be interpreted in this type.

Return type:

Any

Parameters:

value (Any)