numpy.char.index
- char.index(a, sub, start=0, end=None)[source]
-
Подобно
find, но вызывает исключениеValueErrorпри отсутствии подстроки.Вызывает
str.indexпоэлементно.- Параметры
-
- aarray_like of str or unicode
- substr or unicode
- start, endint, optional
- Возвращает
-
- outndarray
-
Массив выходных значений типа int. Возвращает -1, если
subне найдено.
© 2005–2022 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.21/reference/generated/numpy.char.index.html