Repository: numpy/numpy
Issue category: Feature Request

Issue:
DOC: types for numpy.delete's obj argument don't cover all possibilities
### Issue with current documentation:

The docstring for `numpy.delete` specifues the type of the `obj` parameter as:
> **obj : _slice, int or array of ints_**

It seem it can also be anything that can be cast as an array of ints, including e.g. an iterator like `range(0,4,2)` or list of ints like `[0,2,3]`. I confirmed this by looking in the source and I think this line is where anything that isn't a slice, int or bool is cast as a `numpy.array`:

https://github.com/numpy/numpy/blob/83bf22579b6eaa8113f6cff67b10fd9524965f23/numpy/lib/_function_base_impl.py#L5317

This type specification also doesn't mention that `obj` can be an array of booleans.

### Idea or request for content:

I'd open a PR but am not sure the best wording. I'm looking for something like

> **obj : _slice, int, array of bools or anything that can be cast as an array of ints_**

but that seems a bit verbose. Perhaps there's some NumPy jargon that's more succinct?


Hints:

Patch:
diff --git a/numpy/lib/_function_base_impl.py b/numpy/lib/_function_base_impl.py
index 477c6a4f39a8..7a2c69bad0e6 100644
--- a/numpy/lib/_function_base_impl.py
+++ b/numpy/lib/_function_base_impl.py
@@ -5198,7 +5198,7 @@ def delete(arr, obj, axis=None):
     ----------
     arr : array_like
         Input array.
-    obj : slice, int or array of ints
+    obj : slice, int, array-like of ints or bools
         Indicate indices of sub-arrays to remove along the specified axis.
 
         .. versionchanged:: 1.19.0


Test patch: