Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

return column of matrix numpy

import numpy as np
A = np.matrix([[1,2,3],[4,5,6]])
# To get a line from matrix:
print(A[0])
# ==> [[1 2 3]]
# To get a column:
print(A[:,0])
# ==> [[1]
#      [4]]
Comment

PREVIOUS NEXT
Code Example
Python :: add jupyter environment 
Python :: except do nothing python 
Python :: run code at the same time python 
Python :: pandas drop rows with empty list 
Python :: python discord input 
Python :: add download directory selenium python 
Python :: mongodb check if substring in string 
Python :: python working directory executed file 
Python :: discord python bot require one of two roles for command 
Python :: sum of 1 to n number in python 
Python :: how to convert string to function name in python 
Python :: how to get the year in python 
Python :: subtract one list from another python 
Python :: how to find shortest string in a list python 
Python :: docker pyinstaller windowa 
Python :: factorial recursion python 
Python :: take first n row of dictionary python 
Python :: how to change the column order in pandas dataframe 
Python :: seconds add zero python 
Python :: random oversampling python 
Python :: python: check type and ifno of a data frame 
Python :: how to set icon in tkinter 
Python :: how to reverse array in ruby 
Python :: python iterate over object fields 
Python :: error bar plot python 
Python :: Finding the Variance and Standard Deviation of a list of numbers in Python 
Python :: sort array python by column 
Python :: add time delta pytohn 
Python :: get rid of n in string python 
Python :: python delete key from dict 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =