automatically download nonzero datatype metadata
This commit is contained in:
17
lib/matrix.py
Normal file
17
lib/matrix.py
Normal file
@@ -0,0 +1,17 @@
|
||||
class Matrix:
|
||||
def __init__(self, group, name, dtype, nrows, ncols, nnz):
|
||||
self.group = group
|
||||
self.name = name
|
||||
self.dtype = dtype
|
||||
self.nrows = int(nrows)
|
||||
self.ncols = int(ncols)
|
||||
self.nnz = int(nnz)
|
||||
|
||||
def to_tuple(self):
|
||||
return (self.group, self.name, self.dtype, self.nrows, self.ncols, self.nnz)
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self.to_tuple())
|
||||
|
||||
def url(self):
|
||||
return "/".join(("https://sparse.tamu.edu", "MM", self.group, self.name + ".tar.gz"))
|
Reference in New Issue
Block a user