Skip to content

Commit 2f30ca0

Browse files
Merge pull request #52 from LAMPSPUC/fix_y_format_bug
fix y format bug
2 parents 7bb7f2f + 1ebbb62 commit 2f30ca0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StateSpaceLearning"
22
uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b"
33
authors = ["andreramosfc <[email protected]>"]
4-
version = "1.4.0"
4+
version = "1.4.1"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

src/models/structural_model.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ mutable struct StructuralModel <: StateSpaceLearningModel
131131
stochastic_start,
132132
Exogenous_X,
133133
)
134+
# convert y format into vector or matrix of AbstractFloat
135+
if typeof(y) <: Vector
136+
y = convert(Vector{AbstractFloat}, y)
137+
else
138+
y = convert(Matrix{AbstractFloat}, y)
139+
end
134140
return new(
135141
y,
136142
X,

0 commit comments

Comments
 (0)