classification
Title: `object`-backed `memoryview`'s `tolist` errors
Type: Stage:
Components: Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jakirkham
Priority: normal Keywords:

Created on 2020-07-06 21:19 by jakirkham, last changed 2020-07-06 21:19 by jakirkham.

Messages (1)
msg373175 - (view) Author: (jakirkham) Date: 2020-07-06 21:19
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
```
History
Date User Action Args
2020-07-06 21:19:56jakirkhamcreate