Skip to content

float

relationalai.semantics.std.floats
float(value: Value) -> Expression

Convert a value to a Float.

  • value

    (Value) - The value to convert to a Float.
  • Expression - An Expression computing the Float conversion. Returns Float.

Convert various types to floats:

>>> floats.float(42)
>>> floats.float(Product.price)
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning
        ├──  Graph reasoning
        │   └──  Create a graph
        └──  Rules-based reasoning
            └──  Work with numbers
                └──  Cast numeric values