Skip to content

TimeArray of 3D values fails with a crash #504

Open
@WaterQualityModels

Description

@WaterQualityModels

From the docs (values::A # some kind of AbstractArray{T,N}), I was expecting to be able to handle a 3D array of values without issue (rand(6,5,2) isa AbstractArray = true), but apparently this is not supported. In addition, it fails by crashing out the session - basic example:

using TimeSeries
ts = collect(now():Dates.Minute(15):now()+Dates.Minute(15)*5);
data = rand(6,5,2)
ta = TimeArray(ts,data)

If run in VSCode, the error is handled a little better but still crashes the session:

┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.5.6\scripts\error_handler.jl:15
ERROR: DimensionMismatch("mismatch in dimension 3 (expected 2 got 1)")

Aside from handling the error better, is there an intention for this data type to be supported? It seems pretty basic to me in terms of an array of covariates collected at multiple locations at a common schedule. Is it supported in another manner that I am just not implementing correctly?

Thanks in advance for any constructive comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions