-
Notifications
You must be signed in to change notification settings - Fork 54
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
StaticArrays support #768
StaticArrays support #768
Conversation
34e1c13
to
84990dd
Compare
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #768 +/- ##
=======================================
Coverage 98.26% 98.26%
=======================================
Files 39 39
Lines 7105 7105
=======================================
Hits 6982 6982
Misses 123 123
☔ View full report in Codecov by Sentry. |
src/krylov_utils.jl
Outdated
@@ -210,9 +210,9 @@ function ktypeof(v::S) where S <: DenseVector | |||
end | |||
|
|||
function ktypeof(v::S) where S <: AbstractVector | |||
if S.name.name == :Zeros || S.name.name == :Ones | |||
if S.name.name == :Zeros || S.name.name == :Ones || S.name.name == :SArray || S.name.name == :MArray || S.name.name == :SizedArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think :FieldArray
is also a valid subtype of StaticVector
julia> subtypes(StaticVector)
5-element Vector{Any}:
FieldArray{Tuple{N}, T, 1} where {N, T}
MArray{Tuple{N}, T, 1} where {N, T}
SArray{Tuple{N}, T, 1} where {N, T}
SizedArray{Tuple{N}, T, 1, M} where {N, T, M}
StaticArrays.SUnitRange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we could add :ComponentArray
that would solve all my immediate problems 🙏
This works for my use case, thanks for the rapid fix! I'm gonna try to demo a more principled version over on #767, but if you can merge this in the meantime that would be very helpful |
using LinearAlgebra, SparseArrays, Test | ||
using Krylov, StaticArrays | ||
|
||
@testset "StaticArrays" begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to also test other array formats like FillArrays? Test dependencies are basically free
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will do that with another PR.
my hero @amontoison, thank you |
No description provided.