- Timestamp:
- Nov 5, 2008, 9:15:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source_numpy_conversion/anuga/utilities/cg_solve.py
r2841 r5889 1 1 2 import exceptions 2 3 class VectorShapeError(exceptions.Exception): pass 3 4 class ConvergenceError(exceptions.Exception): pass 4 5 5 from Numeric import dot, array, Float, zeros 6 ##from numpy.oldnumeric import dot, array, Float, zeros 7 from numpy import dot, array, float, zeros 6 8 7 9 import logging, logging.config … … 24 26 25 27 if x0 is None: 26 x0 = zeros(b.shape, typecode=Float)28 x0 = zeros(b.shape, dtype=float) 27 29 else: 28 x0 = array(x0, typecode=Float)30 x0 = array(x0, dtype=float) 29 31 30 b = array(b, typecode=Float)32 b = array(b, dtype=float) 31 33 if len(b.shape) != 1 : 32 34 … … 57 59 58 60 59 b = array(b, typecode=Float)61 b = array(b, dtype=float) 60 62 if len(b.shape) != 1 : 61 63 raise VectorShapeError, 'input vector should consist of only one column' 62 64 63 65 if x0 is None: 64 x0 = zeros(b.shape, typecode=Float)66 x0 = zeros(b.shape, dtype=float) 65 67 else: 66 x0 = array(x0, typecode=Float)68 x0 = array(x0, dtype=float) 67 69 68 70
Note: See TracChangeset
for help on using the changeset viewer.