Skip to content

ProjectTo(::Vector{Vector{Float64}}) type unstable #590

Open
@willtebbutt

Description

@willtebbutt

MWE:

using ChainRulesCore: ProjectTo
x = [randn(2), randn(3)]
@code_warntype ProjectTo(x)

It appears to be the case that this happens because

@code_warntype map(ProjectTo, x)

isn't type-stable.

I'm not sure what a fix looks like here unfortunately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProjectTorelated to the projection functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions