From eafc53fe4dc989fab30ca5a019c45d8b2ac90a68 Mon Sep 17 00:00:00 2001 From: Christoph Lassner Date: Mon, 7 Dec 2020 18:43:08 -0800 Subject: [PATCH] Additional fix for #1, complex numbers. --- pymp/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymp/shared.py b/pymp/shared.py index 47ab55f..4d90b3b 100644 --- a/pymp/shared.py +++ b/pymp/shared.py @@ -27,7 +27,7 @@ def array(shape, dtype=_np.float64, autolock=False): # because they're only partially supported. Instead, create a byte ctypes # array of the right size and use a view of the appropriate datatype. shared_arr = _multiprocessing.Array( - "b", int(_np.prod(shape) * dtype.alignment), lock=autolock + "b", int(_np.prod(shape) * dtype.itemsize), lock=autolock ) with _warnings.catch_warnings(): # For more information on why this is necessary, see