8000 Sundry doc changes by tacaswell · Pull Request #5368 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Sundry doc changes #5368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 13, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC : do not abuse enum markup
 - {ndarray, bool} -> ndarray or bool
 - {int, array of ints} -> int or array of ints
 - {str, function} -> str or function
 - {sequnce, int} -> sequence or int
 - {array_like, poly1d} -> array_like or poly1d
 - {None, list of `m` scalars, scalar} -> list of `m` scalars or scalar
  • Loading branch information
tacaswell committed Dec 12, 2014
commit 93ee10ef98936e1fa5386836fd5b34b4b6e4bb68
8 changes: 4 additions & 4 deletions numpy/core/code_generators/ufunc_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ def add_newdoc(place, name, doc):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand Down Expand Up @@ -1632,7 +1632,7 @@ def add_newdoc(place, name, doc):

Returns
-------
y : {ndarray, bool}
y : ndarray or bool
For scalar input, the result is a new boolean with value True if
the input is NaN; otherwise the value is False.

Expand Down Expand Up @@ -2046,7 +2046,7 @@ def add_newdoc(place, name, doc):

Returns
-------
y : {ndarray, bool}
y : ndarray or bool
Boolean result with the same shape as `x1` and `x2` of the logical
AND operation on corresponding elements of `x1` and `x2`.

Expand Down Expand Up @@ -2112,7 +2112,7 @@ def add_newdoc(place, name, doc):

Returns
-------
y : {ndarray, bool}
y : ndarray or bool
Boolean result with the same shape as `x1` and `x2` of the logical
OR operation on elements of `x1` and `x2`.

Expand Down
12 changes: 6 additions & 6 deletions numpy/core/defchararray.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def equal(x1, x2):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand All @@ -133,7 +133,7 @@ def not_equal(x1, x2):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand All @@ -158,7 +158,7 @@ def greater_equal(x1, x2):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand All @@ -182,7 +182,7 @@ def less_equal(x1, x2):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand All @@ -206,7 +206,7 @@ def greater(x1, x2):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand All @@ -230,7 +230,7 @@ def less(x1, x2):

Returns
-------
out : {ndarray, bool}
out : ndarray or bool
Output array of bools, or a single bool if x1 and x2 are scalars.

See Also
Expand Down
2 changes: 1 addition & 1 deletion numpy/core/fromnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def repeat(a, repeats, axis=None):
----------
a : array_like
Input array.
repeats : {int, array of ints}
repeats : int or array of ints
The number of repetitions for each element. `repeats` is broadcasted
to fit the shape of the given axis.
axis : int, optional
Expand Down
10 changes: 5 additions & 5 deletions numpy/lib/arraypad.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ def pad(array, pad_width, mode=None, **kwargs):
((before, after),) yields same before and after pad for each axis.
(pad,) or int is a shortcut for before = after = pad width for all
axes.
mode : {str, function}
mode : str or function
One of the following string values or a user supplied function.

'constant'
Expand Down Expand Up @@ -1140,7 +1140,7 @@ def pad(array, pad_width, mode=None, **kwargs):
end values are used to pad the beginning.
<function>
Padding function, see Notes.
stat_length : {sequence, int}, optional
stat_length : sequence or int, optional
Used in 'maximum', 'mean', 'median', and 'minimum'. Number of
values at edge of each axis used to calculate the statistic value.

Expand All @@ -1154,7 +1154,7 @@ def pad(array, pad_width, mode=None, **kwargs):
length for all axes.

Default is ``None``, to use the entire axis.
constant_values : {sequence, int}, optional
constant_values : sequence or int, optional
Used in 'constant'. The values to set the padded values for each
axis.

Expand All @@ -1168,7 +1168,7 @@ def pad(array, pad_width, mode=None, **kwargs):
all axes.

Default is 0.
end_values : {sequence, int}, optional
end_values : sequence or int, optional
Used in 'linear_ramp'. The values used for the ending value of the
linear_ramp and that will form the edge of the padded array.

Expand All @@ -1182,7 +1182,7 @@ def pad(array, pad_width, mode=None, **kwargs):
all axes.

Default is 0.
reflect_type : str {'even', 'odd'}, optional
reflect_type : {'even', 'odd'}, optional
Used in 'reflect', and 'symmetric'. The 'even' style is the
default with an unaltered reflection around the edge value. For
the 'odd' style, the extented part of the array is created by
Expand Down
4 changes: 2 additions & 2 deletions numpy/lib/polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ def polyint(p, m=1, k=None):

Parameters
----------
p : {array_like, poly1d}
p : array_like or poly1d
Polynomial to differentiate.
A sequence is interpreted as polynomial coefficients, see `poly1d`.
m : int, optional
Order of the antiderivative. (Default: 1)
k : {None, list of `m` scalars, scalar}, optional
k : list of `m` scalars or scalar, optional
Integration constants. They are given in the order of integration:
those corresponding to highest-order terms come first.

Expand Down
0