-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support view of 2D slices #11
Comments
So it has to be contiguous. I can support passing a column of a matrix: I'll add that |
Will it be useful if adding the support of |
What do you mean by |
Thanks for the explanation. That makes sense. |
I think my problem is similar to above. However, I could not get the point exactly. Why the sliced matrix by view is not supported by klu as in the below? A = sprand(10,10, 0.5)
julia> klu(@view(A[1:5,1:5]))
ERROR: MethodError: no method matching klu(::SubArray{Float64, 2, SparseMatrixCSC{Float64, Int64}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}) |
This is not really similar, we were talking about views of dense matrices. In that case we can't just use the view as is, because the dense storage is not contiguous. The problem you're describing is slightly different, it's a view of a sparse matrix. But I'll just handle both by copying. |
Thank you! I have one concern please. The solution of the linear equation |
The above code works. If b is a 2d vector or even whole view
@view b[:,:]
is used, it also works fine. However, if@view b[indexes, indexes]
is passed, the following error will occur:The text was updated successfully, but these errors were encountered: