Skip to content

R2N : sub_kwargs fails and allocates #217

@MaxenceGollier

Description

@MaxenceGollier

sub_kwargs::Dict{Symbol} = Dict(),

This line produces the error

julia> sub_kwargs::Dict{Symbol} = Dict()
ERROR: MethodError: no method matching (Dict{Symbol})(::Dict{Any, Any})
The type `Dict{Symbol}` exists, but no method is defined for this combination of argument types when trying to construct it.

when somebody tries to call R2N through solve!.

Moreover it produces allocations as well as type instabilities when we call solve!(args..; sub_kwargs...) because it has to copy sub_kwargs into a NamedTuple.
It was introduced in #172

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