Skip to content

Commit 19901d9

Browse files
committed
whitespace fix
1 parent 9819310 commit 19901d9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/matlab.jl

+7-7
Original file line numberDiff line numberDiff line change
@@ -155,26 +155,26 @@ See also: [`im_from_matlab`](@ref).
155155
function im_to_matlab end
156156

157157
im_to_matlab(X::AbstractArray{<:Number}) = X
158-
im_to_matlab(img::AbstractArray{CT}) where CT<:Colorant = im_to_matlab(eltype(CT), img)
158+
im_to_matlab(img::AbstractArray{CT}) where {CT<:Colorant} = im_to_matlab(eltype(CT), img)
159159

160160
im_to_matlab(::Type{T}, img::AbstractArray{CT}) where {T,CT<:TransparentColor} =
161161
im_to_matlab(T, of_eltype(base_color_type(CT), img))
162-
im_to_matlab(::Type{T}, img::AbstractArray{<:Color}) where T =
162+
im_to_matlab(::Type{T}, img::AbstractArray{<:Color}) where {T} =
163163
im_to_matlab(T, of_eltype(RGB{T}, img))
164-
im_to_matlab(::Type{T}, img::AbstractArray{<:Gray}) where T =
164+
im_to_matlab(::Type{T}, img::AbstractArray{<:Gray}) where {T} =
165165
of_eltype(T, channelview(img))
166166

167167
# for RGB, only 1d and 2d cases are supported as other cases are not well-defined in MATLAB.
168-
im_to_matlab(::Type{T}, img::AbstractVector{<:RGB}) where T =
168+
im_to_matlab(::Type{T}, img::AbstractVector{<:RGB}) where {T} =
169169
im_to_matlab(T, reshape(img, (length(img), 1)))
170-
im_to_matlab(::Type{T}, img::AbstractMatrix{<:RGB}) where T =
170+
im_to_matlab(::Type{T}, img::AbstractMatrix{<:RGB}) where {T} =
171171
PermutedDimsArray(of_eltype(T, channelview(img)), (2, 3, 1))
172-
im_to_matlab(::Type{T}, img::AbstractArray{<:RGB}) where T =
172+
im_to_matlab(::Type{T}, img::AbstractArray{<:RGB}) where {T} =
173173
throw(ArgumentError("For $(ndims(img)) dimensional color image, manual conversion to MATLAB layout is required."))
174174

175175
if VERSION >= v"1.6.0-DEV.1083"
176176
# this method allows `data === im_to_matlab(im_from_matlab(data))` for gray image
177-
im_to_matlab(::Type{T}, img::Base.ReinterpretArray{CT,N,T,<:AbstractArray{T,N}, true}) where {CT,N,T} =
177+
im_to_matlab(::Type{T}, img::Base.ReinterpretArray{CT,N,T,<:AbstractArray{T,N},true}) where {CT,N,T} =
178178
img.parent
179179
else
180180
im_to_matlab(::Type{T}, img::Base.ReinterpretArray{CT,N,T,<:AbstractArray{T,N}}) where {CT,N,T} =

test/matlab.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
img = rand(Gray{Float64}, 4)
160160
data = @inferred im_to_matlab(img)
161161
@test eltype(data) == Float64
162-
@test size(data) == (4, )
162+
@test size(data) == (4,)
163163
end
164164

165165
@testset "RGB" begin

0 commit comments

Comments
 (0)