Skip to content

Commit 50208f0

Browse files
committed
update example
1 parent f1a09fb commit 50208f0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/src/examples.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ using LossFunctions
2929
3030
# generative model
3131
function model(X::AbstractVector{T}) where T
32-
position = @view X[1:2] # x, y position
33-
fwhm = @view X[3:4] # fwhm_x, fwhm_y
34-
amp = X[5] # amplitude
35-
return Gaussian(T, pos=position, fwhm=fwhm, amp=amp)
32+
x = X[1] # position
33+
y = X[2]
34+
fwhm = @view X[3:4] # fwhm_x, fwhm_y
35+
amp = X[5] # amplitude
36+
return Gaussian(T; x, y, fwhm, amp)
3637
end
3738
3839
# objective function

0 commit comments

Comments
 (0)