Return the integer index of *series* in this sequence.
19697
def series_index(self, series):
        
        for idx, s in enumerate(self):
            if series is s:
                return idx
        raise ValueError('series not in chart data object')
184544
def _validate_series_dtype(self, series: pd.Series) -> pd.Series:
        """"""
        return series.apply(lambda i: isinstance(i, self.dtype))
1125056
def get_ftype_counts(self):
        
        if hasattr(self, "ftype"):
            return pandas.Series({self.ftype: 1})
        return self.ftypes.value_counts().sort_index()
1165015
public int getIndex(String feature)
	{
		//logger.debug("FeatureIndex.get : " + feature + "(" + count + ")");
		Integer index = (Integer) map.get(feature);

		if (index == null)
			return -1;

		return index.intValue();
	}
442713
def series(self) -> InfoArray:
        """"""
        if self.diskflag:
            array = self._load_int()
        elif self.ramflag:
            array = self.__get_array()
        else:
            raise AttributeError(
                f'Sequence {objecttools.devicephrase(self)} is not requested '
                f'to make any internal data available to the user.')
        return InfoArray(array, info={'type': 'unmodified'})
538444
def tuple_index(self, n):
        ''''''
        return n.args and n.args[-1].type == 'index' and general_type(n.args[-1].sequence.pseudo_type) == 'Tuple' and\
               n.args[-1].index.type == 'int' and\
               (n.args[-1].index.value == -1 or n.args[-1].index.value == len(n.args[-1].sequence.pseudo_type) - 2)
809173
def get_index(self):
        '''  '''
        ifreq = struct.pack('16si', self.name, 0)
        res = fcntl.ioctl(sockfd, SIOCGIFINDEX, ifreq)
        return struct.unpack("16si", res)[1]
694576
public int indexOfRelativeIndex(int relativeIndex) {
    for (int i = 0; i < relativeIndices.length; i++) {
      if (relativeIndices[i] == relativeIndex) {
        return i;
      }
    }
    return -1;
  }
1048746
def _values(self):
        """"""
        return [
            val[1] for serie in self.series for val in
            (serie.interpolated if self.interpolate else serie.points)
            if val[1] is not None and (not self.logarithmic or val[1] > 0)
        ]
1241428
def _get_index(n_items, item_size, n):
    """"""
    index = np.arange(n_items)
    index = np.repeat(index, item_size)
    index = index.astype(np.float64)
    assert index.shape == (n,)
    return index
1310775
def get_series_by_name(self, name):
        """"""

        if not isinstance(name, str):
            raise TypeError(
             "Can only search series by str name, not '%s'" % str(name)
            )
        for series in self.all_series():
            if series.name() == name:
                return series
524428
private static int index(Object o) {
        Integer i = TYPE_INDICES.get(o);
        if (i == null) {
            synchronized (TYPE_INDICES) {
                // check that another thread did not already update the index
                i = TYPE_INDICES.get(o);
                if (i != null)
                    return i;
                else {
                    int j = TYPE_INDICES.size();
                    TYPE_INDICES.put(o, j);
                    TYPES.add(o);
                    return j;
                }
            }
        }
        return i;
    }
734801
def get_series(self, key):
        """"""

        url = make_series_url(key)
        resp = self.session.get(url)
        return resp
230181
def sequenceToWord(sequence):
    
    reberString = ''
    for i in xrange(len(sequence)):
        index = np.where(sequence[i]==1.)[0][0]
        reberString += chars[index]
    return reberString
941712
def next_index(self) -> int:
        """"""
        return bisect.bisect_right(self.totals, random.random() * self.total)
120109
def to_series(self):
        
        return pandas.Series(
            self.cdf, index=[numpy.nan] + list(self.bin_edges) + [numpy.nan])
318497
def get_list_index(lst, index_or_name):
    
    if isinstance(index_or_name, six.integer_types):
        return index_or_name

    return lst.index(index_or_name)