diff --git a/pandas/_libs/sparse.pyx b/pandas/_libs/sparse.pyx index 134883e159407..2adf55fbc91d8 100644 --- a/pandas/_libs/sparse.pyx +++ b/pandas/_libs/sparse.pyx @@ -229,45 +229,6 @@ cdef class IntIndex(SparseIndex): results[mask] = res return results - cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, - float64_t fill_value, SparseIndex other_): - cdef: - Py_ssize_t i = 0, j = 0 - IntIndex other - ndarray[float64_t, ndim=1] result - ndarray[int32_t, ndim=1] sinds, oinds - - other = other_.to_int_index() - - oinds = other.indices - sinds = self.indices - - result = np.empty(other.npoints, dtype=np.float64) - result[:] = fill_value - - for i in range(other.npoints): - while oinds[i] > sinds[j] and j < self.npoints: - j += 1 - - if j == self.npoints: - break - - if oinds[i] < sinds[j]: - continue - elif oinds[i] == sinds[j]: - result[i] = values[j] - j += 1 - - return result - - cpdef put(self, ndarray[float64_t, ndim=1] values, - ndarray[int32_t, ndim=1] indices, object to_put): - pass - - cpdef take(self, ndarray[float64_t, ndim=1] values, - ndarray[int32_t, ndim=1] indices): - pass - cpdef get_blocks(ndarray[int32_t, ndim=1] indices): cdef: @@ -585,38 +546,6 @@ cdef class BlockIndex(SparseIndex): cum_len += lens[j] return results - cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, - float64_t fill_value, SparseIndex other_): - cdef: - Py_ssize_t i = 0, j = 0, ocur, ocurlen - BlockIndex other - ndarray[float64_t, ndim=1] result - ndarray[int32_t, ndim=1] slocs, slens, olocs, olens - - other = other_.to_block_index() - - olocs = other.blocs - olens = other.blengths - slocs = self.blocs - slens = self.blengths - - result = np.empty(other.npoints, dtype=np.float64) - - for i in range(other.nblocks): - ocur = olocs[i] - ocurlen = olens[i] - - while slocs[j] + slens[j] < ocur: - j += 1 - - cpdef put(self, ndarray[float64_t, ndim=1] values, - ndarray[int32_t, ndim=1] indices, object to_put): - pass - - cpdef take(self, ndarray[float64_t, ndim=1] values, - ndarray[int32_t, ndim=1] indices): - pass - @cython.internal cdef class BlockMerge: