dgl.sparse.DiagMatrix.long¶
-
DiagMatrix.
long
()[source]¶ Converts the matrix values to long data type. If the matrix already uses long data type, the original matrix will be returned.
- Returns
The matrix with long values
- Return type
Examples
>>> val = torch.ones(2) >>> D = dglsp.diag(val) >>> D.long() DiagMatrix(values=tensor([1, 1]), shape=(2, 2))