minor changes

improvement-file_array
Oli 3 years ago
commit ca5e30222a

@ -58,4 +58,3 @@ El sistema actualmente se encuentra migrado a Python3 por lo que no se recomiend
./script_install_py2.sh ./script_install_py2.sh
``` ```

@ -37,7 +37,7 @@ def generate(N):
return k, duration return k, duration
N=int(sys.argv[1]) N=int(sys.argv[1])
SAMPLE_SIZE=1000 SAMPLE_SIZE=100
def time_measurement(n, sample_size): def time_measurement(n, sample_size):
sample = [] sample = []

@ -37,9 +37,8 @@ def generate(N):
def test(N): def test(N):
k, duration = generate(N) k, duration = generate(N)
k_correct = np.load(f"out_{N}.npy") k_correct = np.load(f"out_{N}.npy")
comparison = k == k_correct
print(f"Generation with N = {N} time = {duration}s") print(f"Generation with N = {N} time = {duration}s")
return comparison.all() return np.allclose(k, k_correct, rtol=1e-10, atol=1e-10)
class TestGeneration(unittest.TestCase): class TestGeneration(unittest.TestCase):
def test_08(self): def test_08(self):

@ -207,8 +207,7 @@ def genGaussK(
0, 0,
) # coord des vecteurs de base (1 0 0) y (0 1 0) ) # coord des vecteurs de base (1 0 0) y (0 1 0)
k = gen( k = gen(
Nx, Ny, Nz, dx, dy, dz, seed, [v1], 0, 1, 0, 8 #TODO: change this harcoded value Nx, Ny, Nz, dx, dy, dz, seed, [v1], 0, 1, 0) # 0, 1, 0 = mean, variance, typ #Generation of a correlated standard dsitribution N(0,1)
) # 0, 1, 0 = mean, variance, typ #Generation of a correlated standard dsitribution N(0,1)
return k return k

Loading…
Cancel
Save