From bb59955a7499fefc11b84ea7ae15e63a675338c1 Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 14:08:05 -0500 Subject: [PATCH 1/7] vecnorm -> norm --- src/core_types.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_types.jl b/src/core_types.jl index 97d3f718..4c66aa39 100644 --- a/src/core_types.jl +++ b/src/core_types.jl @@ -137,12 +137,12 @@ function isrotation(r::AbstractMatrix{T}, tol::Real = 1000 * eps(eltype(T))) whe # Transpose is overloaded for many of our types, so we do it explicitly: r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]); conj(r[1,2]) conj(r[2,2])] - d = vecnorm((r * r_trans) - eye(SMatrix{2,2})) + d = norm((r * r_trans) - eye(SMatrix{2,2})) elseif size(r) == (3,3) r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]) conj(r[3,1]); conj(r[1,2]) conj(r[2,2]) conj(r[2,3]); conj(r[1,3]) conj(r[2,3]) conj(r[3,3])] - d = vecnorm((r * r_trans) - eye(SMatrix{3,3})) + d = norm((r * r_trans) - eye(SMatrix{3,3})) else return false end From 18ffd424cd83363b66bff96e43d925f8edcefcd3 Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 14:13:43 -0500 Subject: [PATCH 2/7] Updated julia version requirements --- .travis.yml | 5 ++--- REQUIRE | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcd3f9c6..58edeaf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ os: - linux - osx julia: - - 0.6 - nightly addons: apt: @@ -13,8 +12,8 @@ addons: notifications: email: false matrix: - allow_failures: - - julia: nightly +# allow_failures: +# - julia: nightly # - os: osx # uncomment the following lines to override the default test script #script: diff --git a/REQUIRE b/REQUIRE index 01da9ae3..feed78a3 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,3 @@ -julia 0.6 +julia 0.7 StaticArrays 0.6.5 Compat 0.69 # for atan(y, x) From dbe1f113286f2685efcaea757f2a521dc5e8af46 Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 15:04:08 -0500 Subject: [PATCH 3/7] Use Compat.norm for 0.6 compatibility --- src/Rotations.jl | 2 +- src/core_types.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Rotations.jl b/src/Rotations.jl index 805943d1..b0026314 100644 --- a/src/Rotations.jl +++ b/src/Rotations.jl @@ -4,7 +4,7 @@ __precompile__(true) module Rotations using Compat -using Compat.LinearAlgebra +using Compat: LinearAlgebra, norm using StaticArrays import Base: convert, eltype, size, length, getindex, *, Tuple diff --git a/src/core_types.jl b/src/core_types.jl index 4c66aa39..97d3f718 100644 --- a/src/core_types.jl +++ b/src/core_types.jl @@ -137,12 +137,12 @@ function isrotation(r::AbstractMatrix{T}, tol::Real = 1000 * eps(eltype(T))) whe # Transpose is overloaded for many of our types, so we do it explicitly: r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]); conj(r[1,2]) conj(r[2,2])] - d = norm((r * r_trans) - eye(SMatrix{2,2})) + d = vecnorm((r * r_trans) - eye(SMatrix{2,2})) elseif size(r) == (3,3) r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]) conj(r[3,1]); conj(r[1,2]) conj(r[2,2]) conj(r[2,3]); conj(r[1,3]) conj(r[2,3]) conj(r[3,3])] - d = norm((r * r_trans) - eye(SMatrix{3,3})) + d = vecnorm((r * r_trans) - eye(SMatrix{3,3})) else return false end From 7f534ae0b361c405dfce32495a02685f7c29288f Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 15:04:47 -0500 Subject: [PATCH 4/7] Add 0.6 back in to travis, add 0.7 --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58edeaf3..b59fbb09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ os: - linux - osx julia: + - 0.6 + - 0.7 - nightly addons: apt: @@ -12,8 +14,8 @@ addons: notifications: email: false matrix: -# allow_failures: -# - julia: nightly + allow_failures: + - julia: nightly # - os: osx # uncomment the following lines to override the default test script #script: From 31c7c3eb2f4561f50ddc9e682e7b52afd9d91759 Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 15:24:13 -0500 Subject: [PATCH 5/7] Changed to use Compat.norm (right this time) --- src/Rotations.jl | 8 ++++++-- src/core_types.jl | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Rotations.jl b/src/Rotations.jl index b0026314..c09887ba 100644 --- a/src/Rotations.jl +++ b/src/Rotations.jl @@ -4,11 +4,11 @@ __precompile__(true) module Rotations using Compat -using Compat: LinearAlgebra, norm +using Compat.LinearAlgebra using StaticArrays import Base: convert, eltype, size, length, getindex, *, Tuple -import Compat.LinearAlgebra: inv, eye +import LinearAlgebra: inv, eye if VERSION >= v"0.7.0-beta.85" import Statistics: mean @@ -16,6 +16,10 @@ else import Base: mean end +if VERSION < v"0.7.0-alpha" + using Compat: norm +end + include("util.jl") include("core_types.jl") include("quaternion_types.jl") diff --git a/src/core_types.jl b/src/core_types.jl index 97d3f718..4c66aa39 100644 --- a/src/core_types.jl +++ b/src/core_types.jl @@ -137,12 +137,12 @@ function isrotation(r::AbstractMatrix{T}, tol::Real = 1000 * eps(eltype(T))) whe # Transpose is overloaded for many of our types, so we do it explicitly: r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]); conj(r[1,2]) conj(r[2,2])] - d = vecnorm((r * r_trans) - eye(SMatrix{2,2})) + d = norm((r * r_trans) - eye(SMatrix{2,2})) elseif size(r) == (3,3) r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]) conj(r[3,1]); conj(r[1,2]) conj(r[2,2]) conj(r[2,3]); conj(r[1,3]) conj(r[2,3]) conj(r[3,3])] - d = vecnorm((r * r_trans) - eye(SMatrix{3,3})) + d = norm((r * r_trans) - eye(SMatrix{3,3})) else return false end From 9ddc627f7db5f327be5dc05b3ab8e4afbd420c01 Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 16:14:25 -0500 Subject: [PATCH 6/7] Fixes involving Compat, allow 0.6 and up --- REQUIRE | 2 +- src/Rotations.jl | 6 +----- src/core_types.jl | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/REQUIRE b/REQUIRE index feed78a3..01da9ae3 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,3 @@ -julia 0.7 +julia 0.6 StaticArrays 0.6.5 Compat 0.69 # for atan(y, x) diff --git a/src/Rotations.jl b/src/Rotations.jl index c09887ba..805943d1 100644 --- a/src/Rotations.jl +++ b/src/Rotations.jl @@ -8,7 +8,7 @@ using Compat.LinearAlgebra using StaticArrays import Base: convert, eltype, size, length, getindex, *, Tuple -import LinearAlgebra: inv, eye +import Compat.LinearAlgebra: inv, eye if VERSION >= v"0.7.0-beta.85" import Statistics: mean @@ -16,10 +16,6 @@ else import Base: mean end -if VERSION < v"0.7.0-alpha" - using Compat: norm -end - include("util.jl") include("core_types.jl") include("quaternion_types.jl") diff --git a/src/core_types.jl b/src/core_types.jl index 4c66aa39..60397213 100644 --- a/src/core_types.jl +++ b/src/core_types.jl @@ -137,7 +137,7 @@ function isrotation(r::AbstractMatrix{T}, tol::Real = 1000 * eps(eltype(T))) whe # Transpose is overloaded for many of our types, so we do it explicitly: r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]); conj(r[1,2]) conj(r[2,2])] - d = norm((r * r_trans) - eye(SMatrix{2,2})) + d = Compat.norm((r * r_trans) - eye(SMatrix{2,2})) elseif size(r) == (3,3) r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]) conj(r[3,1]); conj(r[1,2]) conj(r[2,2]) conj(r[2,3]); From 125cfec5101da1bfe92ec38d7caf0404c742b287 Mon Sep 17 00:00:00 2001 From: Sean McBane Date: Tue, 3 Jul 2018 16:24:08 -0500 Subject: [PATCH 7/7] Changed norm -> Compat.norm --- src/core_types.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_types.jl b/src/core_types.jl index 60397213..9e10d9a6 100644 --- a/src/core_types.jl +++ b/src/core_types.jl @@ -142,7 +142,7 @@ function isrotation(r::AbstractMatrix{T}, tol::Real = 1000 * eps(eltype(T))) whe r_trans = @SMatrix [conj(r[1,1]) conj(r[2,1]) conj(r[3,1]); conj(r[1,2]) conj(r[2,2]) conj(r[2,3]); conj(r[1,3]) conj(r[2,3]) conj(r[3,3])] - d = norm((r * r_trans) - eye(SMatrix{3,3})) + d = Compat.norm((r * r_trans) - eye(SMatrix{3,3})) else return false end