-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unexpected type when constructing StateSpaceSet
from existing StateSpaceSets
#35
Comments
Okay that's easy, we just need one more constructor for It took me so much time to make |
At the moment the docstring of |
Yes, that's the issue. I frequently do things like function some_func(x::AbstractStateSpaceSet, y::AbstractStateSpaceSet)
z = StateSpaceSet(x, y)
end where both
I'll do a PR. Which I kind of have to, because updating Associations.jl depends on this working properly (I don't want to introduce performance regressions, and using the workaround would require some time-consuming re-writing of some internals if not implemented)
I'll add that as part of the doctoring if I get it working. |
Ah, this was as was easy as introducing Then this works: julia> X = StateSpaceSet(rand(10, 3)); Y = StateSpaceSet(rand(10, 4)); Z = StateSpaceSet(X, Y)
7-dimensional StateSpaceSet{Float64} with 10 points
0.926997 0.53421 0.843038 0.735462 0.376864 0.844773 0.341259
0.247685 0.329002 0.0977652 0.278606 0.189166 0.882888 0.0298962
0.38986 0.4175 0.87285 0.325098 0.601125 0.724638 0.388005
0.497634 0.656108 0.831676 0.988828 0.807545 0.850886 0.425285
0.757449 0.948496 0.324714 0.960758 0.862568 0.0950807 0.53074
0.504828 0.303373 0.312139 0.839023 0.11291 0.129833 0.467016
0.241154 0.666729 0.272263 0.872927 0.689613 0.118522 0.9514
0.09106 0.211788 0.492563 0.659997 0.0875356 0.329951 0.499794
0.647615 0.309002 0.39649 0.657336 0.363963 0.0582504 0.942135
0.5497 0.10165 0.47628 0.357906 0.160913 0.492181 0.921648 |
It'll be a bit more involved to make it work with specifying the containtertype (e.g. MVector). Can we just push this internal fix for now (which ensures that nothing breaks upstream), and then do a proper fix later? I have very limited capacity to do anything significant work here now beyond fixing compatibility issues |
Describe the problem
With v2, we can no longer construct new
StateSpaceSets
with the correct type from existing datasets using horizontal concatenation. I discovered this because a bunch of tests upstream in Associations.jl broke when I now tried to up the compat version for StateSpaceSets.jl.The only way to get the old behaviour is to first explicitly collect each column of each marginal dataset, and then create the joint space. This workaround works, but leads to tremendous allocations which, until a solution is in place, significantly slow down all algorithms upstream which depended on the old behaviour.
Potential solution
StateSpaceSet
s be a way of constructing them (update docstring toStateSpaceSet
I think this should be non-conflicting with the
Minimal Working Example
The resulting inner type is
SVector{1, Float64}
.But, the result that I want is (which is also the pre v2 behaviour):
The text was updated successfully, but these errors were encountered: