Skip to content
Snippets Groups Projects
Commit 5fa60d99 authored by Brian Groenke's avatar Brian Groenke
Browse files

Add getindex to Profile

parent ef1de842
No related branches found
No related tags found
1 merge request!57Add support for per-layer callbacks
......@@ -9,6 +9,7 @@ Flatten.flattenable(::Type{<:Profile}, ::Type{Val{:depths}}) = false
Base.length(::Profile{N}) where N = N
Base.iterate(profile::Profile) = iterate(zip(profile.depths,profile.values))
Base.iterate(profile::Profile, state) = iterate(zip(profile.depths,profile.values),state)
Base.getindex(profile::Profile, i) = (depth=profile.depths[i], value=profile.values[i])
StructTypes.StructType(::Type{<:Profile}) = StructTypes.UnorderedStruct()
"""
profile2array(profile::Profile{N,D,T};names) where {N,D,T}
......
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