Skip to content

Commit

Permalink
legacy code upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychen94 committed Aug 20, 2021
1 parent f1e7c4b commit 6a808e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ImageAxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ function ImageCore.channelview(A::AxisArray)
end
# without extra dimension:
_channelview(A::AxisArray{C,N}, Ac::AbstractArray{T,N}) where {C,T,N} = AxisArray(Ac, AxisArrays.axes(A)...)
# with extra dimension: (bug: the type parameters shouldn't be necessary, but julia 0.5 dispatches incorrectly without them)
_channelview(A::AxisArray{C,M}, Ac::AbstractArray{T,N}) where {C,T,M,N} = AxisArray(Ac, Axis{:color}(axes(Ac,1)), AxisArrays.axes(A)...)
# with extra dimension:
_channelview(A::AxisArray, Ac::AbstractArray) = AxisArray(Ac, Axis{:color}(axes(Ac,1)), AxisArrays.axes(A)...)


### Image properties based on traits ###
Expand Down

0 comments on commit 6a808e0

Please sign in to comment.