8000 DOC: Add examples to ``np.char`` by luxedo · Pull Request #26642 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: Add examples to np.char #26642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Oct 14, 2024
Next Next commit
DOC: add char.isalpha example
  • Loading branch information
luxedo committed Jun 8, 2024
commit e92e3887ed1277f63e4f026c0dbb8b3a4541299b
11 changes: 11 additions & 0 deletions numpy/_core/code_generators/ufunc_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4373,6 +4373,17 @@ def add_newdoc(place, name, doc):
--------
str.isalpha

Examples
--------
>>> np.char.isalpha(["yes", "alpha"])
array([ True, True])
>>> np.char.isalpha(["not", "\x00", "alpha"])
array([ True, False, True])
>>> np.char.isalpha(["n0t", "4lpha"])
array([ False, False])
>>> np.char.isalpha(bytes([0x61, 0x6c, 0x70, 0x68, 0x61]))
np.True_

""")

add_newdoc('numpy._core.umath', 'isdigit',
Expand Down
0