@@ -50,7 +50,7 @@ def genarray(r, verbose=True):
5050 return arr , arrsize
5151
5252
53- target_sizes = np .float64 (np .array ([.1 , .2 , .4 , .8 , 1 , 1.2 ]))
53+ target_sizes = np .float64 (np .array ([.2 , .5 , 1 , 2 , 5 , 10 ]))
5454rng = np .random .default_rng ()
5555blosctimes = []
5656nptimes = []
@@ -61,7 +61,7 @@ def genarray(r, verbose=True):
6161 arr , arrsize = genarray (d )
6262 genuine_sizes += [arrsize ]
6363 idx = rng .integers (low = 0 , high = arr .shape [0 ], size = (1000 ,)) if SPARSE else rng .integers (low = 0 , high = arr .shape [0 ], size = (arr .shape [0 ]// 4 ,))
64- sorted_idx = np .sort (idx )
64+ sorted_idx = np .unique ( np . sort (idx ) )
6565 ## Test fancy indexing for different use cases
6666 def timer (arr ):
6767 time_list = []
@@ -114,7 +114,7 @@ def timer(arr):
114114 error_kw = dict (lw = 2 , capthick = 2 , ecolor = 'k' ))
115115 labs += label
116116
117- filename = "results{labs}1Dsparse" if SPARSE else "results{labs}1D"
117+ filename = f "results{ labs } 1Dsparse" if SPARSE else f "results{ labs } 1D"
118118with open (filename + ".pkl" , 'wb' ) as f :
119119 pickle .dump ({'times' :result_tuple , 'sizes' :genuine_sizes }, f )
120120
0 commit comments