Changeset 4035


Ignore:
Timestamp:
Nov 27, 2006, 12:14:44 PM (18 years ago)
Author:
nick
Message:

small change to geospatial_data.py

Location:
anuga_core/source/anuga/geospatial_data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/geospatial_data/geospatial_data.py

    r4028 r4035  
    626626        #find unique random numbers
    627627        while i < new_size:
    628             random_num = randint(0,self_size)
     628            random_num = randint(0,self_size-1)
    629629            if random_num not in random_list:
    630630                random_list.append(random_num)
     
    641641        for i in random_list:
    642642            remainder_list.pop(i)
    643 
     643           
    644644        #get new samples
    645645        G1 = self.get_sample(random_list)
  • anuga_core/source/anuga/geospatial_data/test_geospatial_data.py

    r4028 r4035  
    16431643#        print G.get_attributes()
    16441644
    1645         factor = 0.22
     1645        factor = 0.21
    16461646
    16471647        G1, G2  = G.split(factor) #will return G1 with 10% of points and G2 with 90%
Note: See TracChangeset for help on using the changeset viewer.