Skip to content

Commit

Permalink
Merge pull request #33 from JuliaAlgebra/bl/eachindex
Browse files Browse the repository at this point in the history
Add eachindex back
  • Loading branch information
kalmarek authored May 27, 2024
2 parents 7901688 + 344e773 commit 8255fe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Explicit bases are stored e.g. in an `AbstractVector` and hence immutable
"""
abstract type ExplicitBasis{T,I} <: AbstractBasis{T,I} end

Base.keys(ib::ExplicitBasis) = Base.OneTo(length(ib))

Check warning on line 50 in src/bases.jl

View check run for this annotation

Codecov / codecov/patch

src/bases.jl#L50

Added line #L50 was not covered by tests

function zero_coeffs(::Type{S}, eb::ExplicitBasis{T,I}) where {S,T,I}
return spzeros(S, I, length(eb))
end
Expand Down
1 change: 1 addition & 0 deletions src/bases_fixed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Base.length(b::FixedBasis) = length(b.elts)

Base.iterate(b::FixedBasis) = iterate(b.elts)
Base.iterate(b::FixedBasis, state) = iterate(b.elts, state)
Base.IndexStyle(::Type{<:FixedBasis{T,I,V}}) where {T,I,V} = Base.IndexStyle(V)

Check warning on line 35 in src/bases_fixed.jl

View check run for this annotation

Codecov / codecov/patch

src/bases_fixed.jl#L35

Added line #L35 was not covered by tests

# To break ambiguity
Base.@propagate_inbounds Base.getindex(
Expand Down

0 comments on commit 8255fe5

Please sign in to comment.