Skip to content

Commit

Permalink
add method specialization for tweight
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychen94 committed Jan 27, 2020
1 parent 67e9784 commit a698382
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MLDataPattern = "9920b226-0b2a-5f5f-9153-9aa70a013f8b"
MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

Expand Down
10 changes: 9 additions & 1 deletion src/compat.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using Pkg

if VERSION >= v"1.3"
const safe_rand = rand
else
Expand All @@ -19,4 +21,10 @@ else
unlock(rand_mutex[])
result
end
end
end

# ImageTransformation <= v0.8.3
# PR: https://github.com/JuliaImages/ImageTransformations.jl/pull/89
if Pkg.installed()["ImageTransformations"] <= v"0.8.3"
Interpolations.tweight(A::AbstractArray{C}) where C<:FixedPoint = C
end

0 comments on commit a698382

Please sign in to comment.