-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
ENH add hash based unique #26018
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 add hash based unique #26018
Changes from 1 commit
2933930
8da2e72
961ef5b
a6b1847
1f1c36c
0bc43c3
f94cf89
a37b151
8f42b0b
f56634f
bce7534
0c6c588
9b7d6f6
85cf692
3db3349
8d4b6be
9e7d671
a4e8a29
6a8c69c
0c3b889
cc39a50
92adb26
8b7ad2e
8f95240
1d0c596
ed4ea89
8adbf70
a8e69ff
cdf3af9
fc1d50e
5dbdf48
c8b9d22
a9df742
5333e80
3bb7c97
95a577b
724b794
1abc6b5
214cd06
8c184ab
113e021
c733f75
ae0e936
b50e7f3
712a5cf
8a45f04
4999daa
ab86574
08d7d62
e1e2ddf
f96411a
2319947
e188bf3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4588,8 +4588,8 @@ static struct PyMethodDef array_module_methods[] = { | |
| "Give a warning on reload and big warning in sub-interpreters."}, | ||
| {"from_dlpack", (PyCFunction)from_dlpack, | ||
| METH_FASTCALL | METH_KEYWORDS, NULL}, | ||
| {"unique_hash", (PyCFunction)PyArray_Unique, METH_VARARGS, | ||
| "Collect unique values via a hash map."}, | ||
| {"unique_hash", (PyCFunction)array_unique, | ||
adrinjalali marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| METH_VARARGS, "Collect unique values via a hash map."}, | ||
|
||
| {NULL, NULL, 0, NULL} /* sentinel */ | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we okay with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose so. It protects us from not catching exceptions though, so if you can do it targeted that would be nice.
I'll assume that
std::noexceptisn't enough because the map resizes and there is likely no "noexcept" version for that.(But if you have to do this, I think it shows that we need a "catch all" that converts memory error correctly, similar to the FFT code.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's now a separate static lib build for it with the right flags.