[New-bugs-announce] [issue41223] `object`-backed `memoryview`'s `tolist` errors
jakirkham
report at bugs.python.org
Mon Jul 6 17:19:56 EDT 2020
New submission from jakirkham <jakirkham at gmail.com>:
When working with an `object`-backed `memoryview`, it seems we are unable to coerce it to a `list`. This would be useful as it would provide a way to get the underlying `object`'s into something a bit easier to work with.
```
In [1]: import numpy
In [2]: a = numpy.array(["abc", "def", "ghi"], dtype=object)
In [3]: m = memoryview(a)
In [4]: m.tolist()
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-4-42400a31add8> in <module>
----> 1 m.tolist()
NotImplementedError: memoryview: format O not supported
```
----------
messages: 373175
nosy: jakirkham
priority: normal
severity: normal
status: open
title: `object`-backed `memoryview`'s `tolist` errors
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41223>
_______________________________________
More information about the New-bugs-announce
mailing list