[plum.float] Module Reference

Interpret bytes as a floating point number.

class plum.float.Float

Interpret bytes as a floating point number.

Parameters:x (number or str) – value
class plum.float.FloatType

Float type metaclass.

Create custom Float subclass.

Parameters:
  • nbytes (int) – number of bytes
  • byteorder (str) – 'big' or 'little'

For example:

>>> from plum.float import Float
>>> class Float32(Float, nbytes=4, byteorder='big'):
...     pass
...
>>>