This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Sparsity! spits out a full matrix while the jacobian is sparse #15
Comments
I think this is the same issue and I think it's ranges. @shashi has been off for a bit but when he's back we can see if he can fix it. |
Reduced this to:
|
The second case is expected since you're indexing into all elements of the array, not only the non-zero ones. |
Just wanted to check - is this the same issue? I pick up a zero sparsity pattern with a sparse matvec function:
The output is:
If I use a dense matrix instead, it throws an error:
|
shashi
added a commit
that referenced
this issue
Apr 2, 2020
(Cherry picked a commit from reflog, edited it to be correct. Fixes #15)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I met an issue while experimenting with sparsity!. My application commonly involves constructing a sparse matrix (A) based on the input vectors (x) and then updating x by A (updating an HJB equation, for those in econ). A minimal example looks like this:
It can be validated by ForwardDiff that the jacobian is a tridiagonal matrix. However, as reported in issue #7, sparsity returns a matrix with zero entries.
A new bug arises when I compute A * x by hand:
ForwardDiff returns the same jacobian as that for testsparse!, while sparsity! returns a 100 x 100 matrix with all (10,000) entries being true.
My julia version is 1.1.1, if it matters. Thanks in advance!
The text was updated successfully, but these errors were encountered: