Ignore:
Timestamp:
Jan 13, 2009, 1:42:28 PM (15 years ago)
Author:
rwilson
Message:

Change Numeric imports to general form - ready to change to NumPy?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/culvert_flows/culvert_class.py

    r6143 r6150  
     1import sys
     2
    13from anuga.shallow_water.shallow_water_domain import Inflow, General_forcing
    24from anuga.culvert_flows.culvert_polygons import create_culvert_polygons
     
    1012       
    1113from anuga.config import g, epsilon
    12 from Numeric import take, sqrt
    1314from anuga.config import minimum_allowed_height, velocity_protection       
    1415
    15        
    16 
    17 
    18 from Numeric import allclose
    19 from Numeric import sqrt, sum
    20 
    21 
    22 
    23 import sys
     16import Numeric as num
     17
    2418
    2519class Below_interval(Exception): pass
     
    284278        self.length = P['length']; assert self.length > 0.0
    285279        if culvert_description_filename is not None:
    286             if not allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2):
     280            if not num.allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2):
    287281                msg = 'WARNING: barrel length specified in "%s" (%.2f m)'\
    288282                    % (culvert_description_filename,
     
    770764        self.vector = P['vector']
    771765        self.length = P['length']; assert self.length > 0.0
    772         if not allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2):
     766        if not num.allclose(self.length, length, rtol=1.0e-2, atol=1.0e-2):
    773767            msg = 'WARNING: barrel length specified in "%s" (%.2f m)' %(culvert_description_filename, length)
    774768            msg += ' does not match distance between specified'
     
    1002996                 verbose=False):
    1003997       
    1004         from Numeric import sqrt, sum
    1005 
    1006998        # Input check
    1007999        if diameter is not None:
Note: See TracChangeset for help on using the changeset viewer.