-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Re-enable passing dims
alongside shape
or size
#5325
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5325 +/- ##
==========================================
+ Coverage 80.18% 80.23% +0.05%
==========================================
Files 89 89
Lines 14863 14857 -6
==========================================
+ Hits 11918 11921 +3
+ Misses 2945 2936 -9
|
d0f12eb
to
cf5f095
Compare
dims
alongside shape
or size
dims
alongside shape
or size
cf5f095
to
2fe5e93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: what happens if dims and observed mismatch?
The same as when dims and shape, or dims and size or dims and the actual shape mismatch: You get shape errors in MCMC or upon InferenceData conversion. It would be great to make this more robust for the user. We could also consider to change the signature of |
This PR makes the following possible (which was supported in
v3
already).Changes in this PR
ndim_resize
item from the tuple returned byresize_from_shape
andresize_from_dims
, because it was simply the length of the second item and not used anywhere.raise ValueError
blocks that denied passingdims
alongsideshape
orsize
.shape+dims
orsize+dims
also works when combined withEllipsis
.Depending on what your PR does, here are a few things you might want to address in the description:
consider adding/updating relevant example notebooksright before it's ready to merge, mention the PR in the RELEASE-NOTES.mdnot needed, because this feature worked in v3 and users most probably assume already that passing dims in addition or size or shape is valid.