Skip to content

Commit

Permalink
add multiimage tests for Crop
Browse files Browse the repository at this point in the history
  • Loading branch information
Evizero committed Jul 4, 2018
1 parent 73669dd commit ed8ace8
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 30 deletions.
8 changes: 0 additions & 8 deletions src/operations/crop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ CropNative(indexes::Range...) = CropNative(indexes)

@inline applylazy(op::CropNative, img::AbstractArray, param) = applyview(op, img, param)

function applyeager(op::CropNative, img::AbstractArray, param)
plain_array(img[op.indexes...])
end

function applyaffineview(op::CropNative, img::AbstractArray, param)
applyview(op, prepareaffine(img), param)
end
Expand Down Expand Up @@ -519,10 +515,6 @@ end
randparam(op::RCropRatio, imgs::Tuple) = rcropratio_indices(op, imgs[1])
randparam(op::RCropRatio, img::AbstractArray) = rcropratio_indices(op, img)

function applyeager(op::RCropRatio, img::AbstractArray, inds)
plain_array(applyview(op, img, inds))
end

function applylazy(op::RCropRatio, img::AbstractArray, inds)
applyview(op, img, inds)
end
Expand Down
1 change: 1 addition & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function direct_indices(::Tuple{}, ::Tuple{})
throw(MethodError(direct_indices, ((),())))
end

# TODO: Figure out why this method exists
function direct_indices(O::NTuple{N,IdentityRange}, I::NTuple{N,StepRange}) where N
throw(MethodError(direct_indices, (O, I)))
end
Expand Down
Loading

0 comments on commit ed8ace8

Please sign in to comment.