[Python-ideas] Python multi-dimensional array constructor
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Oct 20 03:20:59 EDT 2016
Todd wrote:
> ||| is the delimiter for the third dimension, || is the delimiter for
> the second dimension.
This seems a bit inconsistent. It appears the rule is
"n vertical bars is the delimiter for the nth dimension".
By that rule, the delimiter for the first dimension
should be a single vertical bar, but instead it's a
comma.
Also, it's not very clear why when you have a 2D array
with two rows you write
[| 1,2,3 || 4,5,6 |]
i.e. with *one* vertical bar at each end, but when
there is only one row you write
[|| 1,2,3 ||]
i.e. with *two* vertical bars at each end.
--
Greg
More information about the Python-ideas
mailing list