-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Description
In moving some code from Python 2 to Python 3 I've run into a problem with memoryview
. The code below works with Python 2, but not Python 3. Is there a workaround for this?
Reproducing code example:
import numpy as np
from multiprocessing import sharedctypes
x = sharedctypes.RawArray('d', 10)
memoryview(x)[:] = array(np.zeros_like(np.arange(10.), dtype=float64))
Error message:
NotImplementedError: memoryview: unsupported format <d
Numpy/Python version information:
Python 3.5.7 + numpy '1.16.3' and Python 2.7.15 + numpy '1.16.0'
Metadata
Metadata
Assignees
Labels
No labels