Answers for "Python NumPy rollaxis Function Example"

0

Python NumPy rollaxis Function Example

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

# importing numpy as np
import numpy as np

arr = np.ones((4, 3, 2, 1))

softhunt = np.rollaxis(arr, 3, 1).shape

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

Python Answers by Framework

Browse Popular Code Answers by Language