Skip to content

Commit

Permalink
remove compat for julia v0.6 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin committed Feb 11, 2020
1 parent 7bc69e8 commit 4009223
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
20 changes: 6 additions & 14 deletions src/ConicBenchmarkUtilities.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
__precompile__()

module ConicBenchmarkUtilities

using GZip

if VERSION < v"0.7.0-"
import Compat: undef
import Compat: @warn
end
using SparseArrays
using LinearAlgebra

if VERSION > v"0.7.0-"
using SparseArrays
using LinearAlgebra
# this is required because findall return type changed in v0.7
function SparseArrays.findnz(A::AbstractMatrix)
I = findall(!iszero, A)
return (getindex.(I, 1), getindex.(I, 2), A[I])
end
# this is required because findnz does not support arrays by default in julia v1
function SparseArrays.findnz(A::AbstractMatrix)
I = findall(!iszero, A)
return (getindex.(I, 1), getindex.(I, 2), A[I])
end

export readcbfdata, cbftompb, mpbtocbf, writecbfdata
Expand Down
4 changes: 0 additions & 4 deletions test/REQUIRE

This file was deleted.

12 changes: 3 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ using ECOS, SCS, MathProgBase
import JuMP
using ConicBenchmarkUtilities

if VERSION < v"0.7.0-"
using Base.Test
import Compat: det
end
using Test
using SparseArrays
using LinearAlgebra

if VERSION > v"0.7.0-"
using Test
using SparseArrays
using LinearAlgebra
end

@testset "ConicBenchmarkUtilities Tests" begin

Expand Down

0 comments on commit 4009223

Please sign in to comment.