Skip to content

Commit

Permalink
Merge pull request #18034 from Carreau/wrong-ref-arctan
Browse files Browse the repository at this point in the history
DOC: Fix a couple of reference to verbatim and vice versa
  • Loading branch information
rgommers committed Dec 19, 2020
2 parents 80354c5 + 09cbb74 commit b2f29f2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions numpy/core/code_generators/ufunc_docstrings.py
Expand Up @@ -185,15 +185,15 @@ def add_newdoc(place, name, doc):
Notes
-----
`arccos` is a multivalued function: for each `x` there are infinitely
many numbers `z` such that `cos(z) = x`. The convention is to return
many numbers `z` such that ``cos(z) = x``. The convention is to return
the angle `z` whose real part lies in `[0, pi]`.
For real-valued input data types, `arccos` always returns real output.
For each value that cannot be expressed as a real number or infinity,
it yields ``nan`` and sets the `invalid` floating point error flag.
For complex-valued input, `arccos` is a complex analytic function that
has branch cuts `[-inf, -1]` and `[1, inf]` and is continuous from
has branch cuts ``[-inf, -1]`` and `[1, inf]` and is continuous from
above on the former and from below on the latter.
The inverse `cos` is also known as `acos` or cos^-1.
Expand Down Expand Up @@ -245,7 +245,7 @@ def add_newdoc(place, name, doc):
-----
`arccosh` is a multivalued function: for each `x` there are infinitely
many numbers `z` such that `cosh(z) = x`. The convention is to return the
`z` whose imaginary part lies in `[-pi, pi]` and the real part in
`z` whose imaginary part lies in ``[-pi, pi]`` and the real part in
``[0, inf]``.
For real-valued input data types, `arccosh` always returns real output.
Expand Down Expand Up @@ -406,7 +406,7 @@ def add_newdoc(place, name, doc):
it yields ``nan`` and sets the `invalid` floating point error flag.
For complex-valued input, `arctan` is a complex analytic function that
has [`1j, infj`] and [`-1j, -infj`] as branch cuts, and is continuous
has [``1j, infj``] and [``-1j, -infj``] as branch cuts, and is continuous
from the left on the former and from the right on the latter.
The inverse tangent is also known as `atan` or tan^{-1}.
Expand Down Expand Up @@ -544,7 +544,7 @@ def add_newdoc(place, name, doc):
Notes
-----
`arctanh` is a multivalued function: for each `x` there are infinitely
many numbers `z` such that `tanh(z) = x`. The convention is to return
many numbers `z` such that ``tanh(z) = x``. The convention is to return
the `z` whose imaginary part lies in `[-pi/2, pi/2]`.
For real-valued input data types, `arctanh` always returns real output.
Expand Down Expand Up @@ -765,7 +765,7 @@ def add_newdoc(place, name, doc):
Return the ceiling of the input, element-wise.
The ceil of the scalar `x` is the smallest integer `i`, such that
`i >= x`. It is often denoted as :math:`\\lceil x \\rceil`.
``i >= x``. It is often denoted as :math:`\\lceil x \\rceil`.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions numpy/lib/polynomial.py
Expand Up @@ -708,8 +708,8 @@ def polyval(p, x):
``p[0]*x**(N-1) + p[1]*x**(N-2) + ... + p[N-2]*x + p[N-1]``
If `x` is a sequence, then `p(x)` is returned for each element of `x`.
If `x` is another polynomial then the composite polynomial `p(x(t))`
If `x` is a sequence, then ``p(x)`` is returned for each element of ``x``.
If `x` is another polynomial then the composite polynomial ``p(x(t))``
is returned.
Parameters
Expand Down
8 changes: 4 additions & 4 deletions numpy/lib/scimath.py
Expand Up @@ -572,10 +572,10 @@ def arctanh(x):
Compute the inverse hyperbolic tangent of `x`.
Return the "principal value" (for a description of this, see
`numpy.arctanh`) of `arctanh(x)`. For real `x` such that
`abs(x) < 1`, this is a real number. If `abs(x) > 1`, or if `x` is
`numpy.arctanh`) of ``arctanh(x)``. For real `x` such that
``abs(x) < 1``, this is a real number. If `abs(x) > 1`, or if `x` is
complex, the result is complex. Finally, `x = 1` returns``inf`` and
`x=-1` returns ``-inf``.
``x=-1`` returns ``-inf``.
Parameters
----------
Expand All @@ -597,7 +597,7 @@ def arctanh(x):
-----
For an arctanh() that returns ``NAN`` when real `x` is not in the
interval ``(-1,1)``, use `numpy.arctanh` (this latter, however, does
return +/-inf for `x = +/-1`).
return +/-inf for ``x = +/-1``).
Examples
--------
Expand Down
6 changes: 3 additions & 3 deletions numpy/polynomial/polynomial.py
Expand Up @@ -156,7 +156,7 @@ def polyfromroots(roots):
.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
where the `r_n` are the roots specified in `roots`. If a zero has
where the ``r_n`` are the roots specified in `roots`. If a zero has
multiplicity n, then it must appear in `roots` n times. For instance,
if 2 is a root of multiplicity three and 3 is a root of multiplicity 2,
then `roots` looks something like [2, 2, 2, 3, 3]. The roots can appear
Expand Down Expand Up @@ -192,11 +192,11 @@ def polyfromroots(roots):
Notes
-----
The coefficients are determined by multiplying together linear factors
of the form `(x - r_i)`, i.e.
of the form ``(x - r_i)``, i.e.
.. math:: p(x) = (x - r_0) (x - r_1) ... (x - r_n)
where ``n == len(roots) - 1``; note that this implies that `1` is always
where ``n == len(roots) - 1``; note that this implies that ``1`` is always
returned for :math:`a_n`.
Examples
Expand Down
2 changes: 1 addition & 1 deletion numpy/testing/_private/utils.py
Expand Up @@ -481,7 +481,7 @@ def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
instead of this function for more consistent floating point
comparisons.
The test verifies that the elements of ``actual`` and ``desired`` satisfy.
The test verifies that the elements of `actual` and `desired` satisfy.
``abs(desired-actual) < 1.5 * 10**(-decimal)``
Expand Down

0 comments on commit b2f29f2

Please sign in to comment.