-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] doc whether renumber preserves edge order #922
Comments
FYI - it does preserve the ordering. I am updating this code in 0.15, I will add this to the documentation. |
Let me change my answer. In version 0.14 and prior single column integer renumbering preserved ordering. Single column non-integer and Multi column renumbering did not guarantee that the order was preserved. The new renumbering in 0.15 does not guarantee to preserve ordering of the input. This is documented in the new python API methods. If ordering matters, you can add an extra column to the input Dataframe numbering the rows. The output of the 0.15 numbering is always a data frame and preserves the contents of the original Dataframe that aren't part of the source or destination definitions. You can then use sort_values on the extra column you added to reconstruct the original order. I considered making that part of the implementation, but sorting is expensive and in most cases unnecessary. |
Maybe make cc @kkraus14 as you felt the pain of tickets stemming from similar design decisions here in cudf My reasoning:
|
Makes sense. I will evaluate the mechanics of doing this and update the PR accordingly. |
Describe the solution you'd like
Docs clarify whether renumbering preserves edge orders.
(Ideally they do, because this simplifies then plugging in different edge weights without manually swizzling.)
Additional context
Encountered in various
renumber
calls in 0.13, e.g.:https://docs.rapids.ai/api/cugraph/stable/api.html?highlight=renumber#cugraph.structure.renumber.renumber_from_cudf
The text was updated successfully, but these errors were encountered: