Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
7a2dd5ae
Unverified
Commit
7a2dd5ae
authored
Jan 20, 2023
by
Hongzhi (Steve), Chen
Committed by
GitHub
Jan 20, 2023
Browse files
32 (#5216)
Co-authored-by:
Steve
<
ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal
>
parent
17fad103
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
python/dgl/sparse/diag_matrix.py
python/dgl/sparse/diag_matrix.py
+3
-3
python/dgl/sparse/sparse_matrix.py
python/dgl/sparse/sparse_matrix.py
+3
-3
No files found.
python/dgl/sparse/diag_matrix.py
View file @
7a2dd5ae
...
...
@@ -237,8 +237,8 @@ class DiagMatrix:
return
self
.
to
(
device
=
"cpu"
)
def
float
(
self
):
"""Converts the matrix values to float data type. If the matrix
already
uses float data type, the original matrix will be returned.
"""Converts the matrix values to float
32
data type. If the matrix
already
uses float data type, the original matrix will be returned.
Returns
-------
...
...
@@ -277,7 +277,7 @@ class DiagMatrix:
return
self
.
to
(
dtype
=
torch
.
double
)
def
int
(
self
):
"""Converts the matrix values to int data type. If the matrix already
"""Converts the matrix values to int
32
data type. If the matrix already
uses int data type, the original matrix will be returned.
Returns
...
...
python/dgl/sparse/sparse_matrix.py
View file @
7a2dd5ae
...
...
@@ -324,8 +324,8 @@ class SparseMatrix:
return
self
.
to
(
device
=
"cpu"
)
def
float
(
self
):
"""Converts the matrix values to float data type. If the matrix
already
uses float data type, the original matrix will be returned.
"""Converts the matrix values to float
32
data type. If the matrix
already
uses float data type, the original matrix will be returned.
Returns
-------
...
...
@@ -371,7 +371,7 @@ class SparseMatrix:
return
self
.
to
(
dtype
=
torch
.
double
)
def
int
(
self
):
"""Converts the matrix values to int data type. If the matrix already
"""Converts the matrix values to int
32
data type. If the matrix already
uses int data type, the original matrix will be returned.
Returns
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment