Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Inconsistent array initialization with space and semicolon #20957
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
Making initialization consistent so that a semicolon adds a row (i.e.
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.