Get Started
Advanced Materials
API Reference
Notes
Misc
DiagMatrix.
float
Converts the matrix values to float32 data type. If the matrix already uses float data type, the original matrix will be returned.
The matrix with float values
DiagMatrix
Examples
>>> val = torch.ones(2) >>> D = dglsp.diag(val) >>> D.float() DiagMatrix(values=tensor([1., 1.]), shape=(2, 2))