def pd_fix_indexes_take_impl(self, indexes): if index_api_supported == True: # noqa res = self.take(indexes) else: res = numpy_like.take(self, indexes) return res
def sdc_reindex_series_impl(arr, index, name, by_index): _, new_order = index.reindex(by_index) if new_order is not None: new_order_as_array = _nonoptional(new_order) index_mismatch = 0 for i in numba.prange(len(by_index)): if new_order_as_array[i] == -1: index_mismatch += 1 if index_mismatch: # TO-DO: seems it covers only specific series reindex case, generalize? msg = "Unalignable boolean Series provided as indexer " + \ "(index of the boolean Series and of the indexed object do not match)." raise IndexingError(msg) res_data = numpy_like.take(arr, new_order_as_array) else: res_data = arr return pandas.Series(data=res_data, index=by_index, name=name)
def pd_int64_index_take_impl(self, indexes): _indexes = indexes.values if convert_target == True else indexes # noqa new_index_data = numpy_like.take(self._data, _indexes) return pd.Int64Index(new_index_data, name=self._name)
def pd_int64_index_take_chunked_impl(self, indexes): new_index_data = numpy_like.take(self.values, indexes) return pd.Int64Index(new_index_data, name=self._name)
def sdc_func(arr, index): return numpy_like.take(arr, index)