numpy.core.defchararray.find()

numpy.core.defchararray.find

numpy.core.defchararray.find(a, sub, start=0, end=None) [source]

For each element, return the lowest index in the string where substring sub is found.

Calls str.find element-wise.

For each element, return the lowest index in the string where substring sub is found, such that sub is contained in the range [start, end].

Parameters:

a : array_like of str or unicode

sub : str or unicode

start, end : int, optional

Optional arguments start and end are interpreted as in slice notation.

Returns:

out : ndarray or int

Output array of ints. Returns -1 if sub is not found.

See also

str.find

© 2008–2016 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.11.0/reference/generated/numpy.core.defchararray.find.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部