Skip to content

Commit

Permalink
fix more dispatches
Browse files Browse the repository at this point in the history
  • Loading branch information
tiemvanderdeure committed Nov 27, 2024
1 parent 96f5202 commit e25d5df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/array/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ metadata(A::AbstractDimArray) = A.metadata
layerdims(A::AbstractDimArray) = basedims(A)

@inline rebuildsliced(A::AbstractBasicDimArray, args...) = rebuildsliced(getindex, A, args...)
@inline function rebuildsliced(f::Function, A::AbstractBasicDimArray, data::AbstractArray, I::Tuple, name=name(A))
@inline function rebuildsliced(f::Function, A::AbstractBasicDimArray, data, I, name=name(A))
I1 = to_indices(A, I)
rebuild(A, data, slicedims(f, A, I1)..., name)
end
Expand Down
1 change: 0 additions & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ modify(CuArray, A)
This also works for all the data layers in a `DimStack`.
"""
function modify end
modify(f, s::AbstractDimStack) = maplayers(a -> modify(f, a), s)
# Stack optimisation to avoid compilation to build all the `AbstractDimArray`
# layers, and instead just modify the parent data directly.
modify(f, s::AbstractDimStack{<:Any,<:NamedTuple}) =
Expand Down

0 comments on commit e25d5df

Please sign in to comment.