remove enumerate, zip, ellipse uniform sampling with realign

This commit is contained in:
Adrian Mariano
2021-11-18 19:02:50 -05:00
parent 96a210b5a4
commit 1ec9faec39
6 changed files with 99 additions and 92 deletions

View File

@@ -254,14 +254,6 @@ module test_idx() {
test_idx();
module test_enumerate() {
assert(enumerate(["a","b","c"]) == [[0,"a"], [1,"b"], [2,"c"]]);
assert(enumerate([[88,"a"],[76,"b"],[21,"c"]], idx=1) == [[0,"a"], [1,"b"], [2,"c"]]);
assert(enumerate([["cat","a",12],["dog","b",10],["log","c",14]], idx=[1:2]) == [[0,"a",12], [1,"b",10], [2,"c",14]]);
}
test_enumerate();
module test_shuffle() {
nums1 = count(100);
nums2 = shuffle(nums1,33);
@@ -375,16 +367,6 @@ module test_repeat_entries() {
test_repeat_entries();
module test_zip() {
v1 = [1,2,3,4];
v2 = [5,6,7];
v3 = [8,9,10,11];
assert(zip(v1,v3) == [[1,8],[2,9],[3,10],[4,11]]);
assert(zip([v1,v3]) == [[1,8],[2,9],[3,10],[4,11]]);
}
test_zip();
module test_list_to_matrix() {
v = [1,2,3,4,5,6];
assert(list_to_matrix(v,2) == [[1,2], [3,4], [5,6]]);