Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ help:
@echo " clean to remove generated doc files and start fresh"
@echo " docenv make a virtual environment in which to build docs"
@echo " html to make standalone HTML files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " htmlhelp to make HTML files and an HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/code_generators/ufunc_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ def add_newdoc(place, name, doc):
returned. In a two's-complement system, this operation effectively flips
all the bits, resulting in a representation that corresponds to the
negative of the input plus one. This is the most common method of
representing signed integers on computers [1]_. A N-bit two's-complement
representing signed integers on computers [1]_. An N-bit two's-complement
system can represent every integer in the range :math:`-2^{N-1}` to
:math:`+2^{N-1}-1`.
Expand Down
6 changes: 3 additions & 3 deletions numpy/_core/fromnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ def argsort(a, axis=-1, kind=None, order=None, *, stable=None):
array([[0, 3],
[2, 2]])

Indices of the sorted elements of a N-dimensional array:
Indices of the sorted elements of an N-dimensional array:

>>> ind = np.unravel_index(np.argsort(x, axis=None), x.shape)
>>> ind
Expand Down Expand Up @@ -1275,7 +1275,7 @@ def argmax(a, axis=None, out=None, *, keepdims=np._NoValue):
>>> np.argmax(a, axis=1)
array([2, 2])

Indexes of the maximal elements of a N-dimensional array:
Indexes of the maximal elements of an N-dimensional array:

>>> a.flat[np.argmax(a)]
15
Expand Down Expand Up @@ -1375,7 +1375,7 @@ def argmin(a, axis=None, out=None, *, keepdims=np._NoValue):
>>> np.argmin(a, axis=1)
array([0, 0])

Indices of the minimum elements of a N-dimensional array:
Indices of the minimum elements of an N-dimensional array:

>>> a.flat[np.argmin(a)]
10
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,7 @@ def binary_repr(num, width=None):

In a two's-complement system negative numbers are represented by the two's
complement of the absolute value. This is the most common method of
representing signed integers on computers [1]_. A N-bit two's-complement
representing signed integers on computers [1]_. An N-bit two's-complement
system can represent every integer in the range
:math:`-2^{N-1}` to :math:`+2^{N-1}-1`.

Expand Down
16 changes: 8 additions & 8 deletions numpy/lib/_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def open(path, mode='r', destpath=os.curdir, encoding=None, newline=None):
"""
Open `path` with `mode` and return the file object.

If ``path`` is an URL, it will be downloaded, stored in the
If ``path`` is a URL, it will be downloaded, stored in the
`DataSource` `destpath` directory and opened from there.

Parameters
Expand Down Expand Up @@ -340,7 +340,7 @@ def _cache(self, path):
def _findfile(self, path):
"""Searches for ``path`` and returns full path if found.

If path is an URL, _findfile will cache a local copy and return the
If path is a URL, _findfile will cache a local copy and return the
path to the cached file. If path is a local file, _findfile will
return a path to that local file.

Expand Down Expand Up @@ -372,7 +372,7 @@ def abspath(self, path):
"""
Return absolute path of file in the DataSource directory.

If `path` is an URL, then `abspath` will return either the location
If `path` is a URL, then `abspath` will return either the location
the file exists locally or the location it would exist when opened
using the `open` method.

Expand Down Expand Up @@ -448,7 +448,7 @@ def exists(self, path):

Notes
-----
When `path` is an URL, `exists` will return True if it's either
When `path` is a URL, `exists` will return True if it's either
stored locally in the `DataSource` directory, or is a valid remote
URL. `DataSource` does not discriminate between the two, the file
is accessible if it exists in either location.
Expand Down Expand Up @@ -484,7 +484,7 @@ def open(self, path, mode='r', encoding=None, newline=None):
"""
Open and return file-like object.

If `path` is an URL, it will be downloaded, stored in the
If `path` is a URL, it will be downloaded, stored in the
`DataSource` directory and opened from there.

