diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-11-13 11:11:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 11:11:00 -0700 |
commit | d6538309351f3138ed1d0c46eb72bc5f68134373 (patch) | |
tree | 6e02ae43e57e5b547a9b423cb0d44b757b6adf93 /numpy/core | |
parent | 0a36e5f8cbf56f4600c27e4ba0dc1a3d74d83e32 (diff) | |
download | numpy-d6538309351f3138ed1d0c46eb72bc5f68134373.tar.gz |
MAINT: Fix spaces, formatting, and improve explanations.
[ci skip]
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/_add_newdocs.py | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index 861812a89..bb7009801 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -1076,18 +1076,17 @@ add_newdoc('numpy.core.multiarray', 'compare_chararrays', """ compare_chararrays(a, b, cmp_op, rstrip) - Preforms element-wise comparison of two string-arrays using the specified comparison operator. + Performs element-wise comparison of two string arrays using the + comparison operator specified by `cmp_op`. Parameters ---------- - a : array_like - First argument. - b : array_like - Second argument. - cmp_op : "<" or "<=" or "==" or ">=" or ">" or "!=" - Third argument. + a, b : array_like + Arrays to be compared. + cmp_op : {"<", "<=", "==", ">=", ">", "!="} + Type of comparison. rstrip : Boolean - if True, the spaces at the end of Strings are removed before the comparison + If True, the spaces at the end of Strings are removed before the comparison. Returns ------- @@ -1097,17 +1096,16 @@ add_newdoc('numpy.core.multiarray', 'compare_chararrays', Raises ------ ValueError - If cmp_op is neither "<" nor "<=" nor "==" nor ">=" nor ">" nor "!=" - + If `cmp_op` is not valid. TypeError - If at least one of the arrays a or b is a non-string array + If at least one of `a` or `b` is a non-string array Examples -------- >>> a = np.array(["a", "b", "cde"]) >>> b = np.array(["a", "a", "dec"]) - >>> np.compare_chararrays(a,b,">",True) - array([False,True,False]) + >>> np.compare_chararrays(a, b, ">", True) + array([False, True, False]) """) |