# Buggy code
def drop(self, labels, axis=0, level=None, inplace=False, errors="raise"):
    """
    Return new object with labels in requested axis removed.

    Parameters
    ----------
    labels : single label or list-like
    axis : int or axis name
    level : int or level name, default None
        For MultiIndex
    inplace : bool, default False
        If True, do operation inplace and return None.
    errors : {'ignore', 'raise'}, default 'raise'
        If 'ignore', suppress error and existing labels are dropped.

        .. versionadded:: 0.16.1

    Returns
    -------
    dropped : type of caller
    """
    inplace = validate_bool_kwarg(inplace, "inplace")
    axis = self._get_axis_number(axis)
    axis_name = self._get_axis_name(axis)
    axis, axis_ = self._get_axis(axis), axis

    if axis.is_unique:
        if level is not None:
            if not isinstance(axis, MultiIndex):
                raise AssertionError("axis must be a MultiIndex")
            new_axis = axis.drop(labels, level=level, errors=errors)
        else:
            new_axis = axis.drop(labels, errors=errors)
        dropped = self.reindex(**{axis_name: new_axis})
        try:
            dropped.axes[axis_].set_names(axis.names, inplace=True)
        except AttributeError:
            pass
        result = dropped

    else:
        labels = com._index_labels_to_array(labels)
        if level is not None:
            if not isinstance(axis, MultiIndex):
                raise AssertionError("axis must be a MultiIndex")
            indexer = ~axis.get_level_values(level).isin(labels)
        else:
            indexer = ~axis.isin(labels)

        slicer = [slice(None)] * self.ndim
        slicer[self._get_axis_number(axis_name)] = indexer

        result = self.loc[tuple(slicer)]

    if inplace:
        self._update_inplace(result)
    else:
        return result


# Traceback (ValueError)
In [2]: pd.DataFrame([[1,2], [3,4], [5,6]], index=['a','a','b']).drop(['a'])
Out[2]:
0  1
b  5  6

In [3]: pd.DataFrame([[1,2], [3,4], [5,6]], index=['a','a','b']).drop(['b'])
Out[3]:
0  1
a  1  2
a  3  4

In [4]: pd.DataFrame([[1,2], [3,4], [5,6]], index=['a','a','b']).drop([])
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-4-ae217de2434b> in <module>()
----> 1 pd.DataFrame([[1,2], [3,4], [5,6]], index=['a','a','b']).drop([])

/home/pietro/.local/lib/python3.5/site-packages/pandas/core/generic.py in drop(self, labels, axis, level, inplace, errors)
2063                 indexer = ~axis.get_level_values(level).isin(labels)
2064             else:
-> 2065                 indexer = ~axis.isin(labels)
2066
2067             slicer = [slice(None)] * self.ndim

/home/pietro/.local/lib/python3.5/site-packages/pandas/core/indexes/base.py in isin(self, values, level)
2766         if level is not None:
2767             self._validate_index_level(level)
-> 2768         return algos.isin(np.array(self), values)
2769
2770     def _can_reindex(self, indexer):

/home/pietro/.local/lib/python3.5/site-packages/pandas/core/algorithms.py in isin(comps, values)
419             comps = comps.astype(object)
420
--> 421     return f(comps, values)
422
423

/home/pietro/.local/lib/python3.5/site-packages/pandas/core/algorithms.py in <lambda>(x, y)
397     # work-around for numpy < 1.8 and comparisions on py3
398     # faster for larger cases to use np.in1d
--> 399     f = lambda x, y: htable.ismember_object(x, values)
400     if (_np_version_under1p8 and compat.PY3) or len(comps) > 1000000:
401         f = lambda x, y: np.in1d(x, y)

/home/pietro/nobackup/repo/pandas/pandas/_libs/hashtable_func_helper.pxi in pandas._libs.hashtable.ismember_object (pandas/_libs/hashtable.c:29677)()

ValueError: Buffer dtype mismatch, expected 'Python object' but got 'double'

# Fixed code
def drop(self, labels, axis=0, level=None, inplace=False, errors="raise"):
    """
    Return new object with labels in requested axis removed.

    Parameters
    ----------
    labels : single label or list-like
    axis : int or axis name
    level : int or level name, default None
        For MultiIndex
    inplace : bool, default False
        If True, do operation inplace and return None.
    errors : {'ignore', 'raise'}, default 'raise'
        If 'ignore', suppress error and existing labels are dropped.

        .. versionadded:: 0.16.1

    Returns
    -------
    dropped : type of caller
    """
    inplace = validate_bool_kwarg(inplace, "inplace")
    axis = self._get_axis_number(axis)
    axis_name = self._get_axis_name(axis)
    axis, axis_ = self._get_axis(axis), axis

    if axis.is_unique:
        if level is not None:
            if not isinstance(axis, MultiIndex):
                raise AssertionError("axis must be a MultiIndex")
            new_axis = axis.drop(labels, level=level, errors=errors)
        else:
            new_axis = axis.drop(labels, errors=errors)
        dropped = self.reindex(**{axis_name: new_axis})
        try:
            dropped.axes[axis_].set_names(axis.names, inplace=True)
        except AttributeError:
            pass
        result = dropped

    else:
        labels = _ensure_object(com._index_labels_to_array(labels))
        if level is not None:
            if not isinstance(axis, MultiIndex):
                raise AssertionError("axis must be a MultiIndex")
            indexer = ~axis.get_level_values(level).isin(labels)
        else:
            indexer = ~axis.isin(labels)

        slicer = [slice(None)] * self.ndim
        slicer[self._get_axis_number(axis_name)] = indexer

        result = self.loc[tuple(slicer)]

    if inplace:
        self._update_inplace(result)
    else:
        return result