Python Forum
python 3 memoryview : unsupported format <d
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python 3 memoryview : unsupported format <d
#1
Hi, I have just made the change from python2.7 to python3.5.3.

I am having trouble with following lines of code which works in python2, but not 3:
In [5]: from multiprocessing import sharedctypes

In [6]: x = sharedctypes.RawArray('d', 10)

In [7]: memoryview(x)[:] = array(zeros_like(arange(10.), dtype=float64))
With python3 the error is:
Error:
NotImplementedError: memoryview: unsupported format <d
Can somebody provide a hint on how this is done in python3?

Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unsupported Format Character Led_Zeppelin 2 5,361 Sep-20-2022, 01:46 PM
Last Post: deanhystad
  Memoryview for List saumyagoel 9 8,181 Mar-07-2019, 07:12 AM
Last Post: perfringo
  New to coding - Python error: TypeError: unsupported operand type(s) for -: 'str' and zer0 7 16,846 Jul-10-2018, 05:27 AM
Last Post: volcano63

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020