Ignore:
Timestamp:
Feb 10, 2009, 11:11:04 AM (16 years ago)
Author:
rwilson
Message:

Initial commit of numpy changes. Still a long way to go.

Location:
branches/numpy
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/damage_modelling/inundation_damage.py

    r6151 r6304  
    1010from types import StringType
    1111
    12 import Numeric as num
     12import numpy as num
    1313
    1414
     
    1717except ImportError: 
    1818    # Hand-built mockup of the things we need from the kinds package, since it
    19     # was recently removed from the standard Numeric distro.  Some users may 
     19    # was recently removed from the standard numeric distro.  Some users may 
    2020    # not have it by default. 
    2121    class _bunch: 
     
    314314
    315315        # the data being created
    316         struct_damage = num.zeros(self.structure_count, num.Float)
    317         contents_damage = num.zeros(self.structure_count, num.Float)
     316        struct_damage = num.zeros(self.structure_count, num.float)
     317        contents_damage = num.zeros(self.structure_count, num.float)
    318318        self.struct_inundated = ['']* self.structure_count
    319319
  • branches/numpy/anuga/damage_modelling/test_inundation_damage.py

    r6151 r6304  
    1717from anuga.shallow_water.data_manager import get_dataobject
    1818
    19 import Numeric as num
     19import numpy as num
    2020
    2121
     
    8383        #Initial condition - with jumps
    8484        bed = domain.quantities['elevation'].vertex_values
    85         stage = num.zeros(bed.shape, num.Float)
     85        stage = num.zeros(bed.shape, num.float)
    8686
    8787        h = 0.3
     
    153153        #Initial condition - with jumps
    154154        bed = domain.quantities['elevation'].vertex_values
    155         stage = num.zeros(bed.shape, num.Float)
     155        stage = num.zeros(bed.shape, num.float)
    156156
    157157        h = 30.
     
    476476        edm = EventDamageModel([0.0]*17, [0.0]*17, [0.0]*17,
    477477                               [0.0]*17, [0.0]*17)
    478         edm.struct_damage = num.zeros(17,num.Float)
    479         edm.contents_damage = num.zeros(17,num.Float)
     478        edm.struct_damage = num.zeros(17,num.float)
     479        edm.contents_damage = num.zeros(17,num.float)
    480480        collapse_probability = {0.4:[0], #0
    481481                                0.6:[1], #1
     
    597597        pass
    598598    suite = unittest.makeSuite(Test_inundation_damage,'test')
    599     #suite = unittest.makeSuite(Test_inundation_damage,'test_inundation_damage_list_as_input')
    600599    runner = unittest.TextTestRunner()
    601600    runner.run(suite)
Note: See TracChangeset for help on using the changeset viewer.