Numpy transpose of 1D array not giving expected result

前端 未结 4 1528
暗喜
暗喜 2020-12-05 18:20

I am trying a very basic example in Python scipy module for transpose() method but it\'s not giving expected result. I am using Ipython with pylab mode.

4条回答
  •  粉色の甜心
    2020-12-05 18:48

    You should try: a = array([[1,2,3]]) or a = array([[1],[2],[3]]) , that is, a should be a matrix (row vector, column vector).

提交回复
热议问题