Skip to content

Throws error when deserialising float array which contains only integers #256

Open
@svectordb

Description

@svectordb

I have a simple model containing a type similar to:

list Vector { member: Float }

When my service returns an array of numbers which by chance are exactly integers (e.g. [1,2,3,4] instead of [1,2,3,4.1]) Python deserialises these as integers instead of floats and this line throws an error

return expect_type(float, value)

I feel to fix this limited_parse_float should automatically cast any ints to floats before enforcing type checking

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions