Skip to content

Commit

Permalink
DOC: Add example for find
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunika-Bajracharya authored and melissawm committed Sep 16, 2022
1 parent 5f94eb8 commit 5ebf7f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions numpy/core/defchararray.py
Expand Up @@ -727,6 +727,12 @@ def find(a, sub, start=0, end=None):
--------
str.find
Examples
--------
>>> a = np.array(["NumPy is a Python library"])
>>> np.char.find(a, "Python", start=0, end=None)
array([11])
"""
return _vec_string(
a, int_, 'find', [sub, start] + _clean_args(end))
Expand Down

0 comments on commit 5ebf7f9

Please sign in to comment.