You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can be accessed successfully via getobs(), if the observation index is a single value, i.e. is of type Number:
getobs(data, 6)
Instead, when accessing multiple observations at once, e.g., as follows
getobs(data, 4:6)
a MethodError is thrown with message no method matching isless(::UnitRange{Int64}, ::Int64) in obstransform.jl.
The getobs() function refers to the getindex() function in this case and currently there seems to be only this getindex() method for JoinedData containers, which is obviously restricted to single value indices.
A possible use case for accessing more than a single observation could be, for instance, the combination of the JoinedData container with a BatchView and batch-sizes larger than 1, as follows:
batched_data =BatchView(data; batchsize=3)
When accessing this batched data container, e.g., as follows
batched_data[2]
the same error is thrown because this expression finally calls getobs()here in the same way as in the example above.
I guess that at least the getindex() method for JoinedData containers should be restricted to indices of type Number. But it would also be nice if JoinedData containers supported other indexing types in the future.
The text was updated successfully, but these errors were encountered:
A data container with joined data like e.g.
can be accessed successfully via
getobs()
, if the observation index is a single value, i.e. is of typeNumber
:Instead, when accessing multiple observations at once, e.g., as follows
a
MethodError
is thrown with messageno method matching isless(::UnitRange{Int64}, ::Int64)
in obstransform.jl.The
getobs()
function refers to thegetindex()
function in this case and currently there seems to be only thisgetindex()
method forJoinedData
containers, which is obviously restricted to single value indices.A possible use case for accessing more than a single observation could be, for instance, the combination of the
JoinedData
container with aBatchView
and batch-sizes larger than 1, as follows:When accessing this batched data container, e.g., as follows
batched_data[2]
the same error is thrown because this expression finally calls
getobs()
here in the same way as in the example above.I guess that at least the
getindex()
method forJoinedData
containers should be restricted to indices of typeNumber
. But it would also be nice ifJoinedData
containers supported other indexing types in the future.The text was updated successfully, but these errors were encountered: