[pypy-svn] r32761 - pypy/dist/pypy/tool/algo
arigo at codespeak.net
arigo at codespeak.net
Sat Sep 30 09:57:50 CEST 2006
Author: arigo
Date: Sat Sep 30 09:57:48 2006
New Revision: 32761
Modified:
pypy/dist/pypy/tool/algo/sparsemat.py
Log:
Be even more careful in 'del'.
Modified: pypy/dist/pypy/tool/algo/sparsemat.py
==============================================================================
--- pypy/dist/pypy/tool/algo/sparsemat.py (original)
+++ pypy/dist/pypy/tool/algo/sparsemat.py Sat Sep 30 09:57:48 2006
@@ -60,9 +60,8 @@
if abs(value) > EPSILON:
line2[col] = columns[col][i] = value
else:
- if col in line2:
- del line2[col]
- del columns[col][i]
+ line2.pop(col, 0)
+ columns[col].pop(i, 0)
solution = [None] * len(vector)
for i in range(len(vector)-1, -1, -1):
row = nrows[i]
More information about the Pypy-commit
mailing list