Skip to content

Commit

Permalink
remove build-bug where obs_noise_cov append flattens array
Browse files Browse the repository at this point in the history
  • Loading branch information
odunbar committed Jun 24, 2024
1 parent 3b05fa7 commit 2b95ec7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Observations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,11 @@ function get_obs_noise_cov(os::OS; build = true) where {OS <: ObservationSeries}
else
minibatch_covs = []
for observation in observations_vec
append!(minibatch_covs, get_obs_noise_cov(observation, build = build)) # not push! to keep structure flat
push!(minibatch_covs, get_obs_noise_cov(observation, build = build)) #
end
end
if !build # return the blocks directly
return minibatch_covs
return reduce(vcat, minibatch_covs)
else # return the blocked matrix
block_sizes = size.(minibatch_covs, 1) # square mats
minibatch_cov_full = zeros(sum(block_sizes), sum(block_sizes))
Expand Down

0 comments on commit 2b95ec7

Please sign in to comment.