summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/arrays.indexing.rst8
-rw-r--r--doc/source/reference/arrays.interface.rst10
-rw-r--r--doc/source/reference/c-api/array.rst8
-rw-r--r--doc/source/reference/c-api/config.rst15
-rw-r--r--doc/source/reference/c-api/dtype.rst12
-rw-r--r--doc/source/reference/c-api/iterator.rst2
-rw-r--r--doc/source/reference/c-api/types-and-structures.rst4
-rw-r--r--doc/source/reference/routines.set.rst5
8 files changed, 46 insertions, 18 deletions
diff --git a/doc/source/reference/arrays.indexing.rst b/doc/source/reference/arrays.indexing.rst
index 180a79dae..b2a9f1d21 100644
--- a/doc/source/reference/arrays.indexing.rst
+++ b/doc/source/reference/arrays.indexing.rst
@@ -34,7 +34,7 @@ Basic Slicing and Indexing
Basic slicing extends Python's basic concept of slicing to N
dimensions. Basic slicing occurs when *obj* is a :class:`slice` object
(constructed by ``start:stop:step`` notation inside of brackets), an
-integer, or a tuple of slice objects and integers. :const:`Ellipsis`
+integer, or a tuple of slice objects and integers. :py:data:`Ellipsis`
and :const:`newaxis` objects can be interspersed with these as
well.
@@ -43,7 +43,7 @@ well.
In order to remain backward compatible with a common usage in
Numeric, basic slicing is also initiated if the selection object is
any non-ndarray and non-tuple sequence (such as a :class:`list`) containing
- :class:`slice` objects, the :const:`Ellipsis` object, or the :const:`newaxis`
+ :class:`slice` objects, the :py:data:`Ellipsis` object, or the :const:`newaxis`
object, but not for integer arrays or other embedded sequences.
.. index::
@@ -129,7 +129,7 @@ concepts to remember include:
[5],
[6]]])
-- :const:`Ellipsis` expands to the number of ``:`` objects needed for the
+- :py:data:`Ellipsis` expands to the number of ``:`` objects needed for the
selection tuple to index all dimensions. In most cases, this means that
length of the expanded selection tuple is ``x.ndim``. There may only be a
single ellipsis present.
@@ -333,7 +333,7 @@ the subspace defined by the basic indexing (excluding integers) and the
subspace from the advanced indexing part. Two cases of index combination
need to be distinguished:
-* The advanced indexes are separated by a slice, :const:`Ellipsis` or :const:`newaxis`.
+* The advanced indexes are separated by a slice, :py:data:`Ellipsis` or :const:`newaxis`.
For example ``x[arr1, :, arr2]``.
* The advanced indexes are all next to each other.
For example ``x[..., arr1, arr2, :]`` but *not* ``x[arr1, :, 1]``
diff --git a/doc/source/reference/arrays.interface.rst b/doc/source/reference/arrays.interface.rst
index 73e4aef0c..49772a298 100644
--- a/doc/source/reference/arrays.interface.rst
+++ b/doc/source/reference/arrays.interface.rst
@@ -231,13 +231,15 @@ as::
The flags member may consist of 5 bits showing how the data should be
interpreted and one bit showing how the Interface should be
-interpreted. The data-bits are :const:`CONTIGUOUS` (0x1),
-:const:`FORTRAN` (0x2), :const:`ALIGNED` (0x100), :const:`NOTSWAPPED`
-(0x200), and :const:`WRITEABLE` (0x400). A final flag
-:const:`ARR_HAS_DESCR` (0x800) indicates whether or not this structure
+interpreted. The data-bits are :c:macro:`NPY_ARRAY_C_CONTIGUOUS` (0x1),
+:c:macro:`NPY_ARRAY_F_CONTIGUOUS` (0x2), :c:macro:`NPY_ARRAY_ALIGNED` (0x100),
+:c:macro:`NPY_ARRAY_NOTSWAPPED` (0x200), and :c:macro:`NPY_ARRAY_WRITEABLE` (0x400). A final flag
+:c:macro:`NPY_ARR_HAS_DESCR` (0x800) indicates whether or not this structure
has the arrdescr field. The field should not be accessed unless this
flag is present.
+ .. c:macro:: NPY_ARR_HAS_DESCR
+
.. admonition:: New since June 16, 2006:
In the past most implementations used the ``desc`` member of the ``PyCObject``
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index cfe4d2d51..9fe45d2de 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -3259,6 +3259,8 @@ Memory management
:c:data:`NPY_USE_PYMEM` is 0, if :c:data:`NPY_USE_PYMEM` is 1, then
the Python memory allocator is used.
+ .. c:macro:: NPY_USE_PYMEM
+
.. c:function:: int PyArray_ResolveWritebackIfCopy(PyArrayObject* obj)
If ``obj.flags`` has :c:data:`NPY_ARRAY_WRITEBACKIFCOPY` or (deprecated)
@@ -3289,9 +3291,13 @@ be accomplished using two groups of macros. Typically, if one macro in
a group is used in a code block, all of them must be used in the same
code block. Currently, :c:data:`NPY_ALLOW_THREADS` is defined to the
python-defined :c:data:`WITH_THREADS` constant unless the environment
-variable :c:data:`NPY_NOSMP` is set in which case
+variable ``NPY_NOSMP`` is set in which case
:c:data:`NPY_ALLOW_THREADS` is defined to be 0.
+.. c:macro:: NPY_ALLOW_THREADS
+
+.. c:macro:: WITH_THREADS
+
Group 1
"""""""
diff --git a/doc/source/reference/c-api/config.rst b/doc/source/reference/c-api/config.rst
index c3e2c98af..cec5b973a 100644
--- a/doc/source/reference/c-api/config.rst
+++ b/doc/source/reference/c-api/config.rst
@@ -52,12 +52,15 @@ information is available to the pre-processor.
.. c:macro:: NPY_SIZEOF_LONG_DOUBLE
- sizeof(longdouble) (A macro defines **NPY_SIZEOF_LONGDOUBLE** as well.)
+.. c:macro:: NPY_SIZEOF_LONGDOUBLE
+
+ sizeof(longdouble)
.. c:macro:: NPY_SIZEOF_PY_INTPTR_T
- Size of a pointer on this platform (sizeof(void \*)) (A macro defines
- NPY_SIZEOF_INTP as well.)
+.. c:macro:: NPY_SIZEOF_INTP
+
+ Size of a pointer on this platform (sizeof(void \*))
Platform information
@@ -102,6 +105,12 @@ Platform information
One of :c:data:`NPY_CPU_BIG`, :c:data:`NPY_CPU_LITTLE`,
or :c:data:`NPY_CPU_UNKNOWN_ENDIAN`.
+ .. c:macro:: NPY_CPU_BIG
+
+ .. c:macro:: NPY_CPU_LITTLE
+
+ .. c:macro:: NPY_CPU_UNKNOWN_ENDIAN
+
Compiler directives
-------------------
diff --git a/doc/source/reference/c-api/dtype.rst b/doc/source/reference/c-api/dtype.rst
index a04d85212..47b998302 100644
--- a/doc/source/reference/c-api/dtype.rst
+++ b/doc/source/reference/c-api/dtype.rst
@@ -414,6 +414,12 @@ Printf Formatting
For help in printing, the following strings are defined as the correct
format specifier in printf and related commands.
- :c:data:`NPY_LONGLONG_FMT`, :c:data:`NPY_ULONGLONG_FMT`,
- :c:data:`NPY_INTP_FMT`, :c:data:`NPY_UINTP_FMT`,
- :c:data:`NPY_LONGDOUBLE_FMT`
+.. c:macro:: NPY_LONGLONG_FMT
+
+.. c:macro:: NPY_ULONGLONG_FMT
+
+.. c:macro:: NPY_INTP_FMT
+
+.. c:macro:: NPY_UINTP_FMT
+
+.. c:macro:: NPY_LONGDOUBLE_FMT
diff --git a/doc/source/reference/c-api/iterator.rst b/doc/source/reference/c-api/iterator.rst
index 7eac8c367..ae96bb3fb 100644
--- a/doc/source/reference/c-api/iterator.rst
+++ b/doc/source/reference/c-api/iterator.rst
@@ -1264,7 +1264,7 @@ functions provide that information.
NPY_MAX_INTP is placed in the stride.
Once the iterator is prepared for iteration (after a reset if
- :c:data:`NPY_DELAY_BUFALLOC` was used), call this to get the strides
+ :c:data:`NPY_ITER_DELAY_BUFALLOC` was used), call this to get the strides
which may be used to select a fast inner loop function. For example,
if the stride is 0, that means the inner loop can always load its
value into a variable once, then use the variable throughout the loop,
diff --git a/doc/source/reference/c-api/types-and-structures.rst b/doc/source/reference/c-api/types-and-structures.rst
index ee57d4680..cc961df3a 100644
--- a/doc/source/reference/c-api/types-and-structures.rst
+++ b/doc/source/reference/c-api/types-and-structures.rst
@@ -315,7 +315,7 @@ PyArrayDescr_Type and PyArray_Descr
Bits set for the object data-type: ( :c:data:`NPY_LIST_PICKLE`
\| :c:data:`NPY_USE_GETITEM` \| :c:data:`NPY_ITEM_IS_POINTER` \|
- :c:data:`NPY_REFCOUNT` \| :c:data:`NPY_NEEDS_INIT` \|
+ :c:data:`NPY_ITEM_REFCOUNT` \| :c:data:`NPY_NEEDS_INIT` \|
:c:data:`NPY_NEEDS_PYAPI`).
.. c:function:: PyDataType_FLAGCHK(PyArray_Descr *dtype, int flags)
@@ -1395,7 +1395,7 @@ PyArrayInterface
as the *descr* key in :obj:`__array_interface__`). This can be
``NULL`` if *typekind* and *itemsize* provide enough
information. This field is also ignored unless
- :c:data:`ARR_HAS_DESCR` flag is on in *flags*.
+ :c:data:`NPY_ARR_HAS_DESCR` flag is on in *flags*.
Internally used structures
diff --git a/doc/source/reference/routines.set.rst b/doc/source/reference/routines.set.rst
index b12d3d5f5..149c33a8b 100644
--- a/doc/source/reference/routines.set.rst
+++ b/doc/source/reference/routines.set.rst
@@ -3,6 +3,11 @@ Set routines
.. currentmodule:: numpy
+.. autosummary::
+ :toctree: generated/
+
+ lib.arraysetops
+
Making proper sets
------------------
.. autosummary::