Skip to content

Commit

Permalink
Fix InitFromSamples
Browse files Browse the repository at this point in the history
  • Loading branch information
oschulz committed Nov 11, 2024
1 parent a83aea8 commit 4d2f76b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/initvals/initvals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,10 @@ function apply_trafo_to_init(f_transform::Function, initalg::ExplicitInit)
xs_tr = broadcast_trafo(f_transform, initalg.xs)
ExplicitInit(xs_tr)
end

function apply_trafo_to_init(f_transform::Function, initalg::InitFromSamples)
# ToDo: Pass context to apply_trafo_to_init
tmp_context = BATContext()
transformed_smpls = bat_transform_impl(f_transform, initalg.samples, SampleTransformation(), tmp_context).result
InitFromSamples(transformed_smpls)
end

0 comments on commit 4d2f76b

Please sign in to comment.