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
single objectivePriorParameters are cast to numpy.float64 #27
Comments
A possible fix would be to define types for all columns for all dataframes (should be {string, int, float}) with type conversion in the read-in https://github.com/PEtab-dev/PEtab/blob/master/petab/parameters.py#L15. |
Turned out to be quite a pain with different column types, depending which specific values they have. Also with omitted optional columns, or omitted values and default. Shall we "normalize" everything on loading and expect that to have happened in all other places (we had the discussion some time before...)? |
In what could they differ? Int to float / string conversion? |
|
Well, some differences may occur already now, depending on which |
Ah, you mean about filling in default values. Yeah, not sure about that. Shouldn't hurt I guess to fill in all columns with their default values. We argued at some point about when reading in adding all those default values, which would make many functions easier (removing basically all i"if not exists then set to default value" lines). But no special opinion on this. There is a function somewhere that does this, at least for a few data frames. |
No, NA vs "" vs whatever else pandas interpretes as empty should not matter. |
When all
objectivePriorParameters
are either empty or set to a single value, the respective column will be read with dtypenumpy.float64
, which may cause problems down the line as spec says this should be a string. Not a issue currently since all currently available priors require two parameters, but may lead to problems if that changes.The text was updated successfully, but these errors were encountered: