Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to find the transpose of a matrix in python


import numpy as np

arr1 = np.array([[1, 2, 3], [4, 5, 6]])

print(f'Original Array:
{arr1}')

arr1_transpose = arr1.transpose()

print(f'Transposed Array:
{arr1_transpose}')
Comment

transpose matrix python

arr = list(list(x) for x in zip(*arr))
Comment

PREVIOUS NEXT
Code Example
Python :: python convert json string to class 
Python :: resample ohlc pandas 
Python :: add element in set python 
Python :: python print error output 
Python :: null variable in python 
Python :: python string to list of int 
Python :: how to get a summary of a column in python 
Python :: import discord 
Python :: how to get all messages from a telegram group with telethon 
Python :: python return number of characters in string 
Python :: python get line number x in file 
Python :: get all files in pc python 
Python :: opencv namedwindow 
Python :: new line in python 
Python :: check setuptools version python 
Python :: python glfw 
Python :: how many columns can a pandas dataframe have 
Python :: python decimal remove trailing zero 
Python :: python using enum module 
Python :: python count same number in list 
Python :: pytest teardown method 
Python :: python extract substring 
Python :: read specific columns from csv in python pandas 
Python :: Format UTC to local timezone using PYTZ for Django 
Python :: get file in file zip python 
Python :: sentence similarity python 
Python :: increase recursion depth google colab 
Python :: remove column by index 
Python :: break in python 
Python :: parse int python 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =