I want to delete an element from a numpy array by index.
The commands
arr = np.linspace(-5,5,10)
del arr[0]
The code above throws an error saying cannot delete array elements
.
Using pop
doesn't work either. What should I do?
I want to delete an element from a numpy array by index.
The commands
arr = np.linspace(-5,5,10)
del arr[0]
The code above throws an error saying cannot delete array elements
.
Using pop
doesn't work either. What should I do?