Skip to content

Commit 6be51cb

Browse files
DOC: use new numpy doc url (#34091)
1 parent a7fb88f commit 6be51cb

File tree

13 files changed

+17
-19
lines changed

13 files changed

+17
-19
lines changed

doc/source/development/contributing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ version control to allow many people to work together on the project.
110110
Some great resources for learning Git:
111111

112112
* the `GitHub help pages <https://help.github.com/>`_.
113-
* the `NumPy's documentation <https://docs.scipy.org/doc/numpy/dev/index.html>`_.
113+
* the `NumPy's documentation <https://numpy.org/doc/stable/dev/index.html>`_.
114114
* Matthew Brett's `Pydagogue <https://matthew-brett.github.com/pydagogue/>`_.
115115

116116
Getting started with Git
@@ -974,7 +974,7 @@ it is worth getting in the habit of writing tests ahead of time so this is never
974974
Like many packages, pandas uses `pytest
975975
<https://docs.pytest.org/en/latest/>`_ and the convenient
976976
extensions in `numpy.testing
977-
<https://docs.scipy.org/doc/numpy/reference/routines.testing.html>`_.
977+
<https://numpy.org/doc/stable/reference/routines.testing.html>`_.
978978

979979
.. note::
980980

doc/source/development/extending.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ and re-boxes it if necessary.
219219

220220
If applicable, we highly recommend that you implement ``__array_ufunc__`` in your
221221
extension array to avoid coercion to an ndarray. See
222-
`the numpy documentation <https://docs.scipy.org/doc/numpy/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html>`__
222+
`the numpy documentation <https://numpy.org/doc/stable/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html>`__
223223
for an example.
224224

225225
As part of your implementation, we require that you defer to pandas when a pandas

doc/source/user_guide/basics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,7 @@ For example, to select ``bool`` columns:
23862386
df.select_dtypes(include=[bool])
23872387
23882388
You can also pass the name of a dtype in the `NumPy dtype hierarchy
2389-
<https://docs.scipy.org/doc/numpy/reference/arrays.scalars.html>`__:
2389+
<https://numpy.org/doc/stable/reference/arrays.scalars.html>`__:
23902390

23912391
.. ipython:: python
23922392

doc/source/user_guide/dsintro.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ pandas object. Like Series, DataFrame accepts many different kinds of input:
273273
* Dict of 1D ndarrays, lists, dicts, or Series
274274
* 2-D numpy.ndarray
275275
* `Structured or record
276-
<https://docs.scipy.org/doc/numpy/user/basics.rec.html>`__ ndarray
276+
<https://numpy.org/doc/stable/user/basics.rec.html>`__ ndarray
277277
* A ``Series``
278278
* Another ``DataFrame``
279279

@@ -632,7 +632,7 @@ union of the column and row labels.
632632
633633
When doing an operation between DataFrame and Series, the default behavior is
634634
to align the Series **index** on the DataFrame **columns**, thus `broadcasting
635-
<https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html>`__
635+
<https://numpy.org/doc/stable/user/basics.broadcasting.html>`__
636636
row-wise. For example:
637637

638638
.. ipython:: python
@@ -718,7 +718,7 @@ indexing semantics and data model are quite different in places from an n-dimens
718718
array.
719719

720720
:class:`Series` implements ``__array_ufunc__``, which allows it to work with NumPy's
721-
`universal functions <https://docs.scipy.org/doc/numpy/reference/ufuncs.html>`_.
721+
`universal functions <https://numpy.org/doc/stable/reference/ufuncs.html>`_.
722722

723723
The ufunc is applied to the underlying array in a Series.
724724

doc/source/user_guide/gotchas.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,5 +339,5 @@ constructors using something similar to the following:
339339
s = pd.Series(newx)
340340
341341
See `the NumPy documentation on byte order
342-
<https://docs.scipy.org/doc/numpy/user/basics.byteswapping.html>`__ for more
342+
<https://numpy.org/doc/stable/user/basics.byteswapping.html>`__ for more
343343
details.

doc/source/user_guide/sparse.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ See :ref:`api.frame.sparse` for more.
139139
Sparse calculation
140140
------------------
141141

142-
You can apply NumPy `ufuncs <https://docs.scipy.org/doc/numpy/reference/ufuncs.html>`_
142+
You can apply NumPy `ufuncs <https://numpy.org/doc/stable/reference/ufuncs.html>`_
143143
to ``SparseArray`` and get a ``SparseArray`` as a result.
144144

145145
.. ipython:: python

doc/source/whatsnew/v0.19.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ Fine-grained NumPy errstate
390390

391391
Previous versions of pandas would permanently silence numpy's ufunc error handling when ``pandas`` was imported. Pandas did this in order to silence the warnings that would arise from using numpy ufuncs on missing data, which are usually represented as ``NaN`` s. Unfortunately, this silenced legitimate warnings arising in non-pandas code in the application. Starting with 0.19.0, pandas will use the ``numpy.errstate`` context manager to silence these warnings in a more fine-grained manner, only around where these operations are actually used in the pandas code base. (:issue:`13109`, :issue:`13145`)
392392

393-
After upgrading pandas, you may see *new* ``RuntimeWarnings`` being issued from your code. These are likely legitimate, and the underlying cause likely existed in the code when using previous versions of pandas that simply silenced the warning. Use `numpy.errstate <http://docs.scipy.org/doc/numpy/reference/generated/numpy.errstate.html>`__ around the source of the ``RuntimeWarning`` to control how these conditions are handled.
393+
After upgrading pandas, you may see *new* ``RuntimeWarnings`` being issued from your code. These are likely legitimate, and the underlying cause likely existed in the code when using previous versions of pandas that simply silenced the warning. Use `numpy.errstate <https://numpy.org/doc/stable/reference/generated/numpy.errstate.html>`__ around the source of the ``RuntimeWarning`` to control how these conditions are handled.
394394

395395
.. _whatsnew_0190.get_dummies_dtypes:
396396

pandas/_libs/testing.pyx

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ cdef bint is_dictlike(obj):
4040

4141
cdef bint decimal_almost_equal(double desired, double actual, int decimal):
4242
# Code from
43-
# http://docs.scipy.org/doc/numpy/reference/generated
44-
# /numpy.testing.assert_almost_equal.html
43+
# https://numpy.org/doc/stable/reference/generated/numpy.testing.assert_almost_equal.html
4544
return abs(desired - actual) < (0.5 * 10.0 ** -decimal)
4645

4746

pandas/core/arrays/numpy_.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ def __array__(self, dtype=None) -> np.ndarray:
214214

215215
def __array_ufunc__(self, ufunc, method: str, *inputs, **kwargs):
216216
# Lightly modified version of
217-
# https://docs.scipy.org/doc/numpy-1.15.1/reference/generated/\
218-
# numpy.lib.mixins.NDArrayOperatorsMixin.html
217+
# https://numpy.org/doc/stable/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html
219218
# The primary modification is not boxing scalar return values
220219
# in PandasArray, since pandas' ExtensionArrays are 1-d.
221220
out = kwargs.get("out", ())

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3355,7 +3355,7 @@ def select_dtypes(self, include=None, exclude=None) -> "DataFrame":
33553355
* To select strings you must use the ``object`` dtype, but note that
33563356
this will return *all* object dtype columns
33573357
* See the `numpy dtype hierarchy
3358-
<https://docs.scipy.org/doc/numpy/reference/arrays.scalars.html>`__
3358+
<https://numpy.org/doc/stable/reference/arrays.scalars.html>`__
33593359
* To select datetimes, use ``np.datetime64``, ``'datetime'`` or
33603360
``'datetime64'``
33613361
* To select timedeltas, use ``np.timedelta64``, ``'timedelta'`` or

pandas/tests/indexes/multi/test_analytics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def test_map_dictlike(idx, mapper):
232232
)
233233
def test_numpy_ufuncs(idx, func):
234234
# test ufuncs of numpy. see:
235-
# https://docs.scipy.org/doc/numpy/reference/ufuncs.html
235+
# https://numpy.org/doc/stable/reference/ufuncs.html
236236

