arte/utils/shared_array.py
def ndarray(self, realloc=False):
        '''
        Returns a new numpy wrapper around the buffer contents.

        Call this function after a task has been spawned the multiprocessing
        module in order to have access to the shared memory segment.

        If the array had already been accessed before passing it to the
        multiprocessing task, the task has to set `realloc` to True
        in order to reallocate a local copy of the array.

        Parameters
        ----------
        Realloc: bool, optional
            force array reallocation. Defaults to False

        Returns
        -------
        numpy.ndarray
            the shared numpy array. The array is read-write and changes
            will be immediately visible to other processes.
        '''
        if (self._ndarray is None) or realloc:
            arr = np.frombuffer(self._shared_buf, dtype=self.dtype)
            self._ndarray = arr.reshape(self.shape)
        return self._ndarray

        Returns a new numpy wrapper around the buffer contents.

        Call this function after a task has been spawned the multiprocessing
        module in order to have access to the shared memory segment.

        If the array had already been accessed before passing it to the
        multiprocessing task, the task has to set `realloc` to True
        in order to reallocate a local copy of the array.

        Parameters
        ----------
        Realloc: bool, optional
            force array reallocation. Defaults to False

        Returns
        -------
        numpy.ndarray
            the shared numpy array. The array is read-write and changes
            will be immediately visible to other processes.
        
Returns a new numpy wrapper around the buffer contents.
Call this function after a task has been spawned the multiprocessing
module in order to have access to the shared memory segment.

If the array had already been accessed before passing it to the
multiprocessing task, the task has to set `realloc` to True
in order to reallocate a local copy of the array.

Parameters

bool, optional
force array reallocation. Defaults to False

Returns

numpy.ndarray
the shared numpy array. The array is read-write and changes
will be immediately visible to other processes.
Returns a new numpy wrapper around the buffer contents . Call this function after a task has been spawned the multiprocessing module in order to have access to the shared memory segment . If the array had already been accessed before passing it to the multiprocessing task the task has to set ` realloc ` to True in order to reallocate a local copy of the array . Parameters bool optional force array reallocation . Defaults to False Returns numpy . ndarray the shared numpy array . The array is read - write and changes will be immediately visible to other processes .
def ndarray(self, realloc=False):
        if (self._ndarray is None) or realloc:
            arr = np.frombuffer(self._shared_buf, dtype=self.dtype)
            self._ndarray = arr.reshape(self.shape)
        return self._ndarray
def ndarray ( self , realloc = False ) : if ( self . _ndarray is None ) or realloc : arr = np . frombuffer ( self . _shared_buf , dtype = self . dtype ) self . _ndarray = arr . reshape ( self . shape ) return self . _ndarray
Returns a new numpy wrapper around the buffer contents.
Returns a new numpy wrapper around the buffer contents .
'''
        Returns a new numpy wrapper around the buffer contents.

        Call this function after a task has been spawned the multiprocessing
        module in order to have access to the shared memory segment.

        If the array had already been accessed before passing it to the
        multiprocessing task, the task has to set `realloc` to True
        in order to reallocate a local copy of the array.

        Parameters
        ----------
        Realloc: bool, optional
            force array reallocation. Defaults to False

        Returns
        -------
        numpy.ndarray
            the shared numpy array. The array is read-write and changes
            will be immediately visible to other processes.
        '''
self
realloc