# welcome to softhunt.net
# Python Program illustrating
# numpy.delete()
import numpy as np
arr = np.arange(5)
print("Original array : ", arr)
mask = np.ones(len(arr), dtype=bool)
# Equivalent to np.delete(arr, [0,2,4], axis=0)
mask[[0,2]] = False
print("
Mask set as : ", mask)
result = arr[mask,...]
print("
Deletion Using a Boolean Mask : ", result)