Skip to content

Commit fc84300

Browse files
DOC: Add examples for ufunc np.strings.isalpha()
1 parent 39df35a commit fc84300

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

numpy/_core/code_generators/ufunc_docstrings.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4482,6 +4482,17 @@ def add_newdoc(place, name, doc):
44824482
--------
44834483
str.isalpha
44844484
4485+
Examples
4486+
--------
4487+
>>> import numpy as np
4488+
>>> a = np.array(['a', 'b', '0'])
4489+
>>> np.strings.isalpha(a)
4490+
array([ True, True, False])
4491+
4492+
>>> a = np.array([['a', 'b', '0'], ['c', '1', '2']])
4493+
>>> np.strings.isalpha(a)
4494+
array([[ True, True, False], [ True, False, False]])
4495+
44854496
""")
44864497

44874498
add_newdoc('numpy._core.umath', 'isdigit',

0 commit comments

Comments
 (0)