From fbbb8d9adb55fcb31a19c328ece45ec32169a006 Mon Sep 17 00:00:00 2001 From: Andreas Holm <60451789+holm10@users.noreply.github.com> Date: Tue, 5 Dec 2023 19:36:57 -0800 Subject: [PATCH] Fixes issue comparing with dataset object --- .../fulltests/nonog_d_c-fb_16x8/test_nonog_d_c-fb_16x8.py | 4 ++-- .../fulltests/nonog_d_c-fb_32x16/test_nonog_d_c-fb_32x16.py | 4 ++-- .../fulltests/nonog_d_c-fb_64x32/test_nonog_d_c-fb_64x32.py | 4 ++-- .../unittests/D_only/nonog/default/test_nonog_default.py | 4 ++-- .../pytests/unittests/D_only/nonog/test1/test_nonog_test1.py | 4 ++-- .../pytests/unittests/D_only/nonog/test2/test_nonog_test2.py | 4 ++-- .../pytests/unittests/D_only/nonog/test3/test_nonog_test3.py | 4 ++-- .../pytests/unittests/D_only/nonog/test5/test_nonog_test5.py | 4 ++-- .../unittests/D_only/ortho/default/test_ortho_default.py | 4 ++-- .../pytests/unittests/D_only/ortho/test1/test_ortho_test1.py | 4 ++-- .../pytests/unittests/D_only/ortho/test2/test_ortho_test2.py | 4 ++-- .../pytests/unittests/D_only/ortho/test3/test_ortho_test3.py | 4 ++-- .../pytests/unittests/D_only/ortho/test5/test_ortho_test5.py | 4 ++-- .../unittests/slab_D_only/slab/default/test_slab_default.py | 4 ++-- pytests/templates/tests/test_uedge.py | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pytests/pytests/fulltests/nonog_d_c-fb_16x8/test_nonog_d_c-fb_16x8.py b/pytests/pytests/fulltests/nonog_d_c-fb_16x8/test_nonog_d_c-fb_16x8.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/fulltests/nonog_d_c-fb_16x8/test_nonog_d_c-fb_16x8.py +++ b/pytests/pytests/fulltests/nonog_d_c-fb_16x8/test_nonog_d_c-fb_16x8.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/fulltests/nonog_d_c-fb_32x16/test_nonog_d_c-fb_32x16.py b/pytests/pytests/fulltests/nonog_d_c-fb_32x16/test_nonog_d_c-fb_32x16.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/fulltests/nonog_d_c-fb_32x16/test_nonog_d_c-fb_32x16.py +++ b/pytests/pytests/fulltests/nonog_d_c-fb_32x16/test_nonog_d_c-fb_32x16.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/fulltests/nonog_d_c-fb_64x32/test_nonog_d_c-fb_64x32.py b/pytests/pytests/fulltests/nonog_d_c-fb_64x32/test_nonog_d_c-fb_64x32.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/fulltests/nonog_d_c-fb_64x32/test_nonog_d_c-fb_64x32.py +++ b/pytests/pytests/fulltests/nonog_d_c-fb_64x32/test_nonog_d_c-fb_64x32.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/nonog/default/test_nonog_default.py b/pytests/pytests/unittests/D_only/nonog/default/test_nonog_default.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/nonog/default/test_nonog_default.py +++ b/pytests/pytests/unittests/D_only/nonog/default/test_nonog_default.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/nonog/test1/test_nonog_test1.py b/pytests/pytests/unittests/D_only/nonog/test1/test_nonog_test1.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/nonog/test1/test_nonog_test1.py +++ b/pytests/pytests/unittests/D_only/nonog/test1/test_nonog_test1.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/nonog/test2/test_nonog_test2.py b/pytests/pytests/unittests/D_only/nonog/test2/test_nonog_test2.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/nonog/test2/test_nonog_test2.py +++ b/pytests/pytests/unittests/D_only/nonog/test2/test_nonog_test2.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/nonog/test3/test_nonog_test3.py b/pytests/pytests/unittests/D_only/nonog/test3/test_nonog_test3.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/nonog/test3/test_nonog_test3.py +++ b/pytests/pytests/unittests/D_only/nonog/test3/test_nonog_test3.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/nonog/test5/test_nonog_test5.py b/pytests/pytests/unittests/D_only/nonog/test5/test_nonog_test5.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/nonog/test5/test_nonog_test5.py +++ b/pytests/pytests/unittests/D_only/nonog/test5/test_nonog_test5.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/ortho/default/test_ortho_default.py b/pytests/pytests/unittests/D_only/ortho/default/test_ortho_default.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/ortho/default/test_ortho_default.py +++ b/pytests/pytests/unittests/D_only/ortho/default/test_ortho_default.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/ortho/test1/test_ortho_test1.py b/pytests/pytests/unittests/D_only/ortho/test1/test_ortho_test1.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/ortho/test1/test_ortho_test1.py +++ b/pytests/pytests/unittests/D_only/ortho/test1/test_ortho_test1.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/ortho/test2/test_ortho_test2.py b/pytests/pytests/unittests/D_only/ortho/test2/test_ortho_test2.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/ortho/test2/test_ortho_test2.py +++ b/pytests/pytests/unittests/D_only/ortho/test2/test_ortho_test2.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/ortho/test3/test_ortho_test3.py b/pytests/pytests/unittests/D_only/ortho/test3/test_ortho_test3.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/ortho/test3/test_ortho_test3.py +++ b/pytests/pytests/unittests/D_only/ortho/test3/test_ortho_test3.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/D_only/ortho/test5/test_ortho_test5.py b/pytests/pytests/unittests/D_only/ortho/test5/test_ortho_test5.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/D_only/ortho/test5/test_ortho_test5.py +++ b/pytests/pytests/unittests/D_only/ortho/test5/test_ortho_test5.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/pytests/unittests/slab_D_only/slab/default/test_slab_default.py b/pytests/pytests/unittests/slab_D_only/slab/default/test_slab_default.py index b7f26507..cb50de4d 100644 --- a/pytests/pytests/unittests/slab_D_only/slab/default/test_slab_default.py +++ b/pytests/pytests/unittests/slab_D_only/slab/default/test_slab_default.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs): diff --git a/pytests/templates/tests/test_uedge.py b/pytests/templates/tests/test_uedge.py index b7f26507..cb50de4d 100644 --- a/pytests/templates/tests/test_uedge.py +++ b/pytests/templates/tests/test_uedge.py @@ -62,9 +62,9 @@ def matches(save, refs, epsilon): recoverstate(save, refs) fnrm = bbb.get_fnrm(bbb.dtreal) print('TEST RESULTS') - print(' REFERENCE', refs['fnrm']) + print(' REFERENCE', refs['fnrm'][()]) print(' RESULT', fnrm) - return isclose(fnrm, refs['fnrm'], atol=0.0, rtol=epsilon) + return isclose(fnrm, refs['fnrm'][()], atol=0.0, rtol=epsilon) def print_itroub(refs):