Changeset 2660
- Timestamp:
- Apr 5, 2006, 12:07:43 PM (19 years ago)
- Location:
- inundation/fit_interpolate
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/fit_interpolate/interpolate.py
r2659 r2660 229 229 start=0 230 230 # creating a dummy array to concatenate to. 231 z = zeros((0,2)) # 2 for points in 2D space 231 232 f = ensure_numeric(f, Float) 233 z = zeros((0,f.shape[1])) 232 234 for end in range(start_blocking_len 233 235 ,len(point_coordinates) … … 235 237 t = self.interpolate_block(f, point_coordinates[start:end], 236 238 verbose=verbose) 239 #print "t", t 240 #print "z", z 237 241 z = concatenate((z,t)) 238 242 start = end … … 269 273 #print "self.inside_poly_indices", self.inside_poly_indices 270 274 #print "z", z 271 #print "z.size", z.size272 275 for i in self.outside_poly_indices: 273 276 z[i] = INF -
inundation/fit_interpolate/test_interpolate.py
r2659 r2660 524 524 2*linear_function(point_coords) ] 525 525 answer = transpose(answer) 526 #print "z",z 527 #print "answer",answer 528 assert allclose(z, answer) 529 530 f = array([linear_function(vertices),2*linear_function(vertices), 531 2*linear_function(vertices) - 100 ]) 532 f = transpose(f) 533 #print "f",f 534 for blocking_max in range(len(point_coords)+2): 535 #if True: 536 # blocking_max = 5 537 z = interp.interpolate(f, point_coords, 538 start_blocking_len=blocking_max) 539 answer = array([linear_function(point_coords), 540 2*linear_function(point_coords) , 541 2*linear_function(point_coords)-100 ]) 542 z = transpose(z) 526 543 #print "z",z 527 544 #print "answer",answer
Note: See TracChangeset
for help on using the changeset viewer.