cleaned up caching and small fixes
This commit is contained in:
@@ -27,6 +27,19 @@ def test_image_calculations():
|
||||
453842.6]
|
||||
assert np.allclose(res["JF16T03V01_intensity"], intensity)
|
||||
|
||||
def test_joblib_memory():
|
||||
""" We need joblib for fast caching of intermediate results in all cases. So we check
|
||||
if the basic function caching to disk works.
|
||||
"""
|
||||
def calc_example(x):
|
||||
return x**2
|
||||
|
||||
calc_cached = cristallina.analysis.memory.cache(calc_example)
|
||||
|
||||
assert calc_cached(8) == 64
|
||||
assert calc_cached.check_call_in_cache(8) == True
|
||||
|
||||
|
||||
def test_minimal_2d_gaussian():
|
||||
|
||||
image = np.array([[0,0,0,0,0],
|
||||
|
||||
Reference in New Issue
Block a user