numpy/numpy — pull request #452 by seberg (2012-09-21 00:47:25+00:00)
Title: Make np.delete work with neg. slices/indices and improve perf.

`np.delete` has some serious issues and the first two things are a serious bugs IMO since it creates plain wrong results (and its not documented):

1. When using slices with negative strides, it does not work (best case) or give even wrong results.
2. When using an index array, it will simply ignore negative indexes.
3. The fact that it uses `setdiff1d` makes it unnecessarily slow and bloated compared to boolean indexing based methods.

This PR fixes these issues. There is one more behaviour change, and that is that out of bound indices now will raise an error, however I consider that a feature...

I will add tests if this is wanted, and I honestly think this is a very necessary clean up of the `delete` function.

Example for the complete wrong results:
```python
In [1]: arr = np.arange(4)

In [2]: set(arr) - set(arr[1::-1])
Out[2]: set([2, 3])

In [3]: np.delete(arr, np.s_[1::-1])
Out[3]: array([3, 3])
```