Skip to content

[NDTensors] [ENHANCEMENT] Support similartype(Matrix{Float64}, Val(3)) #1567

@mtfishman

Description

@mtfishman

One can do:

julia> similartype(Matrix{Float64}, (2, 2, 2))
Array{Float64, 3}

but it would be nice to have something in the type domain, like:

julia> similartype(Matrix{Float64}, Val(3))

or a more specific type than Val, like NDims:

julia> similartype(Matrix{Float64}, NDims(3))

related to the proposal for basing similar around traits here: JuliaLang/julia#18161.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NDTensorsRequires changes to the NDTensors.jl library.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions