[Matrix] Add __repr__ method()
authorSimon Chabot <simon.chabot@logilab.fr>
Fri, 19 Oct 2012 17:27:40 +0200
changeset 34 6dae1ef7ecdf
parent 33 0d95c1cfde36
child 35 bd2e8b9ba8bd
[Matrix] Add __repr__ method()
matrix.py
--- a/matrix.py	Fri Oct 19 16:57:40 2012 +0200
+++ b/matrix.py	Fri Oct 19 17:27:40 2012 +0200
@@ -54,6 +54,9 @@
     def __getitem__(self, index):
         return self._matrix[index]
 
+    def __repr__(self):
+        return self._matrix.todense().__repr__()
+
     def matched(self, cutoff = 0, normalized = False):
         match = defaultdict(list)
         if normalized: