Skip to content

Commit cb2ceaa

Browse files
committed
bugfix
1 parent f83d30b commit cb2ceaa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Utilities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function encoder_kwargs_from(os::OS) where {OS <: ObservationSeries}
9292
observations = get_observations(os)
9393
obs_vec = [get_obs(obs) for obs in observations]
9494
obs_noise_cov = get_obs_noise_cov(observations[1], build = false)
95-
if !all([get_obs_noise_cov(observations[i], build = false) == obs_noise_vec for i in length(observations)])
95+
if !all([get_obs_noise_cov(observations[i], build = false) == obs_noise_cov for i in length(observations)])
9696
@warn("""
9797
Detected that observation covariances vary for different observations.
9898
Encoder kwarg `:obs_noise_cov` will be set to the FIRST of these covariances for the purpose of data processing.

src/Utilities/elementwise_scaler.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ $(TYPEDSIGNATURES)
208208
Apply the `ElementwiseScaler` encoder, on a columns-are-data matrix
209209
"""
210210
function encode_data(es::ElementwiseScaler, data::MM) where {MM <: AbstractMatrix}
211+
out = zeros(size(data))
211212
enc = get_data_encoder_mat(es)[1]
212213
mul!(out, enc, data) # must use this form to get matrix output of enc*out
213214
return out
@@ -219,6 +220,7 @@ $(TYPEDSIGNATURES)
219220
Apply the `ElementwiseScaler` decoder, on a columns-are-data matrix
220221
"""
221222
function decode_data(es::ElementwiseScaler, data::MM) where {MM <: AbstractMatrix}
223+
out = zeros(size(data))
222224
dec = get_data_decoder_mat(es)[1]
223225
mul!(out, dec, data) # must use this form to get matrix output of dec*out
224226
return out

0 commit comments

Comments
 (0)