-
Notifications
You must be signed in to change notification settings - Fork 27
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
How to use select? #10
Comments
The select actually did work, but there was a bug in the Matrix.repr method that "renders" the object at the prompt. I'm about to push a fix and test for that. The type system has changed very rapidly in the last couple weeks, and there may be some more breakage to come.
I haven't wrapped GxB_SelectOp_new yet, it would look a lot like the
|
This works now: print(A[3].select(lib.GxB_NONZERO))
print(A.select(lib.GxB_NONZERO))
|
I've just seen your reason to leave this open:
Reopening. |
An alternative solution to implement the algorithm in #9 would be to use select. However, I could not get select working after studying the examples in
dnn.py
andK-Truss.ipynb
. So, the question in this issue is twofold.(1) How can I use basic
select
operators on vectors/matrices?Weirdly,
select
on vectors work but does not work on matrices:Maybe something's wrong with my setup? I'm running Python 3.6 which might be an issue.
(2) How can I use a UDT to define a selection function that selects the first/second half of a vector? The vector is split based on a position defined in the
thunk
value - see e.g. this C code that returns the first half of the vector:Many thanks!
The text was updated successfully, but these errors were encountered: