-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add array overloads #131
Add array overloads #131
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #131 +/- ##
==========================================
+ Coverage 87.23% 87.45% +0.21%
==========================================
Files 31 33 +2
Lines 1363 1522 +159
==========================================
+ Hits 1189 1331 +142
- Misses 174 191 +17 ☔ View full report in Codecov by Sentry. |
Here are the main things I would wanna see:
I think we can disregard special matrix types and factorizations for now. |
Agreed, but there is one exception: lu(A::AbstractSparseMatrixCSC; check::Bool = true) = lu(float(A); check = check) This is due to us abusing We might just as well fix it in here. |
I've been wondering about that. What happens if we remove it? |
It does indeed look like we might not need However, external functions could call |
Indeed let's keep it. My thought process was that it's ethically dubious not to return an |
Somewhat interestingly, #108 is now fixed on global tracers, but not on local tracers: julia> hessian_pattern(x -> logdet(spdiagm(x)), randn(3))
3×3 SparseMatrixCSC{Bool, Int64} with 9 stored entries:
1 1 1
1 1 1
1 1 1
julia> local_hessian_pattern(x -> logdet(spdiagm(x)), randn(3))
ERROR: StackOverflowError:
Stacktrace:
...
[11] float(S::SparseMatrixCSC{SparseConnectivityTracer.Dual{Float64, SparseConnectivityTracer.HessianTracer{…}}, Int64})
@ SparseArrays ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/SparseArrays/src/sparsematrix.jl:983
[12] lu(A::SparseMatrixCSC{SparseConnectivityTracer.Dual{…}, Int64}; check::Bool) (repeats 28852 times)
@ SparseArrays.UMFPACK ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/SparseArrays/src/solvers/umfpack.jl:395
[13] logabsdet(A::SparseMatrixCSC{SparseConnectivityTracer.Dual{Float64, SparseConnectivityTracer.HessianTracer{…}}, Int64})
@ LinearAlgebra ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/generic.jl:1676
[14] logdet(A::SparseMatrixCSC{SparseConnectivityTracer.Dual{Float64, SparseConnectivityTracer.HessianTracer{…}}, Int64})
@ LinearAlgebra ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/generic.jl:1701 |
Any concrete feedback on improving this @gdalle? I'm planning to make heavy use of FillArrays.jl, e.g. |
That's probably because
No, actually since
This is a good idea. |
Skipping |
I'd wait until we settle #135 before merging this one, especially due to the use of |
Closes #115.
The scope of this PR is somewhat open-ended. What are some must haves for a first array overload PR @gdalle?