diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2013-12-17 15:45:42 +0100 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2014-02-06 17:52:00 +0100 |
commit | 628e0efd4356dc9488bc79cbe28f905a72839998 (patch) | |
tree | 585111fd895d6162f77d33b087e53d851e867c1c | |
parent | e0b28df9fa386b6aa8f439a5949e984c90a8320d (diff) | |
download | numpy-628e0efd4356dc9488bc79cbe28f905a72839998.tar.gz |
DOC|MINOR: minor fixes to release notes indexing part.
-rw-r--r-- | doc/release/1.9.0-notes.rst | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/doc/release/1.9.0-notes.rst b/doc/release/1.9.0-notes.rst index fdc215297..31ba40016 100644 --- a/doc/release/1.9.0-notes.rst +++ b/doc/release/1.9.0-notes.rst @@ -112,8 +112,8 @@ Indexing ~~~~~~~~ The NumPy indexing has seen a complete rewrite in this version. This makes -most advanced indexing operations much faster and should have no effect -to normal usage. +most advanced integer indexing operations much faster and should have no +other implications. However some subtle changes and deprecations were introduced in advanced indexing operations: @@ -122,30 +122,31 @@ indexing operations: not the original array. * Advanced indexing into one dimensional arrays used to have (undocumented) special handling regarding repeating the value array in assignments - when the shapes did not match. - Code using this will raise an error now. For compatibility you can use + when the shape of the value array was too small or did not match. + Code using this will raise an error. For compatibility you can use ``arr.flat[index] = values``, which uses the old code branch. * The iteration order over advanced indexes used to be always C-order. - In NumPy 1.9. the iteration order adapts to the input and is not + In NumPy 1.9. the iteration order adapts to the inputs and is not guaranteed (with the exception of a *single* advanced index which is never reversed for compatibility reasons). This means that the result is undefined if multiple values are assigned to the same element. An example for this is ``arr[[0, 0], [1, 1]] = [1, 2]``, which may - set ``arr[0, 1]`` to either 1 or 2 depending the memory order of the - indexing and values arrays. + set ``arr[0, 1]`` to either 1 or 2 depending on the memory order of the + indexing and value arrays. * Equivalent to the iteration order, the memory layout of the advanced indexing result is adapted for faster indexing and cannot be predicted. * All indexing operations return a view or a copy. No indexing operation will return the original array object. * In the future Boolean array-likes (such as lists of python bools) - will always be treated as boolean indexes and boolean scalars (including + will always be treated as Boolean indexes and Boolean scalars (including python `True`) will be a legal *boolean* index. At this time, this is already the case for scalar arrays to allow the general ``positive = a[a > 0]`` to work when ``a`` is zero dimensional. * All non-integer array-likes are deprecated, object arrays of custom integer like objects may have to be cast explicitly. * The error reporting for advanced indexing is more informative, however - the error type has changed in some cases. + the error type has changed in some cases. (e.g. Broadcasting errors of + indexing arrays are reported as `IndexError`) * Indexing with more then one ellipsis (`...`) is deprecated. |