Answers for "python numpy delete column"

0

python numpy delete column

print(np.delete(a, 0, 0))
# [[ 4  5  6  7]
#  [ 8  9 10 11]]

print(np.delete(a, 2, 0))
# [[0 1 2 3]
#  [4 5 6 7]]

# print(np.delete(a, 3, 0))
# IndexError: index 3 is out of bounds for axis 0 with size 3
Posted by: Guest on March-19-2022

Python Answers by Framework

Browse Popular Code Answers by Language