What is the correct way of constructing a pytorch sparse matrix from a numpy coo matrix?
Right now I am doing it as so:

i = np.vstack((Ytest.row, Ytest.col))
v = np.ones(len(i[0]))
i = torch.from_numpy(i.astype(“int64”))
v = torch.from_numpy(v.astype(“float32”))
tSparse = torch.sparse.FloatTensor(i, v)