Skip to content
Snippets Groups Projects
Unverified Commit a222c5a5 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Use `base.length` rather than N to determine length

Allows for sequences with unknown length
parent 939bdcdc
No related branches found
No related tags found
1 merge request!10Add Magnetisation transfer sequence
......@@ -26,7 +26,8 @@ Sub-types need to implement:
"""
abstract type BaseSequence{N} <: ContainerBlock end
function Base.getindex(bs::BaseSequence{N}, index::Integer) where {N}
function Base.getindex(bs::BaseSequence, index::Integer)
N = length(bs)
if nrepeat(bs) > 0 && (index < 1 || index > length(bs))
throw(BoundsError(bs, index))
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment