Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mtfishman opened this issue Nov 5, 2024 · 0 comments · Fixed by #1570
Closed

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

mtfishman opened this issue Nov 5, 2024 · 0 comments · Fixed by #1570
Labels
enhancement New feature or request NDTensors Requires changes to the NDTensors.jl library.

Comments

@mtfishman
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NDTensors Requires changes to the NDTensors.jl library.
Projects
None yet
1 participant