diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.10.0-notes.rst | 33 | ||||
-rw-r--r-- | doc/source/reference/arrays.dtypes.rst | 12 | ||||
-rw-r--r-- | doc/source/reference/routines.array-manipulation.rst | 5 |
3 files changed, 39 insertions, 11 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst index 6a6bbd4c6..c4ff2e4b4 100644 --- a/doc/release/1.10.0-notes.rst +++ b/doc/release/1.10.0-notes.rst @@ -14,6 +14,9 @@ Highlights * Addition of *np.linalg.multi_dot*: compute the dot product of two or more arrays in a single function call, while automatically selecting the fastest evaluation order. +* The new function `np.stack` provides a general interface for joining a + sequence of arrays along a new axis, complementing `np.concatenate` for + joining along an existing axis. * Addition of `nanprod` to the set of nanfunctions. @@ -91,7 +94,7 @@ New Features Reading extra flags from site.cfg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously customization of compilation of dependency libraries and numpy +Previously customization of compilation of dependency libraries and numpy itself was only accomblishable via code changes in the distutils package. Now numpy.distutils reads in the following extra flags from each group of the *site.cfg*: @@ -116,8 +119,8 @@ extensions is now performed in *n* parallel processes. The parallelization is limited to files within one extension so projects using Cython will not profit because it builds extensions from single files. -*genfromtxt* has an new ``max_rows`` argument -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*genfromtxt* has a new ``max_rows`` argument +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A ``max_rows`` argument has been added to *genfromtxt* to limit the number of rows read in a single call. Using this functionality, it is possible to read in multiple arrays stored in a single file by making @@ -142,6 +145,14 @@ you will not be able to emit the warning or test it. The context manager ``clear_and_catch_warnings`` clears warnings from the module registry on entry and resets them on exit, meaning that warnings can be re-raised. +*cov* has new ``fweights`` and ``aweights`` arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The ``fweights`` and ``aweights`` arguments add new functionality to +covariance calculations by applying two types of weighting to observation +vectors. An array of ``fweights`` indicates the number of repeats of each +observation vector, and an array of ``aweights`` provides their relative +importance or probability. + Improvements ============ @@ -278,3 +289,19 @@ Because we are deprecating the ``bias`` argument to ``ma.corrcoef``, we also deprecate the use of the ``allow_masked`` argument as a positional argument, as its position will change with the removal of ``bias``. ``allow_masked`` will in due course become a keyword-only argument. + +dtype string representation changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Since 1.6, creating a dtype object from its string representation, e.g. +``'f4'``, would issue a deprecation warning if the size did not correspond +to an existing type, and default to creating a dtype of the default size +for the type. Starting with this release, this will now raise a ``TypeError``. + +The only exception is object dtypes, where both ``'O4'`` and ``'O8'`` will +still issue a deprecation warning. This platform-dependent representation +will raise an error in the next release. + +In preparation for this upcoming change, the string representation of an +object dtype, i.e. ``np.dtype(object).str``, no longer includes the item +size, i.e. will return ``'|O'`` instead of ``'|O4'`` or ``'|O8'`` as +before. diff --git a/doc/source/reference/arrays.dtypes.rst b/doc/source/reference/arrays.dtypes.rst index a43c23218..28e2d4f82 100644 --- a/doc/source/reference/arrays.dtypes.rst +++ b/doc/source/reference/arrays.dtypes.rst @@ -46,7 +46,7 @@ Structured data types are formed by creating a data type whose which it can be :ref:`accessed <arrays.indexing.fields>`. The parent data type should be of sufficient size to contain all its fields; the parent is nearly always based on the :class:`void` type which allows -an arbitrary item size. Structured data types may also contain nested +an arbitrary item size. Structured data types may also contain nested structured sub-array data types in their fields. .. index:: @@ -219,10 +219,10 @@ One-character strings Array-protocol type strings (see :ref:`arrays.interface`) The first character specifies the kind of data and the remaining - characters specify the number of bytes per item. The item size may - be ignored for some kinds (i.e., boolean, object), rounded to the - next supported size (float, complex), or interpreted as the number - of characters (Unicode). The supported kinds are + characters specify the number of bytes per item, except for Unicode, + where it is interpreted as the number of characters. The item size + must correspond to an existing type, or an error will be raised. The + supported kinds are ================ ======================== ``'b'`` boolean @@ -431,7 +431,7 @@ Type strings Both arguments must be convertible to data-type objects in this case. The *base_dtype* is the data-type object that the new data-type builds on. This is how you could assign named fields to - any built-in data-type object, as done in + any built-in data-type object, as done in :ref:`record arrays <arrays.classes.rec>`. .. admonition:: Example diff --git a/doc/source/reference/routines.array-manipulation.rst b/doc/source/reference/routines.array-manipulation.rst index 2b3ba342a..a8aa2d0d8 100644 --- a/doc/source/reference/routines.array-manipulation.rst +++ b/doc/source/reference/routines.array-manipulation.rst @@ -65,8 +65,9 @@ Joining arrays .. autosummary:: :toctree: generated/ - column_stack concatenate + stack + column_stack dstack hstack vstack @@ -76,10 +77,10 @@ Splitting arrays .. autosummary:: :toctree: generated/ + split array_split dsplit hsplit - split vsplit Tiling arrays |