Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

joinobs assumes all inputs to be of the same type but returns a different JoinedData type #160

Open
EssamWisam opened this issue Jul 12, 2023 · 0 comments

Comments

@EssamWisam
Copy link

In particular, the following does not work

data1 = 1:10
data2 = 11:20
data12 = joinobs(data1, data2)
data3 = 21:30
data123 = joinobs(data12, data3)

The error I get is

MethodError: no method matching MLUtils.JoinedData(::Tuple{MLUtils.JoinedData{UnitRange{Int64}, 2}, UnitRange{Int64}}, ::Tuple{Int64, Int64})  

It is nice to have the functionality above because it otherwise may inhibit the use of joinobs in a loop where one iteratively concatenates data into the same variable.

I am not sure how easy this is to generically solve because the implementation lets joinobs make a NTuple{N,T} out of the input data containers and then simulates these being one data container by overriding the base getindex and length methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant