diff options
-rw-r--r-- | doc/release/1.16.0-notes.rst | 5 | ||||
-rw-r--r-- | numpy/lib/index_tricks.py | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst index 589c0ef8b..389added8 100644 --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -87,6 +87,11 @@ More in detail, the complex64 type now has the same alignment as a C-struct ``struct {float r, i;}``, according to the compiler used to compile numpy, and similarly for the complex128 and complex256 types. +nd_grid __len__ removal +----------------------- +``len(np.mgrid)`` and ``len(np.ogrid)`` are now considered nonsensical +and raise a ``TypeError``. + ``np.unravel_index`` now accepts ``shape`` keyword argument ----------------------------------------------------------- Previously, only the ``dims`` keyword argument was accepted diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 06bb54bc1..26243d231 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -200,9 +200,6 @@ class nd_grid(object): else: return _nx.arange(start, stop, step) - def __len__(self): - return 0 - class MGridClass(nd_grid): """ |