Unverified Commit 7a2dd5ae authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files
parent 17fad103
...@@ -237,8 +237,8 @@ class DiagMatrix: ...@@ -237,8 +237,8 @@ class DiagMatrix:
return self.to(device="cpu") return self.to(device="cpu")
def float(self): def float(self):
"""Converts the matrix values to float data type. If the matrix already """Converts the matrix values to float32 data type. If the matrix
uses float data type, the original matrix will be returned. already uses float data type, the original matrix will be returned.
Returns Returns
------- -------
...@@ -277,7 +277,7 @@ class DiagMatrix: ...@@ -277,7 +277,7 @@ class DiagMatrix:
return self.to(dtype=torch.double) return self.to(dtype=torch.double)
def int(self): def int(self):
"""Converts the matrix values to int data type. If the matrix already """Converts the matrix values to int32 data type. If the matrix already
uses int data type, the original matrix will be returned. uses int data type, the original matrix will be returned.
Returns Returns
......
...@@ -324,8 +324,8 @@ class SparseMatrix: ...@@ -324,8 +324,8 @@ class SparseMatrix:
return self.to(device="cpu") return self.to(device="cpu")
def float(self): def float(self):
"""Converts the matrix values to float data type. If the matrix already """Converts the matrix values to float32 data type. If the matrix
uses float data type, the original matrix will be returned. already uses float data type, the original matrix will be returned.
Returns Returns
------- -------
...@@ -371,7 +371,7 @@ class SparseMatrix: ...@@ -371,7 +371,7 @@ class SparseMatrix:
return self.to(dtype=torch.double) return self.to(dtype=torch.double)
def int(self): def int(self):
"""Converts the matrix values to int data type. If the matrix already """Converts the matrix values to int32 data type. If the matrix already
uses int data type, the original matrix will be returned. uses int data type, the original matrix will be returned.
Returns Returns
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment