-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
This bit of code:
TIGRE/Python/tigre/utilities/geometry.py
Lines 119 to 130 in 989615d
| def cast_to_single(self): | |
| """ | |
| Casts all number values in current instance to single prevision floating point types. | |
| :return: None | |
| """ | |
| for attrib in self.__dict__: | |
| if getattr(self, attrib) is not None: | |
| try: | |
| setattr(self, attrib, np.float32(getattr(self, attrib))) | |
| except ValueError: | |
| pass |
Expected Behavior
Expect anything in double precision is cast to single precision
Actual Behavior
Casts everything to single precision including integers
Code to reproduce the problem (If applicable)
This caused an issue when I did
self.tigre_geom.cast_to_single()
img, qual= sart(
proj=self.tigre_projections,
geo=self.tigre_geom,
angles=self.tigre_angles,
init=self.tigre_initial,
niter=self.niter,
gpuids=self.gpuids,
**self.kwargsbecause sart allocates internally based on nVoxel in the geometry which now isn't an integer.
Specifications
- MATLAB/python version: python
- OS: linux
- CUDA version: 12.9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels