Skip to content
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

[Sparse] Add sparse matrix slicing operator implementation #6208

Merged
merged 31 commits into from
Sep 5, 2023
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
87448c8
Fix description and not emplement error.
xiangyuzhi Aug 23, 2023
83d060d
Fix description and not emplement error.
xiangyuzhi Aug 23, 2023
ead3874
merge API to one 'select'
xiangyuzhi Aug 28, 2023
9a6cd71
fix
xiangyuzhi Aug 29, 2023
35f6d6e
fix typecheck
xiangyuzhi Aug 29, 2023
6f3f1ee
update comments
xiangyuzhi Aug 29, 2023
7975131
fix type error
xiangyuzhi Aug 29, 2023
9ba1046
Update python/dgl/sparse/sparse_matrix.py
xiangyuzhi Aug 29, 2023
2564ddb
try to fix CI error
xiangyuzhi Aug 29, 2023
22f0daa
Update python/dgl/sparse/sparse_matrix.py
xiangyuzhi Aug 29, 2023
758ecc4
fix comment and CI
xiangyuzhi Aug 29, 2023
f4ce204
fix comments and CI
xiangyuzhi Aug 29, 2023
2f8b625
split API
xiangyuzhi Aug 29, 2023
710fb9f
fix CI
xiangyuzhi Aug 29, 2023
24e04cc
fix input type
xiangyuzhi Aug 30, 2023
94b296b
fix description
xiangyuzhi Aug 30, 2023
2289369
Add one row slice implement
xiangyuzhi Aug 25, 2023
14bc4c0
add col and unit test
xiangyuzhi Aug 28, 2023
eb37ecc
little fix
xiangyuzhi Aug 28, 2023
b792fd9
New API implementation
xiangyuzhi Aug 29, 2023
6613c37
fix description
xiangyuzhi Aug 29, 2023
0891d60
update new API
xiangyuzhi Aug 30, 2023
84dc943
fix update
xiangyuzhi Aug 30, 2023
2084dc0
fix bug and extend test
xiangyuzhi Sep 2, 2023
9d1f1bd
fix urange select
xiangyuzhi Sep 2, 2023
fd3a735
concise code and extend test
xiangyuzhi Sep 4, 2023
957f771
lint fix
xiangyuzhi Sep 4, 2023
1ddf91a
optimize code and change test
xiangyuzhi Sep 4, 2023
7caa5e5
add coo test and remove coo slice
xiangyuzhi Sep 5, 2023
822b21f
fix comments
xiangyuzhi Sep 5, 2023
539122c
add comment
xiangyuzhi Sep 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add comment
  • Loading branch information
xiangyuzhi committed Sep 5, 2023
commit 539122ce4d1393de4be09961d1b7361ef573c1e0
4 changes: 3 additions & 1 deletion python/dgl/sparse/sparse_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,9 @@ def range_select(self, dim: int, index: slice):
raise ValueError("The selection dimension should be 0 or 1.")
if isinstance(index, slice):
if index.step not in (None, 1):
raise NotImplementedError
raise NotImplementedError(
"Slice with step other than 1 are not supported yet."
)
start = 0 if index.start is None else index.start
end = index.stop
frozenbugs marked this conversation as resolved.
Show resolved Hide resolved
return SparseMatrix(
Expand Down