Skip to content

Commit 19a4011

Browse files
test and docs fixes
1 parent 2d54185 commit 19a4011

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/states.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ julia> new_mat = states(test_mat, fill(3.0f0, 3))
119119
"""
120120
struct ExtendedStates <: AbstractStates end
121121

122+
function (states_type::ExtendedStates)(mat::AbstractMatrix, inp::AbstractMatrix)
123+
results = states_type.(eachcol(mat), eachcol(inp))
124+
return hcat(results...)
125+
end
126+
122127
function (states_type::ExtendedStates)(mat::AbstractMatrix, inp::AbstractVector)
123128
results = Vector{Vector{eltype(mat)}}(undef, size(mat, 2))
124129
for (idx, col) in enumerate(eachcol(mat))

test/test_states.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ nlas = [(NLADefault(), test_array),
1212

1313
pes = [(StandardStates(), test_array),
1414
(PaddedStates(; padding=padding),
15-
reshape(vcat(padding, test_array), length(test_array) + 1, 1)),
15+
vcat(test_array, padding)),
1616
(PaddedExtendedStates(; padding=padding),
17-
reshape(vcat(padding, extension, test_array),
18-
length(test_array) + length(extension) + 1,
19-
1)),
20-
(ExtendedStates(), vcat(extension, test_array))]
17+
vcat(test_array, padding, extension)),
18+
(ExtendedStates(), vcat(test_array, extension))]
2119

2220
@testset "States Testing" for T in test_types
2321
@testset "Nonlinear Algorithms Testing: $algo $T" for (algo, expected_output) in nlas

0 commit comments

Comments
 (0)