From b4800551fdb168b76e32e74b7ce796b9ea00fe09 Mon Sep 17 00:00:00 2001 From: Robert Smallshire Date: Tue, 2 Sep 2014 11:02:17 +0200 Subject: [PATCH] Fixed scrambled code --- catalog.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/catalog.py b/catalog.py index 16ec6f8..3dd8b6b 100644 --- a/catalog.py +++ b/catalog.py @@ -96,6 +96,7 @@ class CatalogBuilder: is_rm, diff = self._is_row_major(i_min, j_min, j_max) if is_rm: return RowMajorCatalog(i_min, i_max, j_min, j_max, diff) + return DictionaryCatalog(self._catalog) def _is_row_major(self, i_min, j_min, j_max): """Does row major ordering predict values from keys? @@ -110,7 +111,6 @@ class CatalogBuilder: be predicted from the keys by assuming a row-major ordering, otherwise False. If True, the second element will be a constant offset, otherwise it can be ignored. - ordering """ diff = None for (i, j), actual_value in self._catalog: @@ -122,8 +122,6 @@ class CatalogBuilder: return False, None return True, diff - return DictionaryCatalog(self._catalog) - class RowMajorCatalog(Mapping): """A mapping which assumes a row-major ordering of a two-dimensional matrix.