From 57d294134a3a9843c33c39fcf1fac02fd47d7057 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Tue, 14 May 2024 13:02:16 +0200 Subject: [PATCH] Fix doctests --- src/adtypes.jl | 4 ++-- src/pattern.jl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/adtypes.jl b/src/adtypes.jl index 394bcd0f..5b66d04e 100644 --- a/src/adtypes.jl +++ b/src/adtypes.jl @@ -9,7 +9,7 @@ Singleton struct for integration with the sparsity detection framework of ADType julia> using ADTypes, SparseConnectivityTracer julia> ADTypes.jacobian_sparsity(diff, rand(4), TracerSparsityDetector()) -3×4 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 6 stored entries: +3×4 SparseArrays.SparseMatrixCSC{Bool, Int64} with 6 stored entries: 1 1 ⋅ ⋅ ⋅ 1 1 ⋅ ⋅ ⋅ 1 1 @@ -21,7 +21,7 @@ julia> using ADTypes, SparseConnectivityTracer julia> f(x) = x[1] + x[2]*x[3] + 1/x[4]; julia> ADTypes.hessian_sparsity(f, rand(4), TracerSparsityDetector()) -4×4 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 3 stored entries: +4×4 SparseArrays.SparseMatrixCSC{Bool, Int64} with 3 stored entries: ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1 ⋅ ⋅ 1 ⋅ ⋅ diff --git a/src/pattern.jl b/src/pattern.jl index 75fff8ba..cef23c24 100644 --- a/src/pattern.jl +++ b/src/pattern.jl @@ -51,7 +51,7 @@ julia> x = rand(3); julia> f(x) = [x[1]^2, 2 * x[1] * x[2]^2, sign(x[3])]; julia> connectivity_pattern(f, x) -3×3 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 4 stored entries: +3×3 SparseArrays.SparseMatrixCSC{Bool, Int64} with 4 stored entries: 1 ⋅ ⋅ 1 1 ⋅ ⋅ ⋅ 1 @@ -113,7 +113,7 @@ julia> x = rand(3); julia> f(x) = [x[1]^2, 2 * x[1] * x[2]^2, sign(x[3])]; julia> jacobian_pattern(f, x) -3×3 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 3 stored entries: +3×3 SparseArrays.SparseMatrixCSC{Bool, Int64} with 3 stored entries: 1 ⋅ ⋅ 1 1 ⋅ ⋅ ⋅ ⋅ @@ -174,7 +174,7 @@ julia> x = rand(5); julia> f(x) = x[1] + x[2]*x[3] + 1/x[4] + 1*x[5]; julia> hessian_pattern(f, x) -5×5 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 3 stored entries: +5×5 SparseArrays.SparseMatrixCSC{Bool, Int64} with 3 stored entries: ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1 ⋅ ⋅ ⋅ 1 ⋅ ⋅ ⋅ @@ -184,7 +184,7 @@ julia> hessian_pattern(f, x) julia> g(x) = f(x) + x[2]^x[5]; julia> hessian_pattern(g, x) -5×5 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 7 stored entries: +5×5 SparseArrays.SparseMatrixCSC{Bool, Int64} with 7 stored entries: ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 1 1 ⋅ 1 ⋅ 1 ⋅ ⋅ ⋅