def match(to_match, values, na_sentinel=-<NUM_LIT:1>):
values = com.asarray_tuplesafe(values)<EOL>htable, _, values, dtype, ndtype = _get_hashtable_algo(values)<EOL>to_match, _, _ = _ensure_data(to_match, dtype)<EOL>table = htable(min(len(to_match), <NUM_LIT>))<EOL>table.map_locations(values)<EOL>result = table.lookup(to_match)<EOL>if na_sentinel != -<NUM_LIT:1>:<EOL><INDENT>from pandas import Series<EOL>result = Series(result.ravel()).replace(-<NUM_LIT:1>, na_sentinel)<EOL>result = result.values.reshape(result.shape)<EOL><DEDENT>return result<EOL>
Compute locations of to_match into values

Parameters
----------
to_match : array-like
    values to find positions of
values : array-like
    Unique set of values
na_sentinel : int, default -1
    Value to mark "not found"

Examples
--------

Returns
-------
match : ndarray of integers