-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
length 0 array documentation #621
Comments
Thanks for posting the issue, @spinkney. We should definitely fix this. |
I believe this is stated further down on the page you link, https://mc-stan.org/docs/reference-manual/vector-matrix-array-expressions.html#no-empty-array-expressions |
Ah, very nice! |
Is there anything more you think we should be saying in that section? |
I think I would've noticed this better if it was in the part Rectangular array expressions only instead of it's own section. Though this could just be how I read sections, finding the relevant part and then switching back to what I'm doing, instead of reading through the docs carefully. The only other thing to add is @nhuurre's suggestion that it is also possible to create empty array's on the fly as |
This issue stems from stan-dev/stanc3#1286 where there was some confusion on length 0 arrays. It becomes apparent that there is ambiguity in the type of the array with length 0. I think we should add documentation around this and state clearly that
{}
is not a valid constructor.I believe the relevant section that can be expanded is in the reference manual at https://mc-stan.org/docs/reference-manual/vector-matrix-array-expressions.html#array-expressions.
The text was updated successfully, but these errors were encountered: