Commit ecb8c688 authored by rusty1s's avatar rusty1s
Browse files

build wheels

parent 0b9019dd
...@@ -487,22 +487,21 @@ def __repr__(self: SparseTensor) -> str: ...@@ -487,22 +487,21 @@ def __repr__(self: SparseTensor) -> str:
i = ' ' * 6 i = ' ' * 6
row, col, value = self.coo() row, col, value = self.coo()
infos = [] infos = []
infos += ['row={}'.format(indent(row.__repr__(), i)[len(i):])] infos += [f'row={indent(row.__repr__(), i)[len(i):]}']
infos += ['col={}'.format(indent(col.__repr__(), i)[len(i):])] infos += [f'col={indent(col.__repr__(), i)[len(i):]}']
if value is not None: if value is not None:
infos += ['val={}'.format(indent(value.__repr__(), i)[len(i):])] infos += [f'val={indent(value.__repr__(), i)[len(i):]}']
infos += [ infos += [
'size={}, '.format(tuple(self.sizes())) + f'size={tuple(self.sizes())}, nnz={self.nnz()}, '
'nnz={}, '.format(self.nnz()) + f'density={100 * self.density():.02f}%'
'density={:.02f}%'.format(100 * self.density())
] ]
infos = ',\n'.join(infos) infos = ',\n'.join(infos)
i = ' ' * (len(self.__class__.__name__) + 1) i = ' ' * (len(self.__class__.__name__) + 1)
return '{}({})'.format(self.__class__.__name__, indent(infos, i)[len(i):]) return f'{self.__class__.__name__}({indent(infos, i)[len(i):]})'
SparseTensor.share_memory_ = share_memory_ SparseTensor.share_memory_ = share_memory_
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment