Python NumPy ndarray.T Example

39

# welcome to softhunt.net
# import the important module in python
import numpy as np
		
# make an array with numpy
arr = np.array([[1, 4, 7, 10], [2, 5, 8, 11], [3, 6, 9, 12]])
		
# applying ndarray.T object
softhunt = arr.T

print(softhunt)

Comments

Submit
0 Comments