[issue14130] memoryview: add multi-dimensional indexing and slicing

Ian Beaver report at bugs.python.org
Sat Feb 8 02:45:10 CET 2014


Ian Beaver added the comment:

If there is any way to get this implemented, it is needed.  For one, the docs on memoryview make no mention that indexing and slicing doesn't work with multi-dimensional data which led me to believe it was supported until I tried using it.  A second reason is currently this represents a loss of functionality from the buffer type in python2.  In porting code using the buffer type in python2 to python3, you get a very unhelpful "NotImplementedError" with no description when trying to slice a memoryview.  There is no workaround but to call tobytes() and copy the data in memory to an object that supports slicing, but for very large objects this defeats the primary purpose of using buffers in the first place, which is to avoid memory copies.

----------
nosy: +undercoveridiot

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14130>
_______________________________________


More information about the Python-bugs-list mailing list