Changeset 4028
- Timestamp:
- Nov 22, 2006, 2:13:30 PM (18 years ago)
- Location:
- anuga_core/source/anuga/geospatial_data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/geospatial_data/geospatial_data.py
r3969 r4028 9 9 from Numeric import concatenate, array, Float, shape, reshape, ravel, take, \ 10 10 size, shape 11 from RandomArrayimport randint11 from random import randint 12 12 #from MA import tolist 13 13 … … 618 618 i=0 619 619 self_size = len(self) 620 # print 'size', self_size621 620 random_list = [] 622 621 remainder_list = [] … … 635 634 for i in range(0,self_size,1): 636 635 remainder_list.append(i) 637 # print 'start remainer',remainder_list 638 636 637 #remove random list from remainder_list to get correct remainder_list 639 638 #need to sort and reverse so the pop() works correctly 640 639 random_list.sort() -
anuga_core/source/anuga/geospatial_data/test_geospatial_data.py
r3969 r4028 1645 1645 factor = 0.22 1646 1646 1647 G1, G2 = G.split(factor) #will return G1 with 10% forpoints and G2 with 90%1647 G1, G2 = G.split(factor) #will return G1 with 10% of points and G2 with 90% 1648 1648 1649 1649 # print 'len(G): %s len(G1): %s len(G2): %s' %(len(G), len(G1), len(G2))
Note: See TracChangeset
for help on using the changeset viewer.