Commit b1643e64 authored by Penom Nom's avatar Penom Nom
Browse files

No commit message

No commit message
parent 7a2fe556
......@@ -149,7 +149,7 @@ class SparseData( dict ):
@todo test
"""
sparse = list()
for rows_idx in sorted(self.keys()):
for rows_idx in sorted(self.keys(), key=int):
for columns_idx in sorted(self[rows_idx].keys()):
sparse.append([ rows_idx, columns_idx, self[rows_idx][columns_idx] ])
return sparse
......@@ -171,7 +171,7 @@ class SparseData( dict ):
if self[rows_idx].has_key( remove_idx ):
del self[rows_idx][remove_idx]
# Change index
row_columns_idx = self[rows_idx].keys()
row_columns_idx = sorted( self[rows_idx].keys(), key=int )
for column_idx in row_columns_idx:
if column_idx > remove_idx:
self[rows_idx][column_idx -1] = self[rows_idx][column_idx]
......
Supports Markdown
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