Skip to content

history is silently converted to Float64 #264

@nestordemeure

Description

@nestordemeure

When storing a log, solvers reserve memory with reserve!. By default no type information is passed to this method which, then, converts the history into Float64.

This is not the expected behaviour when using non traditional types (for instrumentation purpose) and can lead to problems if their silent convertion into Float64 is not detected by the programmer.

I submited a PR which fixes the issue for most solver : #263

I did not modify lsqr.jl, lsmr.jl and svdl.jl as the modification was less straightforward but they should probably be modified in the same way.

Overall I think that reserve! should always stipulate the expected type to avoid regression on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions