We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4996e19 commit 86c45f1Copy full SHA for 86c45f1
pandas/_libs/algos.pyx
@@ -217,8 +217,8 @@ def groupsort_indexer(const intp_t[:] index, Py_ssize_t ngroups):
217
This is a reverse of the label factorization process.
218
"""
219
cdef:
220
- Py_ssize_t i, loc, label, n
221
- ndarray[intp_t] indexer, where, counts
+ Py_ssize_t i, label, n
+ intp_t[::1] indexer, where, counts
222
223
counts = np.zeros(ngroups + 1, dtype=np.intp)
224
n = len(index)
@@ -241,7 +241,7 @@ def groupsort_indexer(const intp_t[:] index, Py_ssize_t ngroups):
241
indexer[where[label]] = i
242
where[label] += 1
243
244
- return indexer, counts
+ return indexer.base, counts.base
245
246
247
cdef inline Py_ssize_t swap(numeric *a, numeric *b) nogil:
0 commit comments