diff --git a/examples/faiss/1-flat.kg b/examples/faiss/1-flat.kg index 2d32614..d7a3b72 100644 --- a/examples/faiss/1-flat.kg +++ b/examples/faiss/1-flat.kg @@ -1,12 +1,12 @@ :" KlongPy varaint of 1-flat.py " .pyf("faiss";"IndexFlatL2") -.pyf("numpy";"random");rna::.pya(random;"random") +.pyf("numpy";"random");rns::.pya(random;"seed");rna::.pya(random;"random") d::64 :" dimension " nb::100000 :" database size " nq::10000 :" nb of queries " -.rns(1234) :" make reproducible " +rns(1234) :" make reproducible " xb::rna(nb,d) xq::rna(nq,d) diff --git a/klongpy/sys_fn.py b/klongpy/sys_fn.py index cb6961f..5750981 100644 --- a/klongpy/sys_fn.py +++ b/klongpy/sys_fn.py @@ -590,34 +590,6 @@ def eval_sys_random_number(): return np.random.random() -def eval_sys_random_array(x): - """ - - .rna(x) [Random-Array] - - Return a random array with shape specified by x. - - x may be a number (shape of size 1) or a shape array. - - """ - if not is_number(x) and not is_list(x): - raise KlongException("array length x must be a number or a shape array") - if is_number(x): - x = np.asarray([x]) - return np.random.random(x) - - -def eval_sys_random_seed(x): - """ - - .rns(x) [Random-Seed] - - Set the random seed to x. - - """ - return np.random.seed(x) - - def eval_sys_read(klong): """