implemented a function that will be used to provide a generic n-th order, nth-dimension error approximation function

This commit is contained in:
sm
2010-05-04 23:03:07 -06:00
parent c5adab295b
commit 3a1c13bcac
5 changed files with 118 additions and 1 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
from grid import grid as basegrid
from baker.tools import exact_func_3D
from baker.tools import exact_func_3D, smblog
import numpy as np
@@ -88,6 +88,13 @@ class random_grid(rect_grid):
r = np.random
appx_side_res = int(np.power(num_points, 1/3.0))
smblog.debug("appx_side_res: %d" % appx_side_res)
delta = 1.0 / float(appx_side_res)
for x in xrange(appx_side_res + 1):
pass
for i in xrange(num_points):
cur_x = r.rand()
cur_y = r.rand()