def __init__(self, coordinates, cutoff, grid_cell, integer_cell=None):
self.grid_cell = grid_cell<EOL>self.integer_cell = integer_cell<EOL>self._bins = {}<EOL>fractional = grid_cell.to_fractional(coordinates)<EOL>for i in range(len(coordinates)):<EOL><INDENT>key = tuple(fractional[i].astype(int))<EOL>if integer_cell is not None:<EOL><INDENT>key = self.wrap_key(key)<EOL><DEDENT>bin = self._bins.get(key)<EOL>if bin is None:<EOL><INDENT>bin = []<EOL>self._bins[key] = bin<EOL><DEDENT>bin.append((i, coordinates[i]))<EOL><DEDENT>if self.integer_cell is None:<EOL><INDENT>self.neighbor_indexes = grid_cell.get_radius_indexes(cutoff)<EOL><DEDENT>else:<EOL><INDENT>max_ranges = np.diag(self.integer_cell.matrix).astype(int)<EOL>max_ranges[True^self.integer_cell.active] = -<NUM_LIT:1><EOL>self.neighbor_indexes = grid_cell.get_radius_indexes(cutoff, max_ranges)<EOL><DEDENT>
Initialize a Binning object

           Arguments:
            | ``coordinates``  --  a Nx3 numpy array with coordinates to be
                                   triaged into bins
            | ``cutoff``  --  The maximum distance between coordinates pairs.
                              This affects the variable self.neighbor_bins,
                              which is a set of relative integer bin coordinates
                              that lie within the cuttof of the central bin.
            | ``grid_cell``  --  A unit cell  object specifying the size and
                                 shape of the bins

           Optional argument:
            | ``integer_cell``  --  the periodicity of the system in terms if
                                    integer grid cells.