numpy.matrix.transpose — NumPy v1.22 Manual
numpy.org › generated › numpyJun 22, 2021 · numpy.matrix.transpose ¶. numpy.matrix.transpose. ¶. Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d (a).T achieves this, as does a [:, np.newaxis] .