diff --git a/src/core/time.jl b/src/core/time.jl index 3042ca393..1122c1e54 100644 --- a/src/core/time.jl +++ b/src/core/time.jl @@ -356,6 +356,7 @@ end # # 4. TimestepArray methods # +Base.dotview(v::Mimi.TimestepArray, args...) = Base.dotview(v.data, args...) Base.fill!(obj::TimestepArray, value) = fill!(obj.data, value) diff --git a/test/test_timesteparrays.jl b/test/test_timesteparrays.jl index 94199af48..fd1e13c00 100644 --- a/test/test_timesteparrays.jl +++ b/test/test_timesteparrays.jl @@ -245,5 +245,9 @@ set_param!(m, :first, :par, 1:length(years)) @test_throws MissingException run(m) +# Check broadcast assignment to underlying array +x = Mimi.TimestepVector{Mimi.FixedTimestep{2005,10}, Float64}(zeros(10)) +x[:] .= 10 +@test all(x.data .== 10) end #module