summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
authorSarah Coffland <sadie.coffland@yahoo.com>2022-09-19 06:31:13 -0700
committerGitHub <noreply@github.com>2022-09-19 07:31:13 -0600
commit91d1c1ebd26d3269c45051d61bf24efb8db0678e (patch)
tree8567bbae899f6f66cd79a70270661d5ab909aa7f /numpy/core/defchararray.py
parentbecf417a55bbfc985a350cfb673b26e248af4542 (diff)
downloadnumpy-91d1c1ebd26d3269c45051d61bf24efb8db0678e.tar.gz
DOC: Add `isupper` examples (#22285)
* 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>
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r--numpy/core/defchararray.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index fe6694087..0da1a5639 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -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.
@@ -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')