Skip to content

Commit

Permalink
Replace two-argument maps by broadcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
simsurace committed Oct 3, 2023
1 parent 8e3a4a3 commit 23a9638
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/space_time/pseudo_point.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ function kernel_diagonals(k::DTCSeparable, x::RegularInTime)
space_kernel = k.k.l
time_kernel = k.k.r
time_vars = kernelmatrix_diag(time_kernel, get_times(x))
return map(
(s_t, x_r) -> Diagonal(kernelmatrix_diag(space_kernel, x_r) * s_t),
time_vars,
x.vs,
return Diagonal.(
kernelmatrix_diag.(
Ref(space_kernel),
x.vs
) .* time_vars
)
end

Expand Down

0 comments on commit 23a9638

Please sign in to comment.