require they keys to be the same type as the index (so we don't
        fallback)
180425
def _convert_key(self, key, is_setter=False):
        

        # allow arbitrary setting
        if is_setter:
            return list(key)

        for ax, i in zip(self.obj.axes, key):
            if ax.is_integer():
                if not is_integer(i):
                    raise ValueError("At based indexing on an integer index "
                                     "can only have integer indexers")
            else:
                if is_integer(i) and not ax.holds_integer():
                    raise ValueError("At based indexing on an non-integer "
                                     "index can only have non-integer "
                                     "indexers")
        return key
1242258
def make_key(self, *parts):
        """"""
        separator = getattr(self.model_class, 'index_separator', '.')
        parts = map(decode, parts)
        return '%s%s' % (self._base_key, separator.join(map(str, parts)))
1029025
def check_index(self, key, *, index):
        
        self.append({
            "Verb": "check-index",
            "Key": key,
            "Index": extract_attr(index, keys=["ModifyIndex", "Index"])
        })
        return self
1070892
def normalize_string_keys(old):
    """"""
    new = {}
    for key, value in old.items():
        if isinstance(key, bytes_):
            new[key.decode('utf8')] = value
        else:
            new[key] = value
    return new
1210097
def key_type(key, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.type(key)
1257072
def ensureHashIndex(self, fields, unique = False, sparse = True, deduplicate = False) :
        """"""
        data = {
            "type" : "hash",
            "fields" : fields,
            "unique" : unique,
            "sparse" : sparse,
            "deduplicate": deduplicate
        }
        ind = Index(self, creationData = data)
        self.indexes["hash"][ind.infos["id"]] = ind
        return ind
525475
function IDBKeyRange(lower, upper, lowerOpen, upperOpen){
        if (lower !== undefined) {
            idbModules.Key.validate(lower);
        }
        if (upper !== undefined) {
            idbModules.Key.validate(upper);
        }

        this.lower = lower;
        this.upper = upper;
        this.lowerOpen = !!lowerOpen;
        this.upperOpen = !!upperOpen;
    }
2735
def _convert_scalar_indexer(self, key, kind=None):
        

        assert kind in ['ix', 'loc', 'getitem', 'iloc', None]

        # we don't allow integer/float indexing for loc
        # we don't allow float indexing for ix/getitem
        if is_scalar(key):
            is_int = is_integer(key)
            is_flt = is_float(key)
            if kind in ['loc'] and (is_int or is_flt):
                self._invalid_indexer('index', key)
            elif kind in ['ix', 'getitem'] and is_flt:
                self._invalid_indexer('index', key)

        return super()._convert_scalar_indexer(key, kind=kind)
231897
function type(key, req) {
  var type = this.getType(key, req);
  if(type === undefined) return TYPE_NAMES.NONE;
  return type
}
1303116
def index(self, key):
        
        if isinstance(key, int):
            if 0 <= key < len(self.__keys):
                return key
            raise IndexError(key)
        elif isinstance(key, str):
            try:
                return self.__keys.index(key)
            except ValueError:
                raise KeyError(key)
        else:
            raise TypeError(key)
905312
function validateIdenticialTypedKeys (keyA, keyB) {
    if (keyA && typeof keyA === 'string' && keyB && typeof keyB === 'string') {
        const keyA_CNS = (keyA.charAt(0) === COMPOSITEKEY_NS);
        const keyB_CNS = (keyB.charAt(0) === COMPOSITEKEY_NS);
        if (keyA_CNS !== keyB_CNS) {
            throw new Error(`Keys are not of the same type (composite or simple) [${keyA}] [${keyB}]`);
        }
    }
}
336606
def any_unique(keys, axis=semantics.axis_default):
    """"""
    index = as_index(keys, axis)
    return np.any(index.count == 1)
826764
function(index) {
      var that = this;

      var props = this._propIndex(index);
      if (!props) {
        return Promise.reject(new Error('No auto-indexing key specified'));
      }

      return this._dbApi.find(props).then(function(docs) {
        return that._readDoc(docs[0]);
      });
    }
177034
def all_unique(keys, axis=semantics.axis_default):
    """"""
    index = as_index(keys, axis)
    return index.groups == index.size
222060
function(list, index) {
            if ((index.type !== "Dimension") ||
                 !index.unit.isEmpty())
                    return atKey(list, index);

            list = isArray(list.value)
                ? list.value : [list];
            return list[index.value - 1];
        }
26001
function shimKeys(object) {
      var keyIndex,
          index = -1,
          props = keysIn(object),
          length = props.length,
          objLength = length && object.length,
          maxIndex = objLength - 1,
          result = [];

      var allowIndexes = typeof objLength == 'number' && objLength > 0 &&
        (isArray(object) || (support.nonEnumArgs && isArguments(object)));

      while (++index < length) {
        var key = props[index];
        if ((allowIndexes && (keyIndex = +key, keyIndex > -1 && keyIndex <= maxIndex && keyIndex % 1 == 0)) ||
            hasOwnProperty.call(object, key)) {
          result.push(key);
        }
      }
      return result;
    }
292900
function getIndex(index) {
        if (this[_privateKey]._options.keysIgnoreCase && typeof index === 'string') {
            const indexLowerCase = index.toLowerCase();
            for (const key in this[_privateKey]._schema) {
                if (typeof key === 'string' && key.toLowerCase() === indexLowerCase) {
                    return key;
                }
            }
        }

        return index;
    }