-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I found that the method you provided for downloading the dataset no longer seems to be available. I'm curious whether using my own data and converting it to the .npz format required by FlashSparse in this way would be reasonable. Or do you have a better script for converting from .mtx to .npz?
Besides, FlashSparse doesn't seem to support non-square matrix?
import argparse
import numpy as np
from scipy.io import mmread
from scipy.sparse import coo_matrix
coo = mmread(xxx.mtx)
row = coo.row
col = coo.col
num_edges = coo.nnz
num_nodes_src = coo.shape[0]
num_nodes_dst = coo.shape[1]
data_dict = {
'num_nodes_src': np.array(num_nodes_src, dtype=np.int32),
'num_nodes_dst': np.array(num_nodes_dst, dtype=np.int32),
'num_edges': np.array(num_edges, dtype=np.int32),
'src_li': row.astype(np.int32),
'dst_li': col.astype(np.int32)
}
np.savez(xxx.npz, **data_dict)
Metadata
Metadata
Assignees
Labels
No labels