Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComputeError: cannot compare string with numeric type (f64) #404

Open
mariosgeo opened this issue Feb 26, 2025 · 1 comment
Open

ComputeError: cannot compare string with numeric type (f64) #404

mariosgeo opened this issue Feb 26, 2025 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@mariosgeo
Copy link

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

@RDWimmers RDWimmers added the enhancement New feature or request label Feb 27, 2025
@RDWimmers RDWimmers self-assigned this Feb 27, 2025
@RDWimmers RDWimmers added the bug Something isn't working label Feb 27, 2025
@RDWimmers
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants