def where(self, inplace=False, **kwargs):
        """Return indices over every dimension that met the conditions. 
        
        Condition syntax:
        
        *attribute* = value
        
        Return indices that satisfy the condition where the attribute is equal
        to the value
        
        e.g. type_array = 'H'
        
        *attribute* = list(value1, value2)
        
        Return indices that satisfy the condition where the attribute is equal 
        to any of the value in the list.
        
        e.g. type_array = ['H', 'O']
        
        *dimension_index* = value: int
        *dimension_index* = value: list(int)
        
        Return only elements that correspond to the index in the specified dimension:
        
        atom_index = 0
        atom_index = [0, 1]
        
        
        """
        masks = {k: np.ones(v, dtype='bool') for k,v in self.dimensions.items()} 
        
        def index_to_mask(index, n):
            val = np.zeros(n, dtype='bool')
            val[index] = True
            return val
        
        def masks_and(dict1, dict2):
            return {k: dict1[k] & index_to_mask(dict2[k], len(dict1[k])) for k in dict1 }
        
        for key in kwargs:
            value = kwargs[key]
            if key.endswith('_index'):
                if isinstance(value, int):
                    value = [value]
                
                dim = key[:-len('_index')]
                m = self._propagate_dim(value, dim)
                masks = masks_and(masks, m)
            else:
                attribute = self.get_attribute(key)
                
                if isinstance(value, list):
                    mask = reduce(operator.or_, [attribute.value == m for m in value])
                else:
                    mask = attribute.value == value
            
                m = self._propagate_dim(mask, attribute.dim)
                masks = masks_and(masks, m)
        
        return masks