Answers for "Python NumPy transpose Function Example in one line of code"

0

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:\n', arr, end ='\n\n')

# after transpose
print('Transposed array:\n', arr.transpose())
Posted by: Guest on April-21-2022

Code answers related to "Python NumPy transpose Function Example in one line of code"

Python Answers by Framework

Browse Popular Code Answers by Language