Skip to content

Commit

Permalink
Merge pull request #52 from LAMPSPUC/fix_y_format_bug
Browse files Browse the repository at this point in the history
fix y format bug
  • Loading branch information
andreramosfdc authored Feb 17, 2025
2 parents 7bb7f2f + 1ebbb62 commit 2f30ca0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StateSpaceLearning"
uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b"
authors = ["andreramosfc <andreramosfdc@gmail.com>"]
version = "1.4.0"
version = "1.4.1"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
6 changes: 6 additions & 0 deletions src/models/structural_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ mutable struct StructuralModel <: StateSpaceLearningModel
stochastic_start,
Exogenous_X,
)
# convert y format into vector or matrix of AbstractFloat
if typeof(y) <: Vector
y = convert(Vector{AbstractFloat}, y)
else
y = convert(Matrix{AbstractFloat}, y)
end
return new(
y,
X,
Expand Down

0 comments on commit 2f30ca0

Please sign in to comment.