Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python NumPy swapaxis Function Example 2

# 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)
Comment

Python NumPy swapaxis Function Syntax

numpy.swapaxes(arr, axis1, axis2)
Comment

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)
Comment

PREVIOUS NEXT
Code Example
Python :: python remove first element from list 
Python :: install quick-mailer 
Python :: changing plot background color in python 
Python :: read a file in python 
Python :: ion flux relabeling 
Python :: Get all the numerical column from the dataframe using python 
Python :: Convert DateTime to Unix timestamp in Python 
Python :: iterate through an array python 
Python :: operator precedence in python 
Python :: python write line break 
Python :: for i in a for j in a loop python 
Python :: how to mention a div with class in xpath 
Python :: how to sort a list of dictionary by value in descending order? 
Python :: pd merge 
Python :: how to add an item to a dictionary in python 
Python :: how to use if else in lambda python 
Python :: openpyxl create new file 
Python :: how to put in code to download discord py 
Python :: blender 2.8 python set active object 
Python :: otp generation in python 
Python :: multiline comment python 
Python :: tkinter how to remove button boder 
Python :: copy website python 
Python :: how to display csv in pandas 
Python :: instance variable in python 
Python :: pandas merge python 
Python :: reverse range in python 
Python :: telebot send file 
Python :: django static files 
Python :: Python remove punctuation from a string 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =