Skip to content

copying while converting #30

@putianyi889

Description

@putianyi889

Currently the conversions follow the rule of Julia Base: if a conversion is not needed, the input instance will be returned directly.

Using the construction (_to_eltype(T, typeof(A))(A) will generate a copy of A in this case. However, it relies on the existence of the constructor, which could be lacking, e.g. JuliaLang/LinearAlgebra.jl#1158 .

Proposal: add a kwarg to specify if the result must be a copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions