diff --git a/wetb/utils/caching.py b/wetb/utils/caching.py index df0c369f8e6cffe70b4783d49ffe4c408ec97538..b4fd84849198447b9db606a41836d86b48fc9c9d 100644 --- a/wetb/utils/caching.py +++ b/wetb/utils/caching.py @@ -130,7 +130,7 @@ def cache_npsave(f): def _get_npsavez_wrap(f, compress): def wrap(filename,*args,**kwargs): - np_filename = os.path.splitext(filename)[0] + ".npy.npz"+("","c")[compress] + np_filename = os.path.splitext(filename)[0] + ".npy%s.npz"%("",".c")[compress] def loadsave(): res = f(filename,*args,**kwargs) if compress: diff --git a/wetb/utils/tests/test_caching.py b/wetb/utils/tests/test_caching.py index 816d3ec1ba2ddd20e2c192df4d9d2a9b336e5f7e..483eaa1278cd5610d9f79af0323eca30a59f83f6 100644 --- a/wetb/utils/tests/test_caching.py +++ b/wetb/utils/tests/test_caching.py @@ -150,7 +150,7 @@ class TestCacheProperty(unittest.TestCase): os.remove(npfilename) def test_cache_savez_compressed(self): - npfilename = tfp+"test.npy.npzc" + npfilename = tfp+"test.npy.c.npz" func = open_csv3 if os.path.isfile(npfilename): os.remove(npfilename)