Skip to content

Commit 165474c

Browse files
committed
SemObsCov ctor: restrict n_obs to integer
don't allow missing n_obs
1 parent 43dceff commit 165474c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/observed/covariance.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ struct SemObservedCovariance{B, C} <: SemObserved
4747
end
4848

4949
function SemObservedCovariance(;
50-
specification::Union{SemSpecification, Nothing},
50+
specification::Union{SemSpecification, Nothing} = nothing,
5151
obs_cov,
5252
obs_colnames = nothing,
5353
spec_colnames = nothing,
5454
obs_mean = nothing,
5555
meanstructure = false,
56-
n_obs = nothing,
56+
n_obs::Integer,
5757
kwargs...,
5858
)
5959
if !meanstructure & !isnothing(obs_mean)

test/unit_tests/data_input_formats.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ end
209209
)
210210
end
211211

212-
@test_throws UndefKeywordError(:specification) SemObservedCovariance(obs_cov = dat_cov)
212+
@test_throws UndefKeywordError(:n_obs) SemObservedCovariance(obs_cov = dat_cov)
213213

214214
@test_throws ArgumentError("no `obs_colnames` were specified") begin
215215
SemObservedCovariance(specification = spec, obs_cov = dat_cov, n_obs = 75)

0 commit comments

Comments
 (0)