Ignore:
Timestamp:
Aug 5, 2010, 8:20:47 PM (14 years ago)
Author:
mungkasi
Message:

Modifying codes so that arrays are compatible with numpy instead of Numeric.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/sudi/sw_1d/periodic_waves/cg/domain.py

    r7837 r7922  
    2424        """
    2525
    26         from Numeric import array, zeros, Float, Int
    27 
     26        from Numeric import Float, Int
     27        from numpy import array, zeros
    2828        from config import timestepping_method
    2929        from config import CFL
     
    175175          self.vertexlist is built
    176176        """
    177         from Numeric import array
     177        from numpy import array
    178178
    179179        vertexlist = [None]*len(self.coordinates)
     
    322322            self.element_tag is defined
    323323        """
    324         from Numeric import array, Int
     324        from Numeric import Int
     325        from numpy import array
    325326
    326327        if tagged_elements is None:
     
    393394
    394395        if obj is True:
    395             from Numeric import concatenate, reshape
     396            from numpy import concatenate, reshape
    396397            V = self.vertices
    397398            N = V.shape[0]
     
    412413        """
    413414
    414         from Numeric import zeros, Float
     415        from Numeric import Float
     416        from numpy import zeros
    415417        q = zeros( len(self.conserved_quantities), Float)
    416418        for i, name in enumerate(self.conserved_quantities):
     
    436438        """
    437439
    438         from Numeric import zeros, Float
     440        from Numeric import Float
     441        from numpy import zeros
    439442        q = zeros( len(self.evolved_quantities), Float)
    440443
     
    10781081        """
    10791082        import copy
    1080         from Numeric import zeros,Float
     1083        from Numeric import Float
     1084        from numpy import zeros
    10811085
    10821086        N = self.number_of_elements
     
    11361140        """
    11371141        import copy
    1138         from Numeric import zeros,Float
     1142        from Numeric import Float
     1143        from numpy import zeros
    11391144
    11401145        N = self.number_of_elements
     
    13541359        """
    13551360
    1356         from Numeric import ones, sum, equal, Float
     1361        from Numeric import Float
     1362        from numpy import ones, sum, equal       
    13571363
    13581364        N = self.number_of_elements
Note: See TracChangeset for help on using the changeset viewer.