Skip to content

Commit

Permalink
Add f3d header, test (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
tilmantroester committed Apr 7, 2021
1 parent f3fe638 commit 66397c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyccl/ccl_tk3d.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
%apply (int DIM1, double* ARGOUT_ARRAY1) {(int ndout, double* doutput)};

%include "../include/ccl_f2d.h"
%include "../include/ccl_f3d.h"
%include "../include/ccl_core.h"

%inline %{
Expand Down
9 changes: 9 additions & 0 deletions pyccl/tests/test_tk3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ def test_tk3d_eval_errors():
assert_raises(TypeError, tsp.eval, 1E-2, np.array([0.1]))


def test_tk3d_delete():
"""Check that ccl.Tk3D.__del__ works."""
(a_arr, lk_arr, fka1_arr, fka2_arr, tkka_arr) = get_arrays()
tsp = ccl.Tk3D(a_arr, lk_arr, pk1_arr=fka1_arr,
pk2_arr=fka2_arr)
# This should not cause an ignored exception
del tsp


@pytest.mark.parametrize('is_product', [True, False])
def test_tk3d_eval(is_product):
(a_arr, lk_arr, fka1_arr, fka2_arr, tkka_arr) = get_arrays()
Expand Down

0 comments on commit 66397c7

Please sign in to comment.