Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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]]
 
PREVIOUS NEXT
Tagged: #return #column #matrix #numpy
ADD COMMENT
Topic
Name
6+6 =