diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-02-09 23:49:24 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-02-09 23:49:24 +0000 |
commit | bec587c6e5068fb19d57cdbe2ed36e953ca97005 (patch) | |
tree | faae0cfacfe0e963af9b4a222c3a19444c2cd8f8 /doc | |
parent | ff03047c1b8f3920feb0c7d1374cc1670e793b7a (diff) | |
download | numpy-bec587c6e5068fb19d57cdbe2ed36e953ca97005.tar.gz |
MAINT: Add release notes for __[gs]etslice__ removal
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.13.0-notes.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/release/1.13.0-notes.rst b/doc/release/1.13.0-notes.rst index ac4d4b2c1..c70568821 100644 --- a/doc/release/1.13.0-notes.rst +++ b/doc/release/1.13.0-notes.rst @@ -65,6 +65,17 @@ implement ``__len__`` as the number of record fields, ``bool`` of scalar dtypes would evaluate to ``False``, which was unintuitive. Now ``bool(dtype) == True`` for all dtypes. +``__getslice__`` and ``__setslice__`` have been removed from ``ndarray`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When subclassing np.ndarray in Python 2.7, it is no longer _necessary_ to +implement ``__*slice__`` on the derived class, as ``__*item__`` will intercept +these calls correctly. + +Any code that did implement these will work exactly as before, with the +obvious exception of any code that tries to directly call +``ndarray.__getslice__`` (e.g. through ``super(...).__getslice__``). In +this case, ``.__getitem__(slice(start, end))`` will act as a replacement. + C API ~~~~~ |