Closed
Description
The values returned from iteration over an AbfFile
(or over the result of pairs
) don't match what you get from indexing. Instead the values are of the undocumented type AbfKey
. This violates the contract of pairs
, and arguably also of the AbstractDict
interface:
using AlignedBinaryFormat
tmp = tempname()
abfopen(tmp, "w") do abf
abf["k"] = rand(10)
end
abf = abfopen(tmp, "r")
v = abf["k"]
k1, v1 = first(abf) # or `first(pairs(abf))`
@assert v === v1 # fails
typeof(v1) # == AlignedBinaryFormat.AbfKey
@show v[1]
@show v1[1] # ERROR: MethodError: no method matching getindex(::AlignedBinaryFormat.AbfKey, ::Int64)
Metadata
Metadata
Assignees
Labels
No labels