Skip to content

Commit

Permalink
DOC: Add isupper examples (#22285)
Browse files Browse the repository at this point in the history
* added examples for isupper

* fixed examples for isupper

* Update numpy/core/defchararray.py

Co-authored-by: Rohit Goswami <r95g10@gmail.com>

* Update numpy/core/defchararray.py

Co-authored-by: Rohit Goswami <r95g10@gmail.com>

* Update numpy/core/defchararray.py

Co-authored-by: Rohit Goswami <r95g10@gmail.com>

* Update numpy/core/defchararray.py

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>

Co-authored-by: Rohit Goswami <r95g10@gmail.com>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
  • Loading branch information
5 people committed Sep 19, 2022
1 parent becf417 commit 91d1c1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions numpy/core/defchararray.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ def istitle(a):
@array_function_dispatch(_unary_op_dispatcher)
def isupper(a):
"""
Returns true for each element if all cased characters in the
Return true for each element if all cased characters in the
string are uppercase and there is at least one character, false
otherwise.
Expand All @@ -976,7 +976,10 @@ def isupper(a):
--------
>>> str = "GHC"
>>> np.char.isupper(str)
array(True)
array(True)
>>> a = np.array(["hello", "HELLO", "Hello"])
>>> np.char.isupper(a)
array([False, True, False])
"""
return _vec_string(a, bool_, 'isupper')
Expand Down

0 comments on commit 91d1c1e

Please sign in to comment.