Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python NumPy transpose Function Example in one line of code

# welcome to softhunt.net
# importing python module named numpy
import numpy as np

# making a 3x3 array
arr = np.array([[1, 4, 7],
				[2, 5, 8],
				[3, 6, 9]])

# before transpose
print('Original array:
', arr, end ='

')

# after transpose
print('Transposed array:
', arr.transpose())
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #NumPy #transpose #Function #Example #line #code
ADD COMMENT
Topic
Name
3+3 =