Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add column to np array

x1= data[:,:-1]
x = np.insert(x1, index(0), values=1, axis=1)
#to add a column of 1's in the features matrix
 
PREVIOUS NEXT
Tagged: #add #column #np #array
ADD COMMENT
Topic
Name
2+5 =