(self, values)
return hpat_pandas_series_isin_impl
Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.isin

    Limitations
    -----------
    - This function may reveal slower performance than Pandas* on user system. Users should exercise a tradeoff
    between staying in JIT-region with that function or going back to interpreter mode.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_isin.py
       :language: python
       :lines: 27-
       :caption: Check whether values are contained in Series.
       :name: ex_series_isin

    .. command-output:: python ./series/series_isin.py
       :cwd: ../../../examples

    .. seealso::

        :ref:`DataFrame.isin <pandas.DataFrame.isin>`
            Equivalent method on DataFrame.

    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Pandas Series method :meth:`pandas.Series.isin` implementation.

    .. only:: developer
        Test: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_isin*
Intel Scalable Dataframe Compiler User Guide
    ********************************************
Intel Scalable Dataframe Compiler User Guide ********************************************
def hpat_pandas_series_isin(self, values):
    """
    Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.isin

    Limitations
    -----------
    - This function may reveal slower performance than Pandas* on user system. Users should exercise a tradeoff
    between staying in JIT-region with that function or going back to interpreter mode.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_isin.py
       :language: python
       :lines: 27-
       :caption: Check whether values are contained in Series.
       :name: ex_series_isin

    .. command-output:: python ./series/series_isin.py
       :cwd: ../../../examples

    .. seealso::

        :ref:`DataFrame.isin <pandas.DataFrame.isin>`
            Equivalent method on DataFrame.

    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Pandas Series method :meth:`pandas.Series.isin` implementation.

    .. only:: developer
        Test: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_isin*
    """

    _func_name = 'Method isin().'

    ty_checker = TypeChecker(_func_name)
    ty_checker.check(self, SeriesType)

    if not isinstance(values, (types.Set, types.List)):
        ty_checker.raise_exc(values, 'set or list', 'values')

    if isinstance(values.dtype, (types.UnicodeType, types.StringLiteral)):
        def hpat_pandas_series_isin_impl(self, values):
            # TODO: replace with below line when Numba supports np.isin in nopython mode
            # return pandas.Series (np.isin (self._data, values))

            values = str_list_to_array(list(values))
            values = build_set(values)
            data_len = len(self._data)
            result = numpy.empty(data_len, dtype=numpy.bool_)
            for i in prange(data_len):
                result[i] = self._data[i] in values

            return pandas.Series(data=result, index=self._index, name=self._name)
    else:
        def hpat_pandas_series_isin_impl(self, values):
            # TODO: replace with below line when Numba supports np.isin in nopython mode
            # return pandas.Series (np.isin (self._data, values))

            values = build_set(values)
            data_len = len(self._data)
            result = numpy.empty(data_len, dtype=numpy.bool_)
            for i in prange(data_len):
                result[i] = self._data[i] in values

            return pandas.Series(data=result, index=self._index, name=self._name)

    return hpat_pandas_series_isin_impl
def hpat_pandas_series_isin ( self , values ) : _func_name = 'Method isin().' ty_checker = TypeChecker ( _func_name ) ty_checker . check ( self , SeriesType ) if not isinstance ( values , ( types . Set , types . List ) ) : ty_checker . raise_exc ( values , 'set or list' , 'values' ) if isinstance ( values . dtype , ( types . UnicodeType , types . StringLiteral ) ) : def hpat_pandas_series_isin_impl ( self , values ) : # TODO: replace with below line when Numba supports np.isin in nopython mode # return pandas.Series (np.isin (self._data, values)) values = str_list_to_array ( list ( values ) ) values = build_set ( values ) data_len = len ( self . _data ) result = numpy . empty ( data_len , dtype = numpy . bool_ ) for i in prange ( data_len ) : result [ i ] = self . _data [ i ] in values return pandas . Series ( data = result , index = self . _index , name = self . _name ) else : def hpat_pandas_series_isin_impl ( self , values ) : # TODO: replace with below line when Numba supports np.isin in nopython mode # return pandas.Series (np.isin (self._data, values)) values = build_set ( values ) data_len = len ( self . _data ) result = numpy . empty ( data_len , dtype = numpy . bool_ ) for i in prange ( data_len ) : result [ i ] = self . _data [ i ] in values return pandas . Series ( data = result , index = self . _index , name = self . _name ) return hpat_pandas_series_isin_impl