> > For a 1D array a of shape (N,), I expect a.T2 to be of shape (N, 1), > > Why not (1,N)? -- it is not well defined, though I suppose it's not so > bad to establish a convention that a 1-D array is a "row vector" > rather than a "column vector". I like Todd's simple proposal: a.T2 should be equivalent to np.atleast_2d(arr).T
> BTW, if transposing a (N,) array gives you a (N,1) array, what does > transposing a (N,1) array give you? > > (1,N) or (N,) ? The proposal changes nothin for dims > 1, so (1,N). That means that a.T2.T2 doesn"t have the same shape as a. It boils down to practicality vs purity, as often ! _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion