Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks I think you're right that this does work though I'm not working on the model at the moment so can't test. Because xarray dims do not propagate through calculations, there is a bit more boilerplate needed to set dims correctly on every deterministic, and then extra work is needed to change every Deterministic if you change the dimensionality of the model. Even so, getting the right xarray data out of Deterministics like this is very useful, and I understand from other conversations that propagating xarray dims through calculations is not currently feasible (though might be in future if some changes are made on the numpy/xarray side) Happy to close for now. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi there, I think it would be useful to be able to indicate/annotate that the new dimension along which a set of tensors have been "stacked" by pymc.math.stack is equivalent to a known xarray dimension (previously added by
Model.add_coord
)Here's an example - not intended to do anything useful but to illustrate the idea
In the above
probs_by_category
creates a tensor 3 items long. What I would like to do is indicate thatprobs_by_category
has the "categories" xarray dimension attached to it, but as far as I can tell I think it is currently not possible to indicate that. Please correct me if I'm wrong!Thanks!
Beta Was this translation helpful? Give feedback.
All reactions