Skip to content

Should to_vec(::Integer) return an empty vector #188

Open
@mzgubic

Description

@mzgubic

Integers can't be perturbed, so their to_vec should be empty. Originally suggested in #187

function to_vec(x::Integer)
     Integer_from_vec(v) = x
     return Bool[], Integer_from_vec
end

Would also fix (a part of) chrisbrahms/Hankel.jl#27

Did not test yet whether it messes up any existing ChainRules tests.

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