bundles / numpy latest / numpy / strings / rindex
function
numpy.strings:rindex
source: build-install/usr/lib/python3.14/site-packages/numpy/_core/strings.py :370
Signature
def rindex ( a , sub , start = 0 , end = None ) Summary
Like rfind, but raises ValueError when the substring sub is not found.
Parameters
a: array-like, with `np.bytes_` or `np.str_` dtypesub: array-like, with `np.bytes_` or `np.str_` dtypestart, end: array-like, with any integer dtype, optional
Returns
out: ndarrayOutput array of ints.
Examples
a = np.array(["Computer Science"]) np.strings.rindex(a, "Science", start=0, end=None)✓
See also
- rfind
- str.rindex
Aliases
-
numpy.char.rindex