From 4963402f922e3eea347d6165ec0fe7b386663704 Mon Sep 17 00:00:00 2001 From: Sabiha Tahsin Soha Date: Fri, 16 Sep 2022 19:57:09 +0000 Subject: Added an example for isupper() function --- numpy/core/defchararray.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'numpy/core/defchararray.py') diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index fdda44e56..eafa4c4da 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -942,6 +942,14 @@ def isupper(a): See Also -------- str.isupper + + Examples + -------- + >>> import numpy as np + >>> str="GHC" + >>> np.char.isupper(str) + array(True) + """ return _vec_string(a, bool_, 'isupper') -- cgit v1.2.1 From 327dcbfa1c20668fc4b8fec1b3ed4d5e58fe3bbe Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 18 Sep 2022 19:17:36 -0600 Subject: Update numpy/core/defchararray.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Brigitta Sipőcz --- numpy/core/defchararray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/defchararray.py') diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index eafa4c4da..0df7a6f0f 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -946,7 +946,7 @@ def isupper(a): Examples -------- >>> import numpy as np - >>> str="GHC" + >>> str = "GHC" >>> np.char.isupper(str) array(True) -- cgit v1.2.1 From f6f98a3b0fb0db243449462e76355b523a443088 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 18 Sep 2022 19:21:54 -0600 Subject: MAIN: `import numpy as np` is not needed --- numpy/core/defchararray.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'numpy/core/defchararray.py') diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index 0df7a6f0f..b7298d2cd 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -943,9 +943,8 @@ def isupper(a): -------- str.isupper - Examples + Examples -------- - >>> import numpy as np >>> str = "GHC" >>> np.char.isupper(str) array(True) -- cgit v1.2.1