diff options
Diffstat (limited to 'doc/source')
-rw-r--r-- | doc/source/_templates/indexcontent.html | 13 | ||||
-rw-r--r-- | doc/source/contents.rst | 1 | ||||
-rw-r--r-- | doc/source/f2py/python-usage.rst | 140 | ||||
-rw-r--r-- | doc/source/neps/datetime-proposal.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/datetime-proposal3.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/deferred-ufunc-evaluation.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/generalized-ufuncs.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/groupby_additions.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/index.rst | 37 | ||||
-rw-r--r-- | doc/source/neps/math_config_clean.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/missing-data.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/new-iterator-ufunc.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/newbugtracker.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/npy-format.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/structured_array_extensions.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/ufunc-overrides.rst | 1 | ||||
-rw-r--r-- | doc/source/neps/warnfix.rst | 1 | ||||
-rw-r--r-- | doc/source/reference/arrays.indexing.rst | 6 | ||||
-rw-r--r-- | doc/source/reference/c-api.array.rst | 2 | ||||
-rw-r--r-- | doc/source/reference/routines.rst | 2 | ||||
-rw-r--r-- | doc/source/reference/routines.testing.rst | 2 |
21 files changed, 109 insertions, 107 deletions
diff --git a/doc/source/_templates/indexcontent.html b/doc/source/_templates/indexcontent.html index fb753e7b7..e3fe3ac9b 100644 --- a/doc/source/_templates/indexcontent.html +++ b/doc/source/_templates/indexcontent.html @@ -34,6 +34,7 @@ <td width="50%"> <p class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">Reporting bugs</a></p> <p class="biglink"><a class="biglink" href="{{ pathto("about") }}">About NumPy</a></p> + <p class="biglink"><a class="biglink" href="{{ pathto("neps/index") }}">Numpy Enhancement Proposals</a><br/> </td><td width="50%"> <p class="biglink"><a class="biglink" href="{{ pathto("release") }}">Release Notes</a></p> <p class="biglink"><a class="biglink" href="{{ pathto("license") }}">License of Numpy</a></p> @@ -47,12 +48,14 @@ Public Domain in August 2008). The reference documentation for many of the functions are written by numerous contributors and developers of Numpy, both prior to and during the - <a href="http://scipy.org/Developer_Zone/DocMarathon2008">Numpy Documentation Marathon</a>. + <a href="http://docs.scipy.org/numpy/">Numpy Documentation Marathon</a>. </p> <p> - The Documentation Marathon is still ongoing. Please help us write - better documentation for Numpy by joining it! Instructions on how to - join and what to do can be found - <a href="http://scipy.org/Developer_Zone/DocMarathon2008">on the scipy.org website</a>. + The preferred way to update the documentation is by submitting a pull + request on Github (see the + <a href="http://docs.scipy.org/doc/numpy-dev/dev/">Developer Guide</a>. + The <a href="http://docs.scipy.org/numpy/">Numpy Documentation Wiki</a> + can also still be used to submit documentation fixes. + Please help us to further improve the Numpy documentation! </p> {% endblock %} diff --git a/doc/source/contents.rst b/doc/source/contents.rst index 023ebb8a0..1d46e8c7b 100644 --- a/doc/source/contents.rst +++ b/doc/source/contents.rst @@ -8,6 +8,7 @@ Numpy manual contents reference/index f2py/index dev/index + neps/index release about bugs diff --git a/doc/source/f2py/python-usage.rst b/doc/source/f2py/python-usage.rst index 83454c440..c7c7e3fd0 100644 --- a/doc/source/f2py/python-usage.rst +++ b/doc/source/f2py/python-usage.rst @@ -17,20 +17,14 @@ computational part of such functions is implemented in C or Fortran and wrapped with F2PY (or any other tool capable of providing CObject of a function). -.. example:: - - Consider a `Fortran 77 file`__ ``ftype.f``: +Consider a Fortran 77 file ``ftype.f``: .. include:: ftype.f :literal: - and build a wrapper using:: - - f2py -c ftype.f -m ftype +and build a wrapper using ``f2py -c ftype.f -m ftype``. - __ ftype.f - - In Python: +In Python: .. include:: ftype_session.dat :literal: @@ -54,18 +48,14 @@ type-casting only the real part of a complex number is used. order to *in situ* changes to be effective. It is recommended to use arrays with proper type but also other types work. -.. example:: - - Consider the following `Fortran 77 code`__: +Consider the following Fortran 77 code: .. include:: scalar.f :literal: - and wrap it using ``f2py -c -m scalar scalar.f``. +and wrap it using ``f2py -c -m scalar scalar.f``. - __ scalar.f - - In Python: +In Python: .. include:: scalar_session.dat :literal: @@ -88,18 +78,14 @@ Because Python strings are immutable, an ``intent(inout)`` argument expects an array version of a string in order to *in situ* changes to be effective. -.. example:: - - Consider the following `Fortran 77 code`__: +Consider the following Fortran 77 code: .. include:: string.f :literal: - and wrap it using ``f2py -c -m mystring string.f``. +and wrap it using ``f2py -c -m mystring string.f``. - __ string.f - - Python session: +Python session: .. include:: string_session.dat :literal: @@ -164,18 +150,14 @@ them to Fortran routines, use a function ``as_column_major_storage(<array>)`` that is provided by all F2PY generated extension modules. -.. example:: - - Consider `Fortran 77 code`__: +Consider Fortran 77 code: .. include:: array.f :literal: - and wrap it using ``f2py -c -m arr array.f -DF2PY_REPORT_ON_ARRAY_COPY=1``. +and wrap it using ``f2py -c -m arr array.f -DF2PY_REPORT_ON_ARRAY_COPY=1``. - __ array.f - - In Python: +In Python: .. include:: array_session.dat :literal: @@ -187,19 +169,14 @@ Call-back arguments F2PY supports calling Python functions from Fortran or C codes. - -.. example:: - - Consider the following `Fortran 77 code`__ +Consider the following Fortran 77 code: .. include:: callback.f :literal: - and wrap it using ``f2py -c -m callback callback.f``. - - __ callback.f +and wrap it using ``f2py -c -m callback callback.f``. - In Python: +In Python: .. include:: callback_session.dat :literal: @@ -217,53 +194,41 @@ block, use ``use`` statement as illustrated below. The same signature of a callback argument can be referred in different routine signatures. -.. example:: - - We use the same `Fortran 77 code`__ as in previous example but now - we'll pretend that F2PY was not able to guess the signatures of - call-back arguments correctly. First, we create an initial signature - file ``callback2.pyf`` using F2PY:: +We use the same Fortran 77 code as in previous example but now +we'll pretend that F2PY was not able to guess the signatures of +call-back arguments correctly. First, we create an initial signature +file ``callback2.pyf`` using F2PY:: f2py -m callback2 -h callback2.pyf callback.f - Then modify it as follows +Then modify it as follows .. include:: callback2.pyf :literal: - Finally, build the extension module using:: - - f2py -c callback2.pyf callback.f - - An example Python session would be identical to the previous example - except that argument names would differ. +Finally, build the extension module using ``f2py -c callback2.pyf callback.f``. - __ callback.f +An example Python session would be identical to the previous example +except that argument names would differ. Sometimes a Fortran package may require that users provide routines that the package will use. F2PY can construct an interface to such routines so that Python functions could be called from Fortran. -.. example:: - - Consider the following `Fortran 77 subroutine`__ that takes an array - and applies a function ``func`` to its elements. +Consider the following `Fortran 77 subroutine`__ that takes an array +and applies a function ``func`` to its elements. .. include:: calculate.f :literal: - __ calculate.f - - It is expected that function ``func`` has been defined - externally. In order to use a Python function as ``func``, it must - have an attribute ``intent(callback)`` (it must be specified before - the ``external`` statement). +It is expected that function ``func`` has been defined +externally. In order to use a Python function as ``func``, it must +have an attribute ``intent(callback)`` (it must be specified before +the ``external`` statement). - Finally, build an extension module using:: +Finally, build an extension module using ``f2py -c -m foo calculate.f`` - f2py -c -m foo calculate.f - - In Python: +In Python: .. include:: calculate_session.dat :literal: @@ -278,18 +243,14 @@ Then it is not necessary to pass the function in the argument list to the Fortran function. This may be desired if the Fortran function calling the python callback function is itself called by another Fortran function. -.. example:: - - Consider the following `Fortran 77 subroutine`__. +Consider the following Fortran 77 subroutine: .. include:: extcallback.f :literal: - __ extcallback.f +and wrap it using ``f2py -c -m pfromf extcallback.f``. - and wrap it using ``f2py -c -m pfromf extcallback.f``. - - In Python: +In Python: .. include:: extcallback_session.dat :literal: @@ -343,7 +304,6 @@ following rules are applied: * If ``k > l``, then only ``x_1, ..., x_l`` are set. - Common blocks ============== @@ -359,61 +319,51 @@ directly link to data members in common blocks. Data members can be changed by direct assignment or by in-place changes to the corresponding array objects. -.. example:: - - Consider the following `Fortran 77 code`__ +Consider the following Fortran 77 code: .. include:: common.f :literal: - and wrap it using ``f2py -c -m common common.f``. +and wrap it using ``f2py -c -m common common.f``. - __ common.f - - In Python: +In Python: .. include:: common_session.dat :literal: + Fortran 90 module data ======================= The F2PY interface to Fortran 90 module data is similar to Fortran 77 common blocks. -.. example:: - - Consider the following `Fortran 90 code`__ +Consider the following Fortran 90 code: .. include:: moddata.f90 :literal: - and wrap it using ``f2py -c -m moddata moddata.f90``. - - __ moddata.f90 +and wrap it using ``f2py -c -m moddata moddata.f90``. - In Python: +In Python: .. include:: moddata_session.dat :literal: + Allocatable arrays ------------------- F2PY has basic support for Fortran 90 module allocatable arrays. -.. example:: - - Consider the following `Fortran 90 code`__ +Consider the following Fortran 90 code: .. include:: allocarr.f90 :literal: - and wrap it using ``f2py -c -m allocarr allocarr.f90``. - - __ allocarr.f90 +and wrap it using ``f2py -c -m allocarr allocarr.f90``. - In Python: +In Python: .. include:: allocarr_session.dat :literal: diff --git a/doc/source/neps/datetime-proposal.rst b/doc/source/neps/datetime-proposal.rst new file mode 100644 index 000000000..05f0182b7 --- /dev/null +++ b/doc/source/neps/datetime-proposal.rst @@ -0,0 +1 @@ +.. include:: ../../neps/datetime-proposal.rst diff --git a/doc/source/neps/datetime-proposal3.rst b/doc/source/neps/datetime-proposal3.rst new file mode 100644 index 000000000..fa9102a96 --- /dev/null +++ b/doc/source/neps/datetime-proposal3.rst @@ -0,0 +1 @@ +.. include:: ../../neps/datetime-proposal3.rst diff --git a/doc/source/neps/deferred-ufunc-evaluation.rst b/doc/source/neps/deferred-ufunc-evaluation.rst new file mode 100644 index 000000000..b4a7a457d --- /dev/null +++ b/doc/source/neps/deferred-ufunc-evaluation.rst @@ -0,0 +1 @@ +.. include:: ../../neps/deferred-ufunc-evaluation.rst diff --git a/doc/source/neps/generalized-ufuncs.rst b/doc/source/neps/generalized-ufuncs.rst new file mode 100644 index 000000000..8b28f0224 --- /dev/null +++ b/doc/source/neps/generalized-ufuncs.rst @@ -0,0 +1 @@ +.. include:: ../../neps/generalized-ufuncs.rst diff --git a/doc/source/neps/groupby_additions.rst b/doc/source/neps/groupby_additions.rst new file mode 100644 index 000000000..61abc951e --- /dev/null +++ b/doc/source/neps/groupby_additions.rst @@ -0,0 +1 @@ +.. include:: ../../neps/groupby_additions.rst diff --git a/doc/source/neps/index.rst b/doc/source/neps/index.rst new file mode 100644 index 000000000..94cf563a4 --- /dev/null +++ b/doc/source/neps/index.rst @@ -0,0 +1,37 @@ +=========================== +Numpy Enhancement Proposals +=========================== + +Numpy Enhancement Proposals (NEPs) describe proposed changes to Numpy. +NEPs are modeled on Python Enhancement Proposals (PEPs), and are typically +written up when large changes to Numpy are proposed. + +This page provides an overview of all NEPs, making only a distinction between +the ones that have been implemented and those that have not been implemented. + +Implemented NEPs +---------------- + +.. toctree:: + :maxdepth: 1 + + ufunc-overrides + generalized-ufuncs + new-iterator-ufunc + npy-format + +Other NEPs +---------- + +.. toctree:: + :maxdepth: 1 + + missing-data + math_config_clean + groupby_additions + warnfix + newbugtracker + deferred-ufunc-evaluation + structured_array_extensions + datetime-proposal + datetime-proposal3 diff --git a/doc/source/neps/math_config_clean.rst b/doc/source/neps/math_config_clean.rst new file mode 100644 index 000000000..25b340e51 --- /dev/null +++ b/doc/source/neps/math_config_clean.rst @@ -0,0 +1 @@ +.. include:: ../../neps/math_config_clean.rst diff --git a/doc/source/neps/missing-data.rst b/doc/source/neps/missing-data.rst new file mode 100644 index 000000000..f9899f1b0 --- /dev/null +++ b/doc/source/neps/missing-data.rst @@ -0,0 +1 @@ +.. include:: ../../neps/missing-data.rst diff --git a/doc/source/neps/new-iterator-ufunc.rst b/doc/source/neps/new-iterator-ufunc.rst new file mode 100644 index 000000000..7e06aa8ae --- /dev/null +++ b/doc/source/neps/new-iterator-ufunc.rst @@ -0,0 +1 @@ +.. include:: ../../neps/new-iterator-ufunc.rst diff --git a/doc/source/neps/newbugtracker.rst b/doc/source/neps/newbugtracker.rst new file mode 100644 index 000000000..70ea21f8c --- /dev/null +++ b/doc/source/neps/newbugtracker.rst @@ -0,0 +1 @@ +.. include:: ../../neps/newbugtracker.rst diff --git a/doc/source/neps/npy-format.rst b/doc/source/neps/npy-format.rst new file mode 100644 index 000000000..bd1f2bb5c --- /dev/null +++ b/doc/source/neps/npy-format.rst @@ -0,0 +1 @@ +.. include:: ../../neps/npy-format.rst diff --git a/doc/source/neps/structured_array_extensions.rst b/doc/source/neps/structured_array_extensions.rst new file mode 100644 index 000000000..341e6c955 --- /dev/null +++ b/doc/source/neps/structured_array_extensions.rst @@ -0,0 +1 @@ +.. include:: ../../neps/structured_array_extensions.rst diff --git a/doc/source/neps/ufunc-overrides.rst b/doc/source/neps/ufunc-overrides.rst new file mode 100644 index 000000000..2e293ec44 --- /dev/null +++ b/doc/source/neps/ufunc-overrides.rst @@ -0,0 +1 @@ +.. include:: ../../neps/ufunc-overrides.rst diff --git a/doc/source/neps/warnfix.rst b/doc/source/neps/warnfix.rst new file mode 100644 index 000000000..1b9b1b87b --- /dev/null +++ b/doc/source/neps/warnfix.rst @@ -0,0 +1 @@ +.. include:: ../../neps/warnfix.rst diff --git a/doc/source/reference/arrays.indexing.rst b/doc/source/reference/arrays.indexing.rst index e759b6ff8..d319b5d80 100644 --- a/doc/source/reference/arrays.indexing.rst +++ b/doc/source/reference/arrays.indexing.rst @@ -170,9 +170,9 @@ concepts to remember include: .. data:: newaxis - The :const:`newaxis` object can be used in all slicing operations - as discussed above. :const:`None` can also be used instead of - :const:`newaxis`. + The :const:`newaxis` object can be used in all slicing operations to + create an axis of length one. :const: :const:`newaxis` is an alias for + 'None', and 'None' can be used in place of this with the same result. Advanced indexing diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst index 2ce43b2be..23355bc91 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -190,7 +190,7 @@ From scratch .. cfunction:: PyObject* PyArray_NewFromDescr(PyTypeObject* subtype, PyArray_Descr* descr, int nd, npy_intp* dims, npy_intp* strides, void* data, int flags, PyObject* obj) - This function steals a reference to *descr* if it is not NULL. + This function steals a reference to *descr*. This is the main array creation function. Most new arrays are created with this flexible function. diff --git a/doc/source/reference/routines.rst b/doc/source/reference/routines.rst index 37b16de59..c2f091d83 100644 --- a/doc/source/reference/routines.rst +++ b/doc/source/reference/routines.rst @@ -36,8 +36,6 @@ indentation. routines.ma routines.math routines.matlib - routines.numarray - routines.oldnumeric routines.other routines.padding routines.polynomials diff --git a/doc/source/reference/routines.testing.rst b/doc/source/reference/routines.testing.rst index 834d8bbe3..c43aeeed9 100644 --- a/doc/source/reference/routines.testing.rst +++ b/doc/source/reference/routines.testing.rst @@ -11,7 +11,7 @@ work right away. Asserts -======= +------- .. autosummary:: :toctree: generated/ |