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
Inconsistent array initialization with space and semicolon #20957
Comments
The syntax are clearly documented and there isn't any inconsistency here. There's no syntax for |
And dup of #17084 |
What @yuyichao is getting at here is that this has been discussed a fair bit and while there doesn't seem to be a perfect set of rules for this, the current behavior seems to be a local optimum in terms of meshing well with higher dimensional arrays and working well for linear algebra. If you want to give more feedback on the design, please feel free to do so over at #17084 – which is still open since it's not at all implausible that some new design tweak here could improve upon what we have. |
Ah, sorry! I thought I had done a keyword search about this but I guess I didn't find it - thanks! Will move over to the other thread. |
No worries – I can never find anything using GitHub search and I basically live on GitHub. |
sorry for the late chiming in: |
In Julia 0.5.0 array initialization is inconsistent when using spaces and semicolons.
Creates a 3-element rather than a 3x1 array. But, adding a space makes a 3x2 array:
Spaces add a second dimension and semicolons add rows, except for the
[1;2;3]
case.Making initialization consistent so that a semicolon adds a row (i.e.
[1;2;3]
initialization creates a 3x1 array) makes array initialization more consistent.The text was updated successfully, but these errors were encountered: