Skip to content

Commit eb6ead1

Browse files
author
Ben J. Ward
committed
Add an ndims method
1 parent 61ee928 commit eb6ead1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/biosequence/biosequence.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Base.keys(seq::BioSequence) = eachindex(seq)
4444
Base.nextind(::BioSequence, i::Integer) = Int(i) + 1
4545
Base.prevind(::BioSequence, i::Integer) = Int(i) - 1
4646
Base.size(x::BioSequence) = (length(x),)
47+
Base.ndims(x::BioSequence) = 1
4748
Base.eltype(::Type{<:BioSequence{A}}) where {A <: Alphabet} = eltype(A)
4849
Base.eltype(x::BioSequence) = eltype(typeof(x))
4950
Alphabet(::Type{<:BioSequence{A}}) where {A <: Alphabet} = A()

src/longsequences/indexing.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ end
6666
@inbounds data[vi] = (v_ << off) | (bits & ~(bitmask(i) << off))
6767
return s
6868
end
69+
70+
# Broadcasting
71+

0 commit comments

Comments
 (0)