From e8f01da43146ad17af3f9ae3b053ca887ca9122f Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:28:31 -0400 Subject: [PATCH] Fix SparseArrays test failures --- src/rulesets/SparseArrays/sparsematrix.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rulesets/SparseArrays/sparsematrix.jl b/src/rulesets/SparseArrays/sparsematrix.jl index 0f16fd6db..12ae76f80 100644 --- a/src/rulesets/SparseArrays/sparsematrix.jl +++ b/src/rulesets/SparseArrays/sparsematrix.jl @@ -51,7 +51,8 @@ function rrule(::typeof(findnz), v::AbstractSparseVector) end if Base.USE_GPL_LIBS # Don't define rrules for sparse determinants if we don't have CHOLMOD from SuiteSparse.jl - + using SparseInverseSubset + if VERSION < v"1.7" #= The method below for `logabsdet(F::UmfpackLU)` is required to calculate the (log) @@ -82,8 +83,6 @@ if Base.USE_GPL_LIBS # Don't define rrules for sparse determinants if we don't h end return ifelse(isodd(result), -1, 1) end - - using SparseInverseSubset function LinearAlgebra.logabsdet(F::UmfpackLU{T, TI}) where {T<:Union{Float64,ComplexF64},TI<:Union{Int32, Int64}} n = checksquare(F)