Commit efe27091 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Now that we use dictionaries we do not need to reshape RawArrays anymore as we only use 1D arrays.

parent 29934196
...@@ -33,13 +33,12 @@ class SharedArray(object): ...@@ -33,13 +33,12 @@ class SharedArray(object):
not write on the same section. not write on the same section.
""" """
def __init__(self, shape): def __init__(self, size):
self._shape = shape self.array = RawArray(ctypes.c_double, size)
self.array = RawArray(ctypes.c_double, int(np.product(self._shape)))
@property @property
def array(self): def array(self):
return np.ctypeslib.as_array(self._array).reshape(self._shape) return np.ctypeslib.as_array(self._array)
@array.setter @array.setter
def array(self, array): def array(self, array):
...@@ -47,7 +46,3 @@ class SharedArray(object): ...@@ -47,7 +46,3 @@ class SharedArray(object):
self._array = array self._array = array
else: else:
raise TypeError("Type must be RawArray.") raise TypeError("Type must be RawArray.")
@property
def shape(self):
return self._shape
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment