2828def test_pack_array (size , dtype ):
2929 nparray = np .arange (size , dtype = dtype )
3030 parray = blosc2 .pack_array (nparray )
31- if not os .getenv ("BTUNE_BALANCE " ):
31+ if not os .getenv ("BTUNE_TRADEOFF " ):
3232 assert len (parray ) < nparray .size * nparray .itemsize
3333
3434 a2 = blosc2 .unpack_array (parray )
@@ -48,7 +48,7 @@ def test_pack_array(size, dtype):
4848def test_pack_array2 (size , dtype ):
4949 nparray = np .arange (size , dtype = dtype )
5050 parray = blosc2 .pack_array2 (nparray )
51- if not os .getenv ("BTUNE_BALANCE " ):
51+ if not os .getenv ("BTUNE_TRADEOFF " ):
5252 assert len (parray ) < nparray .size * nparray .itemsize
5353
5454 a2 = blosc2 .unpack_array2 (parray )
@@ -59,7 +59,7 @@ def test_pack_array2(size, dtype):
5959def test_pack_array2_struct (size , dtype ):
6060 nparray = np .fromiter (iter (range (size )), dtype = "i4,f4,S8" )
6161 parray = blosc2 .pack_array2 (nparray )
62- if not os .getenv ("BTUNE_BALANCE " ):
62+ if not os .getenv ("BTUNE_TRADEOFF " ):
6363 assert len (parray ) < nparray .size * nparray .itemsize
6464
6565 a2 = blosc2 .unpack_array2 (parray )
@@ -80,7 +80,7 @@ def test_pack_tensor_torch(size, dtype):
8080 tensor = torch .arange (size , dtype = dtype )
8181 cframe = blosc2 .pack_tensor (tensor )
8282 atensor = np .asarray (tensor )
83- if not os .getenv ("BTUNE_BALANCE " ):
83+ if not os .getenv ("BTUNE_TRADEOFF " ):
8484 assert len (cframe ) < atensor .size * atensor .dtype .itemsize
8585
8686 tensor2 = blosc2 .unpack_tensor (cframe )
@@ -101,7 +101,7 @@ def test_pack_tensor_tensorflow(size, dtype):
101101 tensor = tensorflow .constant (array )
102102 cframe = blosc2 .pack_tensor (tensor )
103103 atensor = np .asarray (tensor )
104- if not os .getenv ("BTUNE_BALANCE " ):
104+ if not os .getenv ("BTUNE_TRADEOFF " ):
105105 assert len (cframe ) < atensor .size * atensor .dtype .itemsize
106106
107107 tensor2 = blosc2 .unpack_tensor (cframe )
@@ -121,7 +121,7 @@ def test_pack_tensor_tensorflow(size, dtype):
121121def test_pack_tensor_array (size , dtype ):
122122 nparray = np .arange (size , dtype = dtype )
123123 parray = blosc2 .pack_tensor (nparray )
124- if not os .getenv ("BTUNE_BALANCE " ):
124+ if not os .getenv ("BTUNE_TRADEOFF " ):
125125 assert len (parray ) < nparray .size * nparray .itemsize
126126
127127 a2 = blosc2 .unpack_tensor (parray )
@@ -141,7 +141,7 @@ def test_pack_tensor_array(size, dtype):
141141def test_save_array (size , dtype , urlpath ):
142142 nparray = np .arange (size , dtype = dtype )
143143 serial_size = blosc2 .save_array (nparray , urlpath , mode = "w" )
144- if not os .getenv ("BTUNE_BALANCE " ):
144+ if not os .getenv ("BTUNE_TRADEOFF " ):
145145 assert serial_size < nparray .size * nparray .itemsize
146146
147147 a2 = blosc2 .load_array (urlpath )
@@ -159,7 +159,7 @@ def test_save_array(size, dtype, urlpath):
159159def test_save_tensor_array (size , dtype , urlpath ):
160160 nparray = np .arange (size , dtype = dtype )
161161 serial_size = blosc2 .save_tensor (nparray , urlpath , mode = "w" )
162- if not os .getenv ("BTUNE_BALANCE " ):
162+ if not os .getenv ("BTUNE_TRADEOFF " ):
163163 assert serial_size < nparray .size * nparray .itemsize
164164
165165 a2 = blosc2 .load_tensor (urlpath )
@@ -179,7 +179,7 @@ def test_save_tensor_tensorflow(size, dtype, urlpath):
179179 nparray = np .arange (size , dtype = dtype )
180180 tensor = tensorflow .constant (nparray )
181181 serial_size = blosc2 .save_tensor (tensor , urlpath , mode = "w" )
182- if not os .getenv ("BTUNE_BALANCE " ):
182+ if not os .getenv ("BTUNE_TRADEOFF " ):
183183 assert serial_size < nparray .size * nparray .itemsize
184184
185185 tensor2 = blosc2 .load_tensor (urlpath )
@@ -199,7 +199,7 @@ def test_save_tensor_torch(size, dtype, urlpath):
199199 nparray = np .arange (size , dtype = dtype )
200200 tensor = torch .tensor (nparray )
201201 serial_size = blosc2 .save_tensor (tensor , urlpath , mode = "w" )
202- if not os .getenv ("BTUNE_BALANCE " ):
202+ if not os .getenv ("BTUNE_TRADEOFF " ):
203203 assert serial_size < nparray .size * nparray .itemsize
204204
205205 tensor2 = blosc2 .load_tensor (urlpath )
@@ -217,7 +217,7 @@ def test_save_tensor_torch(size, dtype, urlpath):
217217def test_save_tensor_sparse (size , sparse , urlpath ):
218218 nparray = np .arange (size , dtype = np .int32 )
219219 serial_size = blosc2 .save_tensor (nparray , urlpath , mode = "w" , contiguous = not sparse )
220- if not os .getenv ("BTUNE_BALANCE " ):
220+ if not os .getenv ("BTUNE_TRADEOFF " ):
221221 assert serial_size < nparray .size * nparray .itemsize
222222
223223 a2 = blosc2 .load_tensor (urlpath )
0 commit comments