Skip to content
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

DOC: Fix some document build errors about rst markups #25915

Merged
merged 2 commits into from
Mar 3, 2024
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
1 change: 1 addition & 0 deletions doc/release/upcoming_changes/25168.change.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
New ``copy`` keyword meaning for `numpy.array` and `numpy.asarray`
------------------------------------------------------------------
Now `numpy.array` and `numpy.asarray` support three values for ``copy`` parameter:

* ``None`` - A copy will only be made if it is necessary.
* ``True`` - Always make a copy.
* ``False`` - Never make a copy. If a copy is required a ``ValueError`` is raised.
Expand Down
1 change: 1 addition & 0 deletions doc/release/upcoming_changes/25866.c_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ New C-API import functions
We have now added ``PyArray_ImportNumPyAPI`` and ``PyUFunc_ImportUFuncAPI``
as static inline functions to import the NumPy C-API tables.
The new functions have two advantages over `import_array` and `import_ufunc`:

- They check whether the import was already performed and are light-weight
if not, allowing to add them judiciously (although this is not preferable
in most cases).
Expand Down
1 change: 1 addition & 0 deletions doc/source/numpy_2_0_migration_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ This include is also needed when vendoring ``npy_2_compat.h`` into your own
codebase to allow use of the new definitions when compiling with NumPy 1.x.

Functionality which previously did not require import includes:

* Functions to access dtype flags: ``PyDataType_FLAGCHK``,
``PyDataType_REFCHK``, and the related ``NPY_BEGIN_THREADS_DESCR``.
* ``PyArray_GETITEM`` and ``PyArray_SETITEM``.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/reference/c-api/array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3737,7 +3737,7 @@ the C-API is needed then some additional steps must be taken.
.. versionadded:: 2.0
This function is backported in the ``npy_2_compat.h`` header.

.. c:macro:: void import_array(void)
.. c:macro:: import_array(void)

This function must be called in the initialization section of a
module that will make use of the C-API. It imports the module
Expand Down
1 change: 1 addition & 0 deletions doc/source/reference/c-api/types-and-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ PyArray_ArrFuncs
----------------

.. c:function:: PyArray_ArrFuncs *PyDataType_GetArrFuncs(PyArray_Descr *dtype)

Fetch the legacy `PyArray_ArrFuncs` of the datatype (cannot fail).

.. versionadded:: NumPy 2.0
Expand Down
2 changes: 1 addition & 1 deletion doc/source/reference/c-api/ufunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ Importing the API
This function mainly checks for ``PyUFunc_API == NULL`` so it can be
manually backported if desired.

.. c:macro:: void import_ufunc(void)
.. c:macro:: import_ufunc(void)

These are the constants and functions for accessing the ufunc
C-API from extension modules in precisely the same way as the
Expand Down