New submission from jakirkham <jakirk...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to