pystencils.types.PsIeeeFloatType#

final class pystencils.types.PsIeeeFloatType(width, const=False)#

IEEE-754 floating point data types

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

Any

property width: int#

Return this type’s width in bits.

property itemsize: int#

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

property numpy_dtype: dtype | None#

A np.dtype object representing this data type.

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

property required_headers: set[str]#

The set of header files required when this type occurs in generated code.

create_literal(value)#

Create a C numerical literal for a constant of this type.

Raises:

PsTypeError – If the given value’s type is not the numeric type’s compiler-internal representation.

Return type:

str

Parameters:

value (Any)

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)