Skip to content

Commit cb74a59

Browse files
committed
Revert "Revert "Update normalization.jl""
This reverts commit dc28310.
1 parent dc28310 commit cb74a59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/normalization.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ end
183183
@forward NormalizedTraces.traces Base.length, Base.size, Base.lastindex, Base.firstindex, Base.getindex, Base.view, Base.pop!, Base.popfirst!, Base.empty!, Base.parent
184184

185185
for f in (:push!, :pushfirst!, :append!, :prepend!)
186-
@eval function Base.$f(nt::NormalizedTraces, x::NamedTuple)
187-
for key in intersect(keys(nt.normalizers), keys(x))
188-
fit!(nt.normalizers[key], x[key])
186+
@eval function Base.$f(nt::NormalizedTraces, x::T) where T
187+
for key in intersect(keys(nt.normalizers), fieldnames(T))
188+
fit!(nt.normalizers[key], getfield(x, key))
189189
end
190190
$f(nt.traces, x)
191191
end

0 commit comments

Comments
 (0)