Build the secondary indices of this object
345173
def __update_indices
      model.indices.values.each do |index|
        __robject.indexes[index.riak_name] = index.value_from(attributes)
      end
    end
783618
def atIndices(indexable, indices, default=__unique):
    
    """
    if default is __unique:
        return [indexable[i] for i in indices]
    else:
        res = []
        for i in indices:
            try:
                res.append(indexable[i])
            except (IndexError, KeyError):
                res.append(default)
        return res
488711
def spin_sx(self):
        """"""
        return conversions.secondary_spin(self.mass1, self.mass2, self.spin1x,
                                        self.spin2x)
116606
def pairwise_indices(self):
        """"""
        return np.array([sig.pairwise_indices for sig in self.values]).T
784299
def hidden_indices(self):
        """"""
        return tuple(sorted(set(self.micro_indices) -
                            set(self.output_indices)))
597694
def build(self, obj=None, queryset=None, push=True):
        
        for index in self.indexes:
            index.build(obj, queryset, push)
69158
function()
  {
    this.indices = {};

    for (var i = 0, l = this.keys.length; i < l; i++)
    {
      this.indices[ this.keys[ i ] ] = i;
    }

    return this;
  }
870504
def _transform_indices(self, key):
        
        ndims = self.ndims
        if all(not (isinstance(el, slice) or callable(el)) for el in key):
            dim_inds = []
            for dim in self.kdims:
                dim_type = self.get_dimension_type(dim)
                if isinstance(dim_type, type) and issubclass(dim_type, Number):
                    dim_inds.append(self.get_dimension_index(dim))
            str_keys = iter(key[i] for i in range(self.ndims)
                            if i not in dim_inds)
            num_keys = []
            if len(dim_inds):
                keys = list({tuple(k[i] if ndims > 1 else k for i in dim_inds)
                             for k in self.keys()})
                q = np.array([tuple(key[i] if ndims > 1 else key for i in dim_inds)])
                idx = np.argmin([np.inner(q - np.array(x), q - np.array(x))
                                 if len(dim_inds) == 2 else np.abs(q-x)
                                     for x in keys])
                num_keys = iter(keys[idx])
            key = tuple(next(num_keys) if i in dim_inds else next(str_keys)
                        for i in range(self.ndims))
        elif any(not (isinstance(el, slice) or callable(el)) for el in key):
            keys = self.keys()
            for i, k in enumerate(key):
                if isinstance(k, slice):
                    continue
                dim_keys = np.array([ke[i] for ke in keys])
                if dim_keys.dtype.kind in 'OSU':
                    continue
                snapped_val = dim_keys[np.argmin(np.abs(dim_keys-k))]
                key = list(key)
                key[i] = snapped_val
            key = tuple(key)
        return key
1346189
def with_indices(*args):
    '''
    
    '''
    def decorator(cls):
        for c in cls.__bases__:
            if hasattr(c, '_indicesNames'):
                cls._classnameIndex = c._classnameIndex + 1
                for i in range(0, cls._classnameIndex):
                    setattr(cls, '_classname' + str(i), getattr(c, '_classname' + str(i)))
                setattr(cls, '_classname' + str(cls._classnameIndex), cls._getTypename())
                cls._indicesNames = c._indicesNames + ('_classname' + str(cls._classnameIndex),) + args
                cls._generateTemplate()
                return cls
        cls._classnameIndex = -1
        cls._indicesNames = args
        cls._generateTemplate()
        return cls
    return decorator
198474
def getIndices(self):
        """"""
        for indexName in self.neograph.nodes.indexes.keys():
            indexObject = self.neograph.nodes.indexes.get(indexName)
            yield Index(indexName, "vertex", "manual", indexObject)
        for indexName in self.neograph.relationships.indexes.keys():
            indexObject = self.neograph.relationships.indexes.get(indexName)
            yield Index(indexName, "edge", "manual", indexObject)
692652
def _secondary_values(self):
        """"""
        return [
            val for serie in self.secondary_series for val in serie.values
            if val is not None
        ]
657146
def getBigIndexFromIndices(self, indices):
        
        return reduce(operator.add, [self.dimProd[i]*indices[i]
                                     for i in range(self.ndims)], 0)
923058
def add_indices(indices)
      raise ArgumentError, "Invalid argument 'indices'. Expected Array/NArray, got #{indices.class}." unless [NArray, Array].include?(indices.class)
      raise ArgumentError, "Invalid argument 'indices'. Expected Array to contain only integers, got #{indices.collect{|i| i.class}.uniq}." if indices.is_a?(Array) and not indices.collect{|i| i.class}.uniq == [Fixnum]
      indices = indices.to_a if indices.is_a?(NArray)
      @indices += indices
    end
377830
def _pre_compute_secondary(self, positive_vals, negative_vals):
        """"""
        self._secondary_min = (
            negative_vals and min(min(negative_vals), self.zero)
        ) or self.zero
        self._secondary_max = (
            positive_vals and max(max(positive_vals), self.zero)
        ) or self.zero
820063
def indices(self, data):
        '''
        '''
        duration = self.data_duration(data)

        for start in range(0, duration - self.duration, self.stride):
            yield start
481806
def _make_indices(self, Ns):
        '''  '''
        N_new = int(Ns * self.n_splits)

        test = [np.full(N_new, False) for i in range(self.n_splits)]
        for i in range(self.n_splits):
            test[i][np.arange(Ns * i, Ns * (i + 1))] = True
        train = [np.logical_not(test[i]) for i in range(self.n_splits)]

        test = [np.arange(N_new)[test[i]] for i in range(self.n_splits)]
        train = [np.arange(N_new)[train[i]] for i in range(self.n_splits)]

        cv = list(zip(train, test))
        return cv
596241
private function buildIndexes() {
        $indexes = array();
        /** @var ResultSet $results */
        $results = $this->getConfiguration()->getConnection()->query('SHOW INDEX FROM `' . $this->getTableName() . '`');
        while($result = $results->fetch()) {
            $result = (object)$result;
            if(!array_key_exists($result->Key_name, $indexes)) {
                $indexes[$result->Key_name] = new Index();
            }
            /** @var Index $index */
            $index = $indexes[$result->Key_name];
            $index->setUnique(!$result->Non_unique);
            $index->addColumn($result->Column_name);
            $index->setPrimary($result->Key_name == 'PRIMARY');
        }
        $this->setIndexes($indexes);
    }