Float

class pyrogue.Float(bitSize)[source]

Model class for 32-bit floating point numbers.

Parameters:
  • bitSize (int) – Number of bits being represented. Must be 32.

  • args (Any)

  • kwargs (Any)

Return type:

Any

pytype

alias of float

toBytes(value)[source]

Convert a python float value to a byte array.

Parameters:

value (float) – Python float value to convert.

Returns:

Byte array representation of the value.

Return type:

bytearray

fromBytes(ba)[source]

Convert a byte array to a python float value.

Parameters:

ba (bytes) – Byte array to extract value from.

Returns:

Python value.

Return type:

float

fromString(string)[source]

Convert a string to a python float value.

Parameters:

string (str) – String representation of the value.

Returns:

Python value.

Return type:

float

minValue()[source]

Return the minimum 32-bit float (-3.4e38).

Return type:

float

maxValue()[source]

Return the maximum 32-bit float (3.4e38).

Return type:

float