summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/conf.py2
-rw-r--r--doc/source/dev/development_environment.rst4
-rw-r--r--doc/source/reference/alignment.rst24
-rw-r--r--doc/source/reference/c-api.array.rst12
-rw-r--r--doc/source/reference/c-api.coremath.rst5
-rw-r--r--doc/source/reference/maskedarray.generic.rst2
-rw-r--r--doc/source/reference/routines.ctypeslib.rst2
-rw-r--r--doc/source/reference/routines.linalg.rst2
-rw-r--r--doc/source/reference/routines.matlib.rst2
-rw-r--r--doc/source/reference/routines.polynomials.package.rst2
-rw-r--r--doc/source/reference/routines.polynomials.polynomial.rst2
-rw-r--r--doc/source/reference/routines.random.rst2
-rw-r--r--doc/source/reference/routines.testing.rst2
-rw-r--r--doc/source/user/numpy-for-matlab-users.rst2
14 files changed, 44 insertions, 21 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 455e9748b..072a3b44e 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -39,7 +39,7 @@ source_suffix = '.rst'
# General substitutions.
project = 'NumPy'
-copyright = '2008-2018, The SciPy community'
+copyright = '2008-2019, The SciPy community'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
diff --git a/doc/source/dev/development_environment.rst b/doc/source/dev/development_environment.rst
index aa4326f63..f9b438bfd 100644
--- a/doc/source/dev/development_environment.rst
+++ b/doc/source/dev/development_environment.rst
@@ -8,7 +8,9 @@ Recommended development setup
Since NumPy contains parts written in C and Cython that need to be
compiled before use, make sure you have the necessary compilers and Python
-development headers installed - see :ref:`building-from-source`.
+development headers installed - see :ref:`building-from-source`. Building
+NumPy as of version ``1.17`` requires a C99 compliant compiler. For
+some older compilers this may require ``export CFLAGS='-std=c99'``.
Having compiled code also means that importing NumPy from the development
sources needs some additional steps, which are explained below. For the rest
diff --git a/doc/source/reference/alignment.rst b/doc/source/reference/alignment.rst
index c749972b4..ebc8f353c 100644
--- a/doc/source/reference/alignment.rst
+++ b/doc/source/reference/alignment.rst
@@ -34,6 +34,14 @@ datatype is implemented as ``struct { float real, imag; }``. This has "true"
alignment of 4 and "uint" alignment of 8 (equal to the true alignment of
``uint64``).
+Some cases where uint and true alignment are different (default gcc linux):
+ arch type true-aln uint-aln
+ ---- ---- -------- --------
+ x86_64 complex64 4 8
+ x86_64 float128 16 8
+ x86 float96 4 -
+
+
Variables in Numpy which control and describe alignment
-------------------------------------------------------
@@ -82,17 +90,15 @@ Here is how the variables above are used:
appropriate N. Otherwise numpy copies by doing ``memcpy(dst, src, N)``.
5. Nditer code: Since this often calls the strided copy code, it must
check for "uint alignment".
- 6. Cast code: if the array is "uint aligned" this will essentially do
- ``*dst = CASTFUNC(*src)``. If not, it does
+ 6. Cast code: This checks for "true" alignment, as it does
+ ``*dst = CASTFUNC(*src)`` if aligned. Otherwise, it does
``memmove(srcval, src); dstval = CASTFUNC(srcval); memmove(dst, dstval)``
where dstval/srcval are aligned.
-Note that in principle, only "true alignment" is required for casting code.
-However, because the casting code and copy code are deeply intertwined they
-both use "uint" alignment. This should be safe assuming uint alignment is
-always larger than true alignment, though it can cause unnecessary buffering if
-an array is "true aligned" but not "uint aligned". If there is ever a big
-rewrite of this code it would be good to allow them to use different
-alignments.
+Note that the strided-copy and strided-cast code are deeply intertwined and so
+any arrays being processed by them must be both uint and true aligned, even
+though the copy-code only needs uint alignment and the cast code only true
+alignment. If there is ever a big rewrite of this code it would be good to
+allow them to use different alignments.
diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst
index 76aa680ae..7c298e118 100644
--- a/doc/source/reference/c-api.array.rst
+++ b/doc/source/reference/c-api.array.rst
@@ -307,10 +307,10 @@ From scratch
.. c:function:: PyObject* PyArray_SimpleNewFromDescr( \
int nd, npy_intp* dims, PyArray_Descr* descr)
- This function steals a reference to *descr* if it is not NULL.
+ This function steals a reference to *descr*.
- Create a new array with the provided data-type descriptor, *descr*
- , of the shape determined by *nd* and *dims*.
+ Create a new array with the provided data-type descriptor, *descr*,
+ of the shape determined by *nd* and *dims*.
.. c:function:: PyArray_FILLWBYTE(PyObject* obj, int val)
@@ -1904,10 +1904,10 @@ Item selection and manipulation
all values are clipped to the region [0, len(*op*) ).
-.. c:function:: PyObject* PyArray_Sort(PyArrayObject* self, int axis)
+.. c:function:: PyObject* PyArray_Sort(PyArrayObject* self, int axis, NPY_SORTKIND kind)
- Equivalent to :meth:`ndarray.sort<numpy.ndarray.sort>` (*self*, *axis*). Return an array with
- the items of *self* sorted along *axis*.
+ Equivalent to :meth:`ndarray.sort<numpy.ndarray.sort>` (*self*, *axis*, *kind*). Return an array with
+ the items of *self* sorted along *axis*.Array is sorted according to *kind* which is an integer/enum pointing to the type of sorting algorithms used.
.. c:function:: PyObject* PyArray_ArgSort(PyArrayObject* self, int axis)
diff --git a/doc/source/reference/c-api.coremath.rst b/doc/source/reference/c-api.coremath.rst
index 691f73287..bf08d4804 100644
--- a/doc/source/reference/c-api.coremath.rst
+++ b/doc/source/reference/c-api.coremath.rst
@@ -80,8 +80,9 @@ Floating point classification
Useful math constants
~~~~~~~~~~~~~~~~~~~~~
-The following math constants are available in npy_math.h. Single and extended
-precision are also available by adding the F and L suffixes respectively.
+The following math constants are available in ``npy_math.h``. Single
+and extended precision are also available by adding the ``f`` and
+``l`` suffixes respectively.
.. c:var:: NPY_E
diff --git a/doc/source/reference/maskedarray.generic.rst b/doc/source/reference/maskedarray.generic.rst
index 07ad6c292..7375d60fb 100644
--- a/doc/source/reference/maskedarray.generic.rst
+++ b/doc/source/reference/maskedarray.generic.rst
@@ -2,7 +2,7 @@
.. _maskedarray.generic:
-
+.. module:: numpy.ma
The :mod:`numpy.ma` module
==========================
diff --git a/doc/source/reference/routines.ctypeslib.rst b/doc/source/reference/routines.ctypeslib.rst
index b04713b61..71b944a63 100644
--- a/doc/source/reference/routines.ctypeslib.rst
+++ b/doc/source/reference/routines.ctypeslib.rst
@@ -1,3 +1,5 @@
+.. module:: numpy.ctypeslib
+
***********************************************************
C-Types Foreign Function Interface (:mod:`numpy.ctypeslib`)
***********************************************************
diff --git a/doc/source/reference/routines.linalg.rst b/doc/source/reference/routines.linalg.rst
index 0520df413..c6bffc874 100644
--- a/doc/source/reference/routines.linalg.rst
+++ b/doc/source/reference/routines.linalg.rst
@@ -1,5 +1,7 @@
.. _routines.linalg:
+.. module:: numpy.linalg
+
Linear algebra (:mod:`numpy.linalg`)
************************************
diff --git a/doc/source/reference/routines.matlib.rst b/doc/source/reference/routines.matlib.rst
index a35eaec78..c7f675425 100644
--- a/doc/source/reference/routines.matlib.rst
+++ b/doc/source/reference/routines.matlib.rst
@@ -1,3 +1,5 @@
+.. module:: numpy.matlib
+
Matrix library (:mod:`numpy.matlib`)
************************************
diff --git a/doc/source/reference/routines.polynomials.package.rst b/doc/source/reference/routines.polynomials.package.rst
index 61cb57fbb..7e40d9f00 100644
--- a/doc/source/reference/routines.polynomials.package.rst
+++ b/doc/source/reference/routines.polynomials.package.rst
@@ -1,3 +1,5 @@
+.. module:: numpy.polynomial
+
Polynomial Package
==================
diff --git a/doc/source/reference/routines.polynomials.polynomial.rst b/doc/source/reference/routines.polynomials.polynomial.rst
index 8194ca867..365c8da98 100644
--- a/doc/source/reference/routines.polynomials.polynomial.rst
+++ b/doc/source/reference/routines.polynomials.polynomial.rst
@@ -1,3 +1,5 @@
+.. module:: numpy.polynomial.polynomial
+
Polynomial Module (:mod:`numpy.polynomial.polynomial`)
======================================================
diff --git a/doc/source/reference/routines.random.rst b/doc/source/reference/routines.random.rst
index c8b097d7d..cda4e2b61 100644
--- a/doc/source/reference/routines.random.rst
+++ b/doc/source/reference/routines.random.rst
@@ -1,5 +1,7 @@
.. _routines.random:
+.. module:: numpy.random
+
Random sampling (:mod:`numpy.random`)
*************************************
diff --git a/doc/source/reference/routines.testing.rst b/doc/source/reference/routines.testing.rst
index 5a52a40d6..77c046768 100644
--- a/doc/source/reference/routines.testing.rst
+++ b/doc/source/reference/routines.testing.rst
@@ -1,5 +1,7 @@
.. _numpy-testing:
+.. module:: numpy.testing
+
Test Support (:mod:`numpy.testing`)
===================================
diff --git a/doc/source/user/numpy-for-matlab-users.rst b/doc/source/user/numpy-for-matlab-users.rst
index 45e40d011..16ee48c5e 100644
--- a/doc/source/user/numpy-for-matlab-users.rst
+++ b/doc/source/user/numpy-for-matlab-users.rst
@@ -547,7 +547,7 @@ Linear Algebra Equivalents
- eigenvalues and eigenvectors of ``a``
* - ``[V,D]=eig(a,b)``
- - ``V,D = np.linalg.eig(a,b)``
+ - ``D,V = scipy.linalg.eig(a,b)``
- eigenvalues and eigenvectors of ``a``, ``b``
* - ``[V,D]=eigs(a,k)``