Skip to content

Commit 5bf95c8

Browse files
committed
Version bump 0.5.0 -> 0.5.1 related to #16, also added unit test
1 parent ac956ef commit 5bf95c8

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

changelog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Versioning](https://semver.org/spec/v2.0.0.html) when it reaches version 1.0.
1313
### Deprecated
1414
### Security
1515

16+
## [0.5.1] - 2022-06-15
17+
Small bugfix to the to_autograd operator. (Pull request 16)
18+
19+
### Fixed
20+
- Fixed to_autograd operator to always output 32 bit results, also with a 64 bi input just like the normal operator. Before the fix it only worked with 32 bit inputs.
21+
1622
## [0.5.0] - 2022-02-01
1723
This release is mostly about maintaining existing functionality. The tomosipo paper and Astra toolbox 2 were released, there is a new maintainer, and some bugs were fixed. The conda package is now the default installation option.
1824

@@ -136,7 +142,8 @@ This is a major release. It introduces two features that define tomosipo in its
136142

137143

138144

139-
[Unreleased]: https://github.com/ahendriksen/tomosipo/compare/v0.5.0...develop
145+
[Unreleased]: https://github.com/ahendriksen/tomosipo/compare/v0.5.1...develop
146+
[0.5.1]: https://github.com/ahendriksen/tomosipo/compare/v0.5.0...v0.5.1
140147
[0.5.0]: https://github.com/ahendriksen/tomosipo/compare/v0.4.1...v0.5.0
141148
[0.4.1]: https://github.com/ahendriksen/tomosipo/compare/v0.4.0...v0.4.1
142149
[0.4.0]: https://github.com/ahendriksen/tomosipo/compare/v0.3.1...v0.4.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@
7373
extras_require={'dev': dev_requirements},
7474
url='https://github.com/ahendriksen/tomosipo',
7575
# Also edit the version in tomosipo/__init__.py!
76-
version='0.5.0',
76+
version='0.5.1',
7777
zip_safe=False,
7878
)

tests/test_torch_support.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import pytest
22
import tomosipo as ts
33
from . import skip_if_no_cuda
4+
from tomosipo.torch_support import (
5+
to_autograd,
6+
)
47

58
try:
69
import torch
@@ -67,3 +70,16 @@ def test_fp_bp(device):
6770

6871
assert 1.0 < sino.sum()
6972
assert 1.0 < bp.sum()
73+
74+
@skip_if_no_torch
75+
def test_float64():
76+
vg = ts.volume(shape=(1, N, N))
77+
pg = ts.parallel(angles=N_angles, shape=(1, M))
78+
A = ts.operator(vg, pg)
79+
A_ag = to_autograd(A)
80+
81+
x = torch.ones((1, 1, N, N), dtype=torch.float64)
82+
y = A(x[0, ...])
83+
y_ag = A_ag(x)
84+
85+
assert torch.equal(y, y_ag[0, ...])

tomosipo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
__author__ = """Allard Hendriksen"""
66
__email__ = "[email protected]"
77
# Also edit the version in setup.py!
8-
__version__ = "0.5.0"
8+
__version__ = "0.5.1"
99

1010
from .Operator import operator
1111
from .Data import data

0 commit comments

Comments
 (0)