Changeset 447
- Timestamp:
- Oct 26, 2004, 11:55:30 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/sparse.py
r446 r447 81 81 82 82 else: 83 print'Numeric matrix not yet implemented'83 raise 'Numeric matrix not yet implemented' 84 84 85 85 return R … … 88 88 if __name__ == '__main__': 89 89 90 from Numeric import allclose 90 from Numeric import allclose, array, Float 91 91 92 92 A = Sparse(3,3) … … 111 111 A[2,2] = 1 112 112 113 print A 113 114 print A.todense() 114 115 … … 121 122 assert allclose(u, [6,14,4]) 122 123 124 #Right hand side column 125 v = array([[2,4],[3,4],[4,4]]) 126 127 u = A*v[:,0] 128 assert allclose(u, [6,14,4]) 129 130 #u = A*v[:,1] 131 #print u
Note: See TracChangeset
for help on using the changeset viewer.