Skip to content

Commit 0ba22c9

Browse files
authored
Merge pull request #1355 from SyneRBI/fix-test-tol
fix v3.9 release bugs
2 parents f08d5c2 + fe86495 commit 0ba22c9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
fail-fast: false
5656

5757
steps:
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@v5
5959
with:
6060
submodules: recursive
6161
- name: install_dependencies

.github/workflows/cffconvert.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out a copy of the repository
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515

1616
- name: Check whether the citation metadata from CITATION.cff is valid
1717
uses: citation-file-format/[email protected]

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ identifiers:
117117
"Motion estimation and correction for
118118
simultaneous PET/MR using SIRF and CIL". Philos
119119
Trans A (2021);379:20200208
120-
- type: doi
120+
- type: doi
121121
value: 10.1088/1361-6560/adf609
122122
description: >-
123123
"Efficient motion-corrected image reconstruction

src/xSTIR/pSTIR/tests/test_ObjectiveFunction.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@ def test_Hessian(self, subset=-1, eps=1e-3):
8585
def test_gradient_inplace(self):
8686
'''Checks that gradient computed in-place returns the same as without in-place.
8787
88-
Note: the absolute tolerance of the test was increased from the default 1e-8 to 1e-5, see 'test_gradient_out'
88+
Note: the absolute tolerance of the test was increased from the default 0 to 3e-4, see 'test_gradient_out'
8989
'''
9090
x = self.image
9191
g1 = self.obj_fun.gradient(x)
9292
self.obj_fun.gradient(x, out=x)
93-
numpy.testing.assert_allclose(x.asarray(), g1.asarray(), atol=1e-5)
93+
numpy.testing.assert_allclose(x.asarray(), g1.asarray(), atol=3e-4)
9494

9595
def test_gradient_out(self):
9696
'''Checks that gradient with 'out' parameter returns the same as without the 'out' parameter.
9797
98-
Note: the absolute tolerance of the test was increased from the default 1e-8 to 1e-5.
98+
Note: the absolute tolerance of the test was increased from the default 0 to 3e-4.
9999
https://github.com/SyneRBI/SIRF/issues/1349
100100
'''
101101
x = self.image
102102
g1 = self.obj_fun.gradient(x)
103103
g2 = g1 * 0
104104
self.obj_fun.gradient(x, out=g2)
105-
numpy.testing.assert_allclose(g2.asarray(), g1.asarray(), atol=1e-5)
105+
numpy.testing.assert_allclose(g2.asarray(), g1.asarray(), atol=3e-4)

0 commit comments

Comments
 (0)