Python NumPy swapaxis Function Example 2

55

# welcome to softhunt.net
# Python program explaining
# numpy.swapaxes() function

# importing numpy as np
import numpy as np

arr = np.array([[[0, 1], [4, 5]], [[2, 3], [6, 7]]])

softhunt = np.swapaxes(arr, 0, 2)

print (softhunt)

Comments

Submit
0 Comments