Answers for "Python NumPy swapaxis Function Example"

0

Python NumPy swapaxis Function Example

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

# importing numpy as np
import numpy as np

arr = np.array([[1, 2, 3, 4]])

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

print (softhunt)
Posted by: Guest on April-21-2022

Python Answers by Framework

Browse Popular Code Answers by Language