Skip to content

Commit

Permalink
feat: add an overload of Base.Tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 9, 2024
1 parent 2858def commit 264d530
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TracedRArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ function Base.setindex!(
return a
end

Base.Tuple(x::TracedRArray) = ntuple(Base.Fix1(Base.getindex, x), length(x))

Base.size(x::TracedRArray) = x.shape

Base.copy(A::TracedRArray{T,N}) where {T,N} = TracedRArray{T,N}((), A.mlir_data, size(A))
Expand Down

0 comments on commit 264d530

Please sign in to comment.