Skip to content

Commit

Permalink
add similar like JuliaLang/julia#35304
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Abbott committed Mar 31, 2020
1 parent 9ab573e commit d617058
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TransmuteDims.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ Base.size(A::TransmutedDimsArray{T,N,perm}) where {T,N,perm} =
Base.axes(A::TransmutedDimsArray{T,N,perm}) where {T,N,perm} =
genperm_zero(axes(parent(A)), perm, Base.OneTo(1))

Base.similar(A::TransmutedDimsArray, T::Type, dims::Base.Dims) = similar(parent(A), T, dims)

Base.unsafe_convert(::Type{Ptr{T}}, A::TransmutedDimsArray{T}) where {T} =
Base.unsafe_convert(Ptr{T}, parent(A))

Expand Down

0 comments on commit d617058

Please sign in to comment.