Answers for "remove a column from a numpy array"

1

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]]
Posted by: Guest on November-27-2020
1

python remove one element from numpy array

numpy.delete(a, index)
Posted by: Guest on March-22-2020

Code answers related to "remove a column from a numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language