Skip to content

Commit

Permalink
New similar definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Oct 27, 2023
1 parent 2a6b8da commit 460082d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NDTensors/src/abstractarray/similar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ function similar(array::AbstractArray, eltype::Type, dims::Tuple)
return NDTensors.similar(similartype(typeof(array), eltype), dims)
end

# NDTensors.similar
function similar(array::AbstractArray, eltype::Type, dims::Int)
return NDTensors.similar(similartype(typeof(array), eltype), dims)
end

# NDTensors.similar
similar(array::AbstractArray, dims::Tuple) = NDTensors.similar(typeof(array), dims)

Expand Down

0 comments on commit 460082d

Please sign in to comment.