From 4913a9be73e731f0604bd9950f71d2ad1bd62399 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 6 May 2022 15:10:45 -0500 Subject: [PATCH] Add NumPy to intersphinx references. (#10809) This PR adds `numpy` to the list of intersphinx references, which is needed to cross-reference numpy functions in cuDF's documentation. The Python intersphinx reference was updated to resolve a warning caused by a redirect. This also fixes a reference to `numpy.asarray`, which is a function (not a method). Authors: - Bradley Dice (https://github.com/bdice) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: https://github.com/rapidsai/cudf/pull/10809 --- docs/cudf/source/conf.py | 3 ++- python/cudf/cudf/core/frame.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/cudf/source/conf.py b/docs/cudf/source/conf.py index c8b30120924..0ffbdf47d54 100644 --- a/docs/cudf/source/conf.py +++ b/docs/cudf/source/conf.py @@ -197,8 +197,9 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - "python": ("https://docs.python.org/", None), + "python": ("https://docs.python.org/3", None), "cupy": ("https://docs.cupy.dev/en/stable/", None), + "numpy": ("https://numpy.org/doc/stable", None), } # Config numpydoc diff --git a/python/cudf/cudf/core/frame.py b/python/cudf/cudf/core/frame.py index d0e9e6d94c1..e75cf47bb7c 100644 --- a/python/cudf/cudf/core/frame.py +++ b/python/cudf/cudf/core/frame.py @@ -538,7 +538,7 @@ def to_cupy( Parameters ---------- dtype : str or numpy.dtype, optional - The dtype to pass to :meth:`numpy.asarray`. + The dtype to pass to :func:`numpy.asarray`. copy : bool, default False Whether to ensure that the returned value is not a view on another array. Note that ``copy=False`` does not *ensure* that @@ -573,7 +573,7 @@ def to_numpy( Parameters ---------- dtype : str or numpy.dtype, optional - The dtype to pass to :meth:`numpy.asarray`. + The dtype to pass to :func:`numpy.asarray`. copy : bool, default True Whether to ensure that the returned value is not a view on another array. This parameter must be ``True`` since cuDF must copy