summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/release/upcoming_changes/16830.expired.rst6
-rw-r--r--doc/release/upcoming_changes/20020.new_function.rst4
-rw-r--r--doc/release/upcoming_changes/20993.improvement.rst5
-rw-r--r--doc/release/upcoming_changes/21485.new_feature.rst5
-rw-r--r--doc/source/_static/numpy.css41
-rw-r--r--doc/source/_templates/layout.html10
-rw-r--r--doc/source/conf.py5
-rw-r--r--doc/source/index.rst29
-rw-r--r--doc/source/reference/c-api/array.rst15
-rw-r--r--doc/source/reference/routines.ma.rst1
-rw-r--r--doc/source/user/misc.rst20
11 files changed, 92 insertions, 49 deletions
diff --git a/doc/release/upcoming_changes/16830.expired.rst b/doc/release/upcoming_changes/16830.expired.rst
new file mode 100644
index 000000000..2994a7d9e
--- /dev/null
+++ b/doc/release/upcoming_changes/16830.expired.rst
@@ -0,0 +1,6 @@
+``NpzFile.iteritems()`` and ``NpzFile.iterkeys()`` are removed
+--------------------------------------------------------------
+
+As part of the continued removal of Python 2 compatibility
+``NpzFile.iteritems()`` and ``NpzFile.iterkeys()`` methods are now removed. This
+concludes the deprecation from 1.15.
diff --git a/doc/release/upcoming_changes/20020.new_function.rst b/doc/release/upcoming_changes/20020.new_function.rst
new file mode 100644
index 000000000..0f310ceac
--- /dev/null
+++ b/doc/release/upcoming_changes/20020.new_function.rst
@@ -0,0 +1,4 @@
+`ndenumerate` specialization for masked arrays
+----------------------------------------------
+The masked array module now provides the `numpy.ma.ndenumerate` function,
+an alternative to `numpy.ndenumerate` that skips masked values by default.
diff --git a/doc/release/upcoming_changes/20993.improvement.rst b/doc/release/upcoming_changes/20993.improvement.rst
new file mode 100644
index 000000000..f0019c45e
--- /dev/null
+++ b/doc/release/upcoming_changes/20993.improvement.rst
@@ -0,0 +1,5 @@
+``np.fromiter`` now accepts objects and subarrays
+-------------------------------------------------
+The `~numpy.fromiter` function now supports object and
+subarray dtypes. Please see he function documentation for
+examples.
diff --git a/doc/release/upcoming_changes/21485.new_feature.rst b/doc/release/upcoming_changes/21485.new_feature.rst
new file mode 100644
index 000000000..99fd5e92d
--- /dev/null
+++ b/doc/release/upcoming_changes/21485.new_feature.rst
@@ -0,0 +1,5 @@
+``keepdims`` parameter for ``average``
+--------------------------------------
+The parameter ``keepdims`` was added to the functions `numpy.average`
+and `numpy.ma.average`. The parameter has the same meaning as it
+does in reduction functions such as `numpy.sum` or `numpy.mean`.
diff --git a/doc/source/_static/numpy.css b/doc/source/_static/numpy.css
index 53b610bf1..fc296e8ab 100644
--- a/doc/source/_static/numpy.css
+++ b/doc/source/_static/numpy.css
@@ -22,7 +22,6 @@ h1 {
color: #013243; /* warm black */
}
-
h2 {
color: #4d77cf; /* han blue */
letter-spacing: -.03em;
@@ -32,3 +31,43 @@ h3 {
color: #013243; /* warm black */
letter-spacing: -.03em;
}
+
+/* Main page overview cards */
+
+.intro-card {
+ background: #fff;
+ border-radius: 0;
+ padding: 30px 10px 20px 10px;
+ margin: 10px 0px;
+}
+
+.intro-card p.card-text {
+ margin: 0px;
+}
+
+.intro-card .card-img-top {
+ height: 52px;
+ width: 52px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.intro-card .card-header {
+ border: none;
+ background-color: white;
+ color: #150458 !important;
+ font-size: var(--pst-font-size-h5);
+ font-weight: bold;
+ padding: 2.5rem 0rem 0.5rem 0rem;
+}
+
+.intro-card .card-footer {
+ border: none;
+ background-color: white;
+}
+
+.intro-card .card-footer p.card-text {
+ max-width: 220px;
+ margin-left: auto;
+ margin-right: auto;
+}
diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html
deleted file mode 100644
index e2812fdd5..000000000
--- a/doc/source/_templates/layout.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "!layout.html" %}
-
-{%- block extrahead %}
-{{ super() }}
-<link rel="stylesheet" href="{{ pathto('_static/numpy.css', 1) }}" type="text/css" />
-
- <!-- PR #17220: This is added via javascript in versionwarning.js -->
- <!-- link rel="canonical" href="http://numpy.org/doc/stable/{{ pagename }}{{ file_suffix }}" / -->
-
-{% endblock %}
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 1a201a3c5..5c056b201 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -196,6 +196,11 @@ html_theme_options = {
html_title = "%s v%s Manual" % (project, version)
html_static_path = ['_static']
html_last_updated_fmt = '%b %d, %Y'
+html_css_files = ["numpy.css"]
+
+# Prevent sphinx-panels from loading bootstrap css, the pydata-sphinx-theme
+# already loads it
+panels_add_bootstrap_css = False
html_use_modindex = True
html_copy_source = False
diff --git a/doc/source/index.rst b/doc/source/index.rst
index a753a21f1..1576d0672 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -11,6 +11,7 @@ NumPy documentation
User Guide <user/index>
API reference <reference/index>
Development <dev/index>
+ release
**Version**: |version|
@@ -35,7 +36,7 @@ basic statistical operations, random simulation and much more.
.. panels::
:card: + intro-card text-center
- :column: col-lg-6 col-md-6 col-sm-6 col-xs-12 p-2
+ :column: col-lg-6 col-md-6 col-sm-6 col-xs-12 d-flex
---
:img-top: ../source/_static/index-images/getting_started.svg
@@ -46,10 +47,12 @@ basic statistical operations, random simulation and much more.
New to NumPy? Check out the Absolute Beginner's Guide. It contains an
introduction to NumPy's main concepts and links to additional tutorials.
+ +++
+
.. link-button:: user/absolute_beginners
:type: ref
- :text:
- :classes: stretched-link
+ :text: To the absolute beginner's guide
+ :classes: btn-block btn-secondary stretched-link
---
:img-top: ../source/_static/index-images/user_guide.svg
@@ -60,10 +63,12 @@ basic statistical operations, random simulation and much more.
The user guide provides in-depth information on the
key concepts of NumPy with useful background information and explanation.
+ +++
+
.. link-button:: user
:type: ref
- :text:
- :classes: stretched-link
+ :text: To the user guide
+ :classes: btn-block btn-secondary stretched-link
---
:img-top: ../source/_static/index-images/api.svg
@@ -76,25 +81,29 @@ basic statistical operations, random simulation and much more.
methods work and which parameters can be used. It assumes that you have an
understanding of the key concepts.
+ +++
+
.. link-button:: reference
:type: ref
- :text:
- :classes: stretched-link
+ :text: To the reference guide
+ :classes: btn-block btn-secondary stretched-link
---
:img-top: ../source/_static/index-images/contributor.svg
Contributor's Guide
- ^^^^^^^^^^^^^^^
+ ^^^^^^^^^^^^^^^^^^^
Want to add to the codebase? Can help add translation or a flowchart to the
documentation? The contributing guidelines will guide you through the
process of improving NumPy.
+ +++
+
.. link-button:: devindex
:type: ref
- :text:
- :classes: stretched-link
+ :text: To the contributor's guide
+ :classes: btn-block btn-secondary stretched-link
.. This is not really the index page, that is found in
_templates/indexcontent.html The toctree content here will be added to the
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index d2e873802..f22b41a85 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -2176,8 +2176,8 @@ Array Functions
^^^^^^^^^^^^^^^
.. c:function:: int PyArray_AsCArray( \
- PyObject** op, void* ptr, npy_intp* dims, int nd, int typenum, \
- int itemsize)
+ PyObject** op, void* ptr, npy_intp* dims, int nd, \
+ PyArray_Descr* typedescr)
Sometimes it is useful to access a multidimensional array as a
C-style multi-dimensional array so that algorithms can be
@@ -2207,14 +2207,11 @@ Array Functions
The dimensionality of the array (1, 2, or 3).
- :param typenum:
+ :param typedescr:
- The expected data type of the array.
-
- :param itemsize:
-
- This argument is only needed when *typenum* represents a
- flexible array. Otherwise it should be 0.
+ A :c:type:`PyArray_Descr` structure indicating the desired data-type
+ (including required byteorder). The call will steal a reference to
+ the parameter.
.. note::
diff --git a/doc/source/reference/routines.ma.rst b/doc/source/reference/routines.ma.rst
index 5404c43d8..1de5c1c02 100644
--- a/doc/source/reference/routines.ma.rst
+++ b/doc/source/reference/routines.ma.rst
@@ -190,6 +190,7 @@ Finding masked data
.. autosummary::
:toctree: generated/
+ ma.ndenumerate
ma.flatnotmasked_contiguous
ma.flatnotmasked_edges
ma.notmasked_contiguous
diff --git a/doc/source/user/misc.rst b/doc/source/user/misc.rst
index ca8f078f6..9b6aa65e2 100644
--- a/doc/source/user/misc.rst
+++ b/doc/source/user/misc.rst
@@ -123,8 +123,6 @@ Only a survey of the choices. Little detail on how each works.
- getting it wrong leads to memory leaks, and worse, segfaults
- - API will change for Python 3.0!
-
2) Cython
- Plusses:
@@ -183,21 +181,7 @@ Only a survey of the choices. Little detail on how each works.
- doesn't necessarily avoid reference counting issues or needing to know
API's
-5) scipy.weave
-
- - Plusses:
-
- - can turn many numpy expressions into C code
- - dynamic compiling and loading of generated C code
- - can embed pure C code in Python module and have weave extract, generate
- interfaces and compile, etc.
-
- - Minuses:
-
- - Future very uncertain: it's the only part of Scipy not ported to Python 3
- and is effectively deprecated in favor of Cython.
-
-6) Psyco
+5) Psyco
- Plusses:
@@ -226,5 +210,3 @@ Interfacing to C++:
3) Boost.python
4) SWIG
5) SIP (used mainly in PyQT)
-
-