I just stumbled on two phrases in the manual that puzzle me:
What kind of array doesn’t have a
size defined? I can’t find an example, and the “chapter on arrays with custom indices” only says:
In some cases it may also be helpful to temporarily disable
lengthfor your new array type, since code that makes incorrect assumptions frequently uses these functions.
which sounds more like a temporary debug thing than a real array without
The other phrase is at https://docs.julialang.org/en/v1/devdocs/offset-arrays/#Linear-indexing-(LinearIndices)-1 :
For this reason, your best option may be to iterate over the array with
eachindex(A), or, if you require the indices to be sequential integers, to get the index range by calling
In which case would
eachindex(A) give values that are not sequential integers?