Changeset 7009
- Timestamp:
- May 11, 2009, 3:27:59 PM (16 years ago)
- Location:
- branches/numpy/anuga
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/abstract_2d_finite_volumes/util.py
r6689 r7009 1136 1136 """ 1137 1137 import sys 1138 from sets import Set as set1139 1138 1140 1139 all_quantity = ['stage', 'depth', 'momentum', 'xmomentum', -
branches/numpy/anuga/geospatial_data/test_geospatial_data.py
r6768 r7009 5 5 import tempfile 6 6 from math import sqrt, pi 7 from sets import ImmutableSet8 7 9 8 import numpy as num … … 1599 1598 p1 = (lat_gong, lon_gong) 1600 1599 p2 = (lat_2, lon_2) 1601 points = ImmutableSet([p1, p2, p1])1600 points = frozenset([p1, p2, p1]) 1602 1601 gsd = Geospatial_data(data_points=list(points), 1603 1602 points_are_lats_longs=True) … … 1621 1620 p1 = (lat_gong, lon_gong) 1622 1621 p2 = (lat_2, lon_2) 1623 points = ImmutableSet([p1, p2, p1])1622 points = frozenset([p1, p2, p1]) 1624 1623 gsd = Geospatial_data(data_points=list(points), 1625 1624 points_are_lats_longs=True) -
branches/numpy/anuga/shallow_water/data_manager.py
r6902 r7009 5003 5003 """ 5004 5004 5005 from sets import ImmutableSet5006 5007 5005 msg = "grid_spacing can not be zero" 5008 5006 assert not grid_spacing == 0, msg … … 5016 5014 # Don't assume the zone of the segments is the same as the lower left 5017 5015 # corner of the lat long data!! They can easily be in different zones 5018 lat_long_set = ImmutableSet()5016 lat_long_set = frozenset() 5019 5017 for seg in segs: 5020 5018 points_lat_long = points_needed(seg, ll_lat, ll_long, grid_spacing, 5021 5019 lat_amount, long_amount, zone, 5022 5020 isSouthHemisphere) 5023 lat_long_set |= ImmutableSet(points_lat_long)5024 5025 if lat_long_set == ImmutableSet([]):5021 lat_long_set |= frozenset(points_lat_long) 5022 5023 if lat_long_set == frozenset([]): 5026 5024 msg = "URS region specified and polygon does not overlap." 5027 5025 raise ValueError, msg -
branches/numpy/anuga/shallow_water/test_data_manager.py
r6902 r7009 14 14 from Scientific.IO.NetCDF import NetCDFFile 15 15 from struct import pack, unpack 16 from sets import ImmutableSet17 16 import shutil 18 17 … … 9552 9551 # the poly as points though. 9553 9552 #geo.export_points_file("results.txt", as_lat_long=True) 9554 results = ImmutableSet(geo.get_data_points(as_lat_long=True))9553 results = frozenset(geo.get_data_points(as_lat_long=True)) 9555 9554 #print 'results',results 9556 9555 … … 9566 9565 points_are_lats_longs=True) 9567 9566 #geo_answer.export_points_file("answer.txt", as_lat_long=True) 9568 answer = ImmutableSet(points)9567 answer = frozenset(points) 9569 9568 9570 9569 outs = answer.difference(results) … … 9656 9655 verbose=self.verbose) 9657 9656 9658 results = ImmutableSet(geo.get_data_points(as_lat_long=True,9659 isSouthHemisphere=False))9657 results = frozenset(geo.get_data_points(as_lat_long=True, 9658 isSouthHemisphere=False)) 9660 9659 #print 'results',results 9661 9660 … … 9667 9666 degminsec2decimal_degrees(97,i*2,0))) 9668 9667 #print "answer points", points 9669 answer = ImmutableSet(points)9668 answer = frozenset(points) 9670 9669 9671 9670 for point in points:
Note: See TracChangeset
for help on using the changeset viewer.