237237
if _np_version_under1p17:
238238
expected_exception = AttributeError

pandas/tests/indexes/test_numpy_compat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
)
4747
def test_numpy_ufuncs_basic(indices, func):
4848
# test ufuncs of numpy, see:
49-
# https://docs.scipy.org/doc/numpy/reference/ufuncs.html
49+
# https://numpy.org/doc/stable/reference/ufuncs.html
5050

5151
idx = indices
5252
if isinstance(idx, DatetimeIndexOpsMixin):
@@ -77,7 +77,7 @@ def test_numpy_ufuncs_basic(indices, func):
7777
)
7878
def test_numpy_ufuncs_other(indices, func):
7979
# test ufuncs of numpy, see:
80-
# https://docs.scipy.org/doc/numpy/reference/ufuncs.html
80+
# https://numpy.org/doc/stable/reference/ufuncs.html
8181

8282
idx = indices
8383
if isinstance(idx, (DatetimeIndex, TimedeltaIndex)):

web/pandas/community/blog/extension-arrays.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ partners][partners] involved in the pandas community.
207207
[IntegerArray]: http://pandas.pydata.org/pandas-docs/version/0.24/reference/api/pandas.arrays.IntegerArray.html
208208
[fletcher]: https://github.com/xhochy/fletcher
209209
[arrow]: https://arrow.apache.org
210-
[ufunc]: https://docs.scipy.org/doc/numpy-1.13.0/neps/ufunc-overrides.html
210+
[ufunc]: https://numpy.org/neps/nep-0013-ufunc-overrides.html
211211
[nep18]: https://www.numpy.org/neps/nep-0018-array-function-protocol.html
212212
[ml]: https://mail.python.org/mailman/listinfo/pandas-dev
213213
[twitter]: https://twitter.com/pandas_dev

0 commit comments

Comments
 (0)