Sha256: e441ac6d63672ea9d736e1b1f103044d5b0ab0631aeaee966cfee81728e17858
Contents?: true
Size: 333 Bytes
Versions: 73
Compression:
Stored size: 333 Bytes
Contents
class Matrix(object): def __init__(self, s): self.rows = [[int(n) for n in row.split()] for row in s.split('\n')] self.columns = [list(tup) for tup in zip(*self.rows)] def row(self, index): return self.rows[index] def column(self, index): return self.columns[index]
Version data entries
73 entries across 73 versions & 1 rubygems