Skip to content

Commit

Permalink
cooperate with ArrayLayouts #153
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 committed Jul 18, 2023
1 parent 4eda5c7 commit b1378a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
deps/deps.jl
.DS_Store
Manifest.toml
statprof/*
2 changes: 2 additions & 0 deletions test/lazymultests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Base.convert(::Type{MyMatrix{T}}, A::AbstractArray{T}) where T = MyMatrix{T}(A)
Base.convert(::Type{MyMatrix{T}}, A::AbstractArray) where T = MyMatrix{T}(convert(AbstractArray{T}, A))
Base.convert(::Type{MyMatrix}, A::AbstractArray{T}) where T = MyMatrix{T}(A)
Base.getindex(A::MyMatrix, kj...) = A.A[kj...]
Base.getindex(A::MyMatrix, k::Integer, j::AbstractVector) = A.A[k, j]
Base.getindex(A::MyMatrix, k::AbstractVector, j::Integer) = A.A[k, j]
Base.getindex(A::MyMatrix, k::Integer, ::Colon) = A.A[k,:]
Base.getindex(A::MyMatrix, ::Colon, j::Integer) = A.A[:,j]
Base.getindex(A::MyMatrix, ::Colon, j::AbstractVector) = MyMatrix(A.A[:,j])
Expand Down

0 comments on commit b1378a3

Please sign in to comment.