Parameters
Expand Down Expand Up @@ -594,7 +594,7 @@ def abspath(self, path):
"""
Return absolute path of file in the Repository directory.

If `path` is an URL, then `abspath` will return either the location
If `path` is a URL, then `abspath` will return either the location
the file exists locally or the location it would exist when opened
using the `open` method.

Expand Down Expand Up @@ -639,7 +639,7 @@ def exists(self, path):

Notes
-----
When `path` is an URL, `exists` will return True if it's either
When `path` is a URL, `exists` will return True if it's either
stored locally in the `DataSource` directory, or is a valid remote
URL. `DataSource` does not discriminate between the two, the file
is accessible if it exists in either location.
Expand All @@ -651,7 +651,7 @@ def open(self, path, mode='r', encoding=None, newline=None):
"""
Open and return file-like object prepending Repository base URL.

If `path` is an URL, it will be downloaded, stored in the
If `path` is a URL, it will be downloaded, stored in the
DataSource directory and opened from there.

Parameters
Expand Down
11 changes: 5 additions & 6 deletions numpy/lib/_function_base_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3073,15 +3073,14 @@ def blackman(M):
"removing the foot", i.e. smoothing discontinuities at the beginning
and end of the sampled signal) or tapering function. It is known as a
"near optimal" tapering function, almost as good (by some measures)
as the kaiser window.
as the Kaiser window.

References
----------
Blackman, R.B. and Tukey, J.W., (1958) The measurement of power spectra,
Dover Publications, New York.

Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing.
Upper Saddle River, NJ: Prentice-Hall, 1999, pp. 468-471.
.. [1] Blackman, R.B. and Tukey, J.W., (1958)
The measurement of power spectra, Dover Publications, New York.
.. [2] Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing.
Upper Saddle River, NJ: Prentice-Hall, 1999, pp. 468-471.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion numpy/lib/tests/test__datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_RemoveHTTPFile(self, tmp_path):

def test_CachedHTTPFile(self, tmp_path):
localfile = valid_httpurl()
# Create a locally cached temp file with an URL based
# Create a locally cached temp file with a URL based
# directory structure. This is similar to what Repository.open
# would do.
repos = datasource.Repository(valid_baseurl(), tmp_path)
Expand Down
2 changes: 1 addition & 1 deletion numpy/ma/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def getmaskarray(arr: _ScalarLike_co) -> _MaskArray[tuple[()]]: ...
def getmaskarray[ShapeT: _Shape](arr: np.ndarray[ShapeT, Any]) -> _MaskArray[ShapeT]: ...

# It's sufficient for `m` to have dtype with type: `type[np.bool_]`,
# which isn't necessarily a ndarray. Please open an issue if this causes issues.
# which isn't necessarily an ndarray. Please open an issue if this causes issues.
def is_mask(m: object) -> TypeIs[NDArray[bool_]]: ...

#
Expand Down
2 changes: 1 addition & 1 deletion numpy/polynomial/chebyshev.py
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ def chebvander2d(x, y, deg):
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order
.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
.. math:: c_{00}, c_{01}, c_{02}, ... , c_{10}, c_{11}, c_{12}, ...
and ``np.dot(V, c.flat)`` and ``chebval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
Expand Down
2 changes: 1 addition & 1 deletion numpy/polynomial/hermite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ def hermvander2d(x, y, deg):
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order
.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
.. math:: c_{00}, c_{01}, c_{02}, ... , c_{10}, c_{11}, c_{12}, ...
and ``np.dot(V, c.flat)`` and ``hermval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
Expand Down
2 changes: 1 addition & 1 deletion numpy/polynomial/hermite_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ def hermevander2d(x, y, deg):
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order
.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
.. math:: c_{00}, c_{01}, c_{02}, ... , c_{10}, c_{11}, c_{12}, ...
and ``np.dot(V, c.flat)`` and ``hermeval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
Expand Down
2 changes: 1 addition & 1 deletion numpy/polynomial/legendre.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ def legcompanion(c):
"""Return the scaled companion matrix of c.
The basis polynomials are scaled so that the companion matrix is
symmetric when `c` is an Legendre basis polynomial. This provides
symmetric when `c` is a Legendre basis polynomial. This provides
better eigenvalue estimates than the unscaled case and for basis
polynomials the eigenvalues are guaranteed to be real if
`numpy.linalg.eigvalsh` is used to obtain them.
Expand Down
2 changes: 1 addition & 1 deletion numpy/polynomial/polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ def polyvander2d(x, y, deg):
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order
.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
.. math:: c_{00}, c_{01}, c_{02}, ... , c_{10}, c_{11}, c_{12}, ...
and ``np.dot(V, c.flat)`` and ``polyval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
Expand Down
Loading