Permalink
Browse files

Deleted unused function

  • Loading branch information...
leugenea committed Mar 5, 2012
1 parent a16fddb commit 03fe43322cf7bee08e8367a032d15dd43f7c1809
Showing with 1 addition and 7 deletions.
  1. +1 −7 iteration.py
View
@@ -3,12 +3,6 @@
from utils import checkSize
from numpy.linalg import norm
-def idMatrix(n):
- a = zeros((n,n))
- for i in range(n):
- a[i][i] = 1;
- return matrix(a)
-
def iteration(a, b, appr, eps = 0):
a = deepcopy(a)
b = deepcopy(b)
@@ -20,7 +14,7 @@ def iteration(a, b, appr, eps = 0):
if eps == 0:
eps = abs(a[a.nonzero()]).min()/100
n = shape(a)[0]
- a += idMatrix(n)
+ a += identityMatrix(n)
appr_old = matrix([[inf]] * n)
while norm(appr_old - appr) > eps:
appr_old = appr

0 comments on commit 03fe433

Please sign in to comment.