Changeset 465
- Timestamp:
- Oct 29, 2004, 9:58:25 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pyvolution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/sparse.py
r452 r465 1 1 """Proof of concept sparse matrix code 2 2 """ 3 from scipy_base import *3 #from scipy_base import * 4 4 from cg_solve import conjugate_gradient, VectorShapeError 5 5 … … 125 125 from Numeric import array, zeros, Float 126 126 127 if isscalar(other): 127 try: 128 float(other) 129 except: 130 raise 'only right multiple with scalar implemented' 131 else: 128 132 new = self.copy() 129 133 #Multiply nonzero elements … … 132 136 133 137 new.A[key] = other*new.A[key] 134 else:135 raise 'only right multiple with scalar implemented'136 137 # print 'new.shape',new.shape138 138 139 139 return new -
inundation/ga/storm_surge/pyvolution/test_least_squares.py
r454 r465 3 3 import unittest 4 4 from math import sqrt 5 from scipy import mat5 #from scipy import mat 6 6 7 7 from least_squares import *
Note: See TracChangeset
for help on using the changeset viewer.