pygef icon indicating copy to clipboard operation
pygef copied to clipboard

ComputeError: cannot compare string with numeric type (f64)

Open mariosgeo opened this issue 1 year ago • 1 comments

When reading some gef files, (like the attached one) I got a message

ComputeError: cannot compare string with numeric type (f64).

What might br wrong?

BP180730.txt

mariosgeo avatar Feb 26 '25 12:02 mariosgeo

Cause: The issue occurs because the sandMedianClass column contains values with a thousands separator (e.g., "1,200.00"), causing the dtype to be parsed as a string instead of f64. This results in a type mismatch when performing comparisons.

Suggested Fix: Before checking if a value is part of the COLUMNVOID set defined by the GEF, we should ensure that the column's dtype is correctly cast to f64.

Relevant Code: parse_bore.py#L60

RDWimmers avatar Feb 27 '25 09:02 RDWimmers