News Alert: Experts Exchange Confirmed as Safe in Cloudbleed Leak Read More
c:\tmp\_Python\jazzIIIlove>py26
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> a = numpy.array([[1, 2, 3],
... [11, 22, 33]])
>>> a
array([[ 1, 2, 3],
[11, 22, 33]])
>>> b = a.transpose()
>>> b
array([[ 1, 11],
[ 2, 22],
[ 3, 33]])
>>>
>>> import numpy
>>> a = numpy.arange(10).reshape(1,10)
>>> a
array([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])
>>> b = numpy.array([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])
>>> b
array([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])
>>> t = a.transpose()
>>> t
array([[0],
[1],
[2],
[3],
[4],
[5],
[6],
[7],
[8],
[9]])
The a and b are the same initially.
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
Exam question | 48 | 123 | |
How To Loop - Python | 19 | 87 | |
Homework Math Question | 1 | 107 | |
Math solution for number of possible window monitor positions using 1, 2, or 3 divisions | 4 | 44 |
Join the community of 500,000 technology professionals and ask your questions.