Why not just:
v = np.array([2,3,1]).T
is there something wrong with numpys convenience method for transpose but not matlabs postfix unary convenience operator?
is there something wrong with numpys convenience method for transpose but not matlabs postfix unary convenience operator?
Also you too made the same mistake: np.array([2,3,1]).T doesn't do anything, you need np.array([[2,3,1]]).T
[1] https://docs.scipy.org/doc/numpy/reference/generated/numpy.t...
When someone googles Matlab/Octave there won't be the same mixture of contexts as there is for Python. With Python there's "2 or 3?" before even starting. Than Cython or Jython or PyPy? That's nothing against Python except that in one particular time limited context, the questions are a distraction {without even considering the complaints of students when the choice of Python implementation is contrary to their opinion}.