Ignore:
Timestamp:
Nov 6, 2008, 12:28:22 PM (15 years ago)
Author:
rwilson
Message:

Initial NumPy? changes (again!).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source_numpy_conversion/anuga/abstract_2d_finite_volumes/neighbour_mesh.py

    r5866 r5899  
     1## Automatically adapted for numpy.oldnumeric Oct 28, 2008 by alter_code1.py
     2
    13"""Classes implementing general 2D triangular mesh with neighbour structure.
    24
     
    1113from anuga.caching import cache
    1214from math import pi, sqrt
    13 from Numeric import array, allclose
     15#from numpy.oldnumeric import array, allclose
     16from numpy import array, allclose
    1417       
    1518
     
    8184
    8285
    83         from Numeric import array, zeros, Int, Float, maximum, sqrt, sum
     86#        from numpy.oldnumeric import array, zeros, Int, Float, maximum, sqrt, sum
     87        from numpy import array, zeros, int, float, maximum, sqrt, sum
    8488
    8589        General_mesh.__init__(self, coordinates, triangles,
     
    98102
    99103        #Allocate space for geometric quantities
    100         self.centroid_coordinates = zeros((N, 2), Float)
    101 
    102         self.radii = zeros(N, Float)
    103 
    104         self.neighbours = zeros((N, 3), Int)
    105         self.neighbour_edges = zeros((N, 3), Int)
    106         self.number_of_boundaries = zeros(N, Int)
    107         self.surrogate_neighbours = zeros((N, 3), Int)
     104        self.centroid_coordinates = zeros((N, 2), float)
     105
     106        self.radii = zeros(N, float)
     107
     108        self.neighbours = zeros((N, 3), int)
     109        self.neighbour_edges = zeros((N, 3), int)
     110        self.number_of_boundaries = zeros(N, int)
     111        self.surrogate_neighbours = zeros((N, 3), int)
    108112
    109113        #Get x,y coordinates for all triangles and store
     
    388392            self.element_tag is defined
    389393        """
    390         from Numeric import array, Int
     394#        from numpy.oldnumeric import array, Int
     395        from numpy import array, int
    391396
    392397        if tagged_elements is None:
     
    395400            #Check that all keys in given boundary exist
    396401            for tag in tagged_elements.keys():
    397                 tagged_elements[tag] = array(tagged_elements[tag]).astype(Int)
     402                tagged_elements[tag] = array(tagged_elements[tag]).astype(int)
    398403
    399404                msg = 'Not all elements exist. '
     
    463468        """
    464469       
    465         from Numeric import allclose, sqrt, array, minimum, maximum
     470#        from numpy.oldnumeric import allclose, sqrt, array, minimum, maximum
     471        from numpy import allclose, sqrt, array, minimum, maximum
    466472        from anuga.utilities.numerical_tools import angle, ensure_numeric     
    467473
     
    629635        from anuga.utilities.numerical_tools import anglediff
    630636
    631         from Numeric import sort, allclose
     637#        from numpy.oldnumeric import sort, allclose
     638        from numpy import sort, allclose
    632639
    633640        N = len(self)
     
    805812        """
    806813
    807         from Numeric import arange
     814#        from numpy.oldnumeric import arange
     815        from numpy import arange
    808816        from anuga.utilities.numerical_tools import histogram, create_bins
    809817
Note: See TracChangeset for help on using the changeset viewer.