-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature Idea: flat transform #94
Comments
What is the format of |
Having a flat transform would make the construction of such an Array quite easy. We would need to be careful with the length: t = as((a = asℝ,
b = as(Vector, as(Real, 0, 1), 2),
c = UnitVector(3)))
x = randn(dimension(t)) # length(x) == 5
transform(t, x) # -> tuple
transform(t, x, keep_flat=true)) # -> vector of length(6) != dimension(t) |
Thanks, I get it. It should be relatively easy to flatten transformed values:
can deal with everything Or would you prefer transforming directly to a flat vector for efficiency? I will keep this in mind for the next refactoring (which is coming up soon). |
Also, an ideal API would give column names, such as |
Getting meaningful names would be very helpful!
|
It would be useful if
transform
would have an option, so that the result remains a flat vector:A good use case is converting MCMC samples in
MCMCChains.Chains
objects:This seem related to #13
The text was updated successfully, but these errors were encountered: