Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python numpy array delete multiple columns

a = [[ 0  1  2  3], 
     [ 4  5  6  7], 
     [ 8  9 10 11]]

print(np.delete(a, [0, 3], 1))

# [[ 1  2]
#  [ 5  6]
#  [ 9 10]]
 
PREVIOUS NEXT
Tagged: #python #numpy #array #delete #multiple #columns
ADD COMMENT
Topic
Name
3+4 =