pytrax/__RandomWalk__.py
def check_wall(self, walkers, move):
        r'''
        The walkers are an array of coordinates of the image,
        the wall map is a boolean map of the image rolled in each direction.
        directions is an array referring to the movement up or down an axis
        and is used to increment the walker coordinates if a wall is not met

        Parameters
        ----------
        walkers: ndarray of int and shape [nw, dim]
            the current coordinates of the walkers
        move: ndarray of int and shape [nw, dim]
            the vector of the next move to be made by the walker
        inds: array of int and shape [nw]
            the index of the wall map corresponding to the move vector
        '''
        next_move = walkers + move
        if self.dim == 2:
            move_ok = self.wall_map[next_move[:, 0],
                                    next_move[:, 1]]
        elif self.dim == 3:
            move_ok = self.wall_map[next_move[:, 0],
                                    next_move[:, 1],
                                    next_move[:, 2]]
        return ~move_ok
r'''
        The walkers are an array of coordinates of the image,
        the wall map is a boolean map of the image rolled in each direction.
        directions is an array referring to the movement up or down an axis
        and is used to increment the walker coordinates if a wall is not met

        Parameters
        ----------
        walkers: ndarray of int and shape [nw, dim]
            the current coordinates of the walkers
        move: ndarray of int and shape [nw, dim]
            the vector of the next move to be made by the walker
        inds: array of int and shape [nw]
            the index of the wall map corresponding to the move vector
        
r'''
The walkers are an array of coordinates of the image,
the wall map is a boolean map of the image rolled in each direction.
directions is an array referring to the movement up or down an axis
and is used to increment the walker coordinates if a wall is not met

Parameters

ndarray of int and shape [nw, dim]
the current coordinates of the walkers
move: ndarray of int and shape [nw, dim]
the vector of the next move to be made by the walker
inds: array of int and shape [nw]
the index of the wall map corresponding to the move vector
r ' ' ' The walkers are an array of coordinates of the image the wall map is a boolean map of the image rolled in each direction . directions is an array referring to the movement up or down an axis and is used to increment the walker coordinates if a wall is not met Parameters ndarray of int and shape [ nw dim ] the current coordinates of the walkers move : ndarray of int and shape [ nw dim ] the vector of the next move to be made by the walker inds : array of int and shape [ nw ] the index of the wall map corresponding to the move vector
def check_wall(self, walkers, move):
        next_move = walkers + move
        if self.dim == 2:
            move_ok = self.wall_map[next_move[:, 0],
                                    next_move[:, 1]]
        elif self.dim == 3:
            move_ok = self.wall_map[next_move[:, 0],
                                    next_move[:, 1],
                                    next_move[:, 2]]
        return ~move_ok
def check_wall ( self , walkers , move ) : next_move = walkers + move if self . dim == 2 : move_ok = self . wall_map [ next_move [ : , 0 ] , next_move [ : , 1 ] ] elif self . dim == 3 : move_ok = self . wall_map [ next_move [ : , 0 ] , next_move [ : , 1 ] , next_move [ : , 2 ] ] return ~ move_ok
r'''
The walkers are an array of coordinates of the image,
the wall map is a boolean map of the image rolled in each direction.
r ' ' ' The walkers are an array of coordinates of the image the wall map is a boolean map of the image rolled in each direction .
r'''
        The walkers are an array of coordinates of the image,
        the wall map is a boolean map of the image rolled in each direction.
        directions is an array referring to the movement up or down an axis
        and is used to increment the walker coordinates if a wall is not met

        Parameters
        ----------
        walkers: ndarray of int and shape [nw, dim]
            the current coordinates of the walkers
        move: ndarray of int and shape [nw, dim]
            the vector of the next move to be made by the walker
        inds: array of int and shape [nw]
            the index of the wall map corresponding to the move vector
        '''
self
walkers
move