Skip to content

Commit

Permalink
Merge pull request numpy#25793 from ngoldbaum/ufunc-docstring-fixes
Browse files Browse the repository at this point in the history
MAINT: update docstrings of string ufuncs to mention StringDType
  • Loading branch information
charris authored Feb 8, 2024
2 parents ffcdcd1 + 4fb0699 commit 6db2209
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
32 changes: 16 additions & 16 deletions numpy/_core/code_generators/ufunc_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4319,7 +4319,7 @@ def add_newdoc(place, name, doc):
Parameters
----------
x : array_like, with ``bytes_`` or ``unicode_`` dtype
x : array_like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
$PARAMS
Returns
Expand Down Expand Up @@ -4360,7 +4360,7 @@ def add_newdoc(place, name, doc):
Parameters
----------
x : array_like, with ``bytes_`` or ``unicode_`` dtype
x : array_like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
$PARAMS
Returns
Expand Down Expand Up @@ -4388,7 +4388,7 @@ def add_newdoc(place, name, doc):
Parameters
----------
x : array_like, with ``bytes_`` or ``unicode_`` dtype
x : array_like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
$PARAMS
Returns
Expand Down Expand Up @@ -4426,7 +4426,7 @@ def add_newdoc(place, name, doc):
Parameters
----------
x : array_like, with ``bytes_`` or ``unicode_`` dtype
x : array_like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
$PARAMS
Returns
Expand All @@ -4452,7 +4452,7 @@ def add_newdoc(place, name, doc):
Parameters
----------
x : array_like, with ``unicode_`` dtype
x : array_like, with ``StringDType`` or ``str_`` dtype
$PARAMS
Returns
Expand Down Expand Up @@ -4483,7 +4483,7 @@ def add_newdoc(place, name, doc):
Parameters
----------
x : array_like, with ``unicode_`` dtype
x : array_like, with ``StringDType`` or ``str_`` dtype
$PARAMS
Returns
Expand Down Expand Up @@ -4511,9 +4511,9 @@ def add_newdoc(place, name, doc):
Parameters
----------
x1 : array_like, with ``bytes_`` or ``unicode_`` dtype
x1 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x2 : array_like, with ``bytes_`` or ``unicode_`` dtype
x2 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x3 : array_like, with ``int_`` dtype
Expand Down Expand Up @@ -4548,9 +4548,9 @@ def add_newdoc(place, name, doc):
Parameters
----------
x1 : array_like, with ``bytes_`` or ``unicode_`` dtype
x1 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x2 : array_like, with ``bytes_`` or ``unicode_`` dtype
x2 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x3 : array_like, with ``int_`` dtype
Expand Down Expand Up @@ -4578,9 +4578,9 @@ def add_newdoc(place, name, doc):
Parameters
----------
x1 : array_like, with ``bytes_`` or ``unicode_`` dtype
x1 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x2 : array_like, with ``bytes_`` or ``unicode_`` dtype
x2 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
The substring to search for.
x3 : array_like, with ``int_`` dtype
Expand Down Expand Up @@ -4630,9 +4630,9 @@ def add_newdoc(place, name, doc):
Parameters
----------
x1 : array_like, with ``bytes_`` or ``unicode_`` dtype
x1 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x2 : array_like, with ``bytes_`` or ``unicode_`` dtype
x2 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x3 : array_like, with ``int_`` dtype
Expand Down Expand Up @@ -4660,9 +4660,9 @@ def add_newdoc(place, name, doc):
Parameters
----------
x1 : array_like, with ``bytes_`` or ``unicode_`` dtype
x1 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x2 : array_like, with ``bytes_`` or ``unicode_`` dtype
x2 : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
x3 : array_like, with ``int_`` dtype
Expand Down
12 changes: 6 additions & 6 deletions numpy/_core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def lstrip(a, chars=None):
Parameters
----------
a : array_like, with ``bytes_`` or ``unicode_`` dtype
a : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
chars : scalar with the same dtype as ``a``, optional
The ``chars`` argument is a string specifying the set of
characters to be removed. If ``None``, the ``chars``
Expand All @@ -828,7 +828,7 @@ def lstrip(a, chars=None):
Returns
-------
out : ndarray
Output array of ``bytes_`` or ``unicode_`` dtype
Output array of ``bytes_`` or ``str_`` dtype
See Also
--------
Expand Down Expand Up @@ -862,7 +862,7 @@ def rstrip(a, chars=None):
Parameters
----------
a : array_like, with ``bytes_`` or ``unicode_`` dtype
a : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
chars : scalar with the same dtype as ``a``, optional
The ``chars`` argument is a string specifying the set of
characters to be removed. If ``None``, the ``chars``
Expand All @@ -873,7 +873,7 @@ def rstrip(a, chars=None):
Returns
-------
out : ndarray
Output array of ``bytes_`` or ``unicode_`` dtype
Output array of ``bytes_`` or ``str_`` dtype
See Also
--------
Expand Down Expand Up @@ -902,7 +902,7 @@ def strip(a, chars=None):
Parameters
----------
a : array_like, with ``bytes_`` or ``unicode_`` dtype
a : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype
chars : scalar with the same dtype as ``a``, optional
The ``chars`` argument is a string specifying the set of
characters to be removed. If ``None``, the ``chars``
Expand All @@ -913,7 +913,7 @@ def strip(a, chars=None):
Returns
-------
out : ndarray
Output array of ``bytes_`` or ``unicode_`` dtype
Output array of ``bytes_`` or ``str_`` dtype
See Also
--------
Expand Down

0 comments on commit 6db2209

Please sign in to comment.