diff options
author | Yunika Bajracharya <076bct095.yunika@pcampus.edu.np> | 2022-09-16 18:54:34 +0000 |
---|---|---|
committer | melissawm <melissawm.github@gmail.com> | 2022-09-16 16:56:35 -0300 |
commit | 5ebf7f97c045b1356959111014859400c45a35b3 (patch) | |
tree | 527b3287057f8142f4acaec86e81ef7a0f802289 /numpy/core/defchararray.py | |
parent | 5f94eb858f3e181eccfda2c26db9f0b9167a8156 (diff) | |
download | numpy-5ebf7f97c045b1356959111014859400c45a35b3.tar.gz |
DOC: Add example for find
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r-- | numpy/core/defchararray.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index fdda44e56..620cc0a92 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -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)) |