You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overload getindex for adjoints/transposes to call parent (#304)
* Overload getindex for adjoints/transposes to call parent
* StridedArray similars should be PseudoBlockArray
* Update test_blockarrays.jl
* Update Project.toml
Copy file name to clipboardExpand all lines: src/pseudo_blockarray.jl
+6-6
Original file line number
Diff line number
Diff line change
@@ -203,18 +203,18 @@ end
203
203
to_axes(r::AbstractUnitRange) = r
204
204
to_axes(n::Integer) = Base.oneto(n)
205
205
206
-
@inline Base.similar(block_array::Type{<:Array{T}}, axes::Tuple{BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
206
+
@inline Base.similar(block_array::Type{<:StridedArray{T}}, axes::Tuple{BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
207
207
PseudoBlockArray{T}(undef, map(to_axes,axes))
208
-
@inline Base.similar(block_array::Type{<:Array{T}}, axes::Tuple{BlockedUnitRange,BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
208
+
@inline Base.similar(block_array::Type{<:StridedArray{T}}, axes::Tuple{BlockedUnitRange,BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
209
209
PseudoBlockArray{T}(undef, map(to_axes,axes))
210
-
@inline Base.similar(block_array::Type{<:Array{T}}, axes::Tuple{Union{Integer,AbstractUnitRange{Int}},BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
210
+
@inline Base.similar(block_array::Type{<:StridedArray{T}}, axes::Tuple{Union{Integer,AbstractUnitRange{Int}},BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
211
211
PseudoBlockArray{T}(undef, map(to_axes,axes))
212
212
213
-
@inline Base.similar(block_array::Array, ::Type{T}, axes::Tuple{BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
213
+
@inline Base.similar(block_array::StridedArray, ::Type{T}, axes::Tuple{BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
214
214
PseudoBlockArray{T}(undef, map(to_axes,axes))
215
-
@inline Base.similar(block_array::Array, ::Type{T}, axes::Tuple{BlockedUnitRange,BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
215
+
@inline Base.similar(block_array::StridedArray, ::Type{T}, axes::Tuple{BlockedUnitRange,BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
216
216
PseudoBlockArray{T}(undef, map(to_axes,axes))
217
-
@inline Base.similar(block_array::Array, ::Type{T}, axes::Tuple{Union{Integer,AbstractUnitRange{Int}},BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
217
+
@inline Base.similar(block_array::StridedArray, ::Type{T}, axes::Tuple{Union{Integer,AbstractUnitRange{Int}},BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
218
218
PseudoBlockArray{T}(undef, map(to_axes,axes))
219
219
220
220
@inline Base.similar(block_array::PseudoBlockArray, ::Type{T}, axes::Tuple{BlockedUnitRange,Vararg{Union{Integer,AbstractUnitRange{Int}}}}) where T =
0 commit comments