Ignore:
Timestamp:
Nov 5, 2008, 9:15:55 AM (16 years ago)
Author:
rwilson
Message:

NumPy? conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source_numpy_conversion/anuga/utilities/cg_solve.py

    r2841 r5889  
     1
    12import exceptions
    23class VectorShapeError(exceptions.Exception): pass
    34class ConvergenceError(exceptions.Exception): pass
    45
    5 from Numeric import dot, array, Float, zeros
     6##from numpy.oldnumeric import dot, array, Float, zeros
     7from numpy import dot, array, float, zeros
    68   
    79import logging, logging.config
     
    2426   
    2527    if x0 is None:
    26         x0 = zeros(b.shape, typecode=Float)
     28        x0 = zeros(b.shape, dtype=float)
    2729    else:
    28         x0 = array(x0, typecode=Float)
     30        x0 = array(x0, dtype=float)
    2931
    30     b  = array(b, typecode=Float)
     32    b  = array(b, dtype=float)
    3133    if len(b.shape) != 1 :
    3234       
     
    5759
    5860
    59    b  = array(b, typecode=Float)
     61   b  = array(b, dtype=float)
    6062   if len(b.shape) != 1 :
    6163      raise VectorShapeError, 'input vector should consist of only one column'
    6264
    6365   if x0 is None:
    64       x0 = zeros(b.shape, typecode=Float)
     66      x0 = zeros(b.shape, dtype=float)
    6567   else:
    66       x0 = array(x0, typecode=Float)
     68      x0 = array(x0, dtype=float)
    6769
    6870
Note: See TracChangeset for help on using the changeset viewer.