Skip to content

Commit

Permalink
Float rounding I don't like you.
Browse files Browse the repository at this point in the history
  • Loading branch information
smoia committed Sep 8, 2023
1 parent fa58da2 commit 8f541b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions phys2cvr/phys2cvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ def phys2cvr(
)

LGR.info("phys2cvr finished! Enjoy your outputs!")
LGR.warning("Due to float rounding, you might need to mask your output.")


def _main(argv=None):
Expand Down
6 changes: 3 additions & 3 deletions phys2cvr/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ def regression(
pass

# Assign betas, Rsquare and tstats to new volume
bout = np.zeros_like(mask, dtype=np.float64)
tout = np.zeros_like(mask, dtype=np.float64)
rout = np.zeros_like(mask, dtype=np.float64)
bout = np.zeros(mask.shape)
tout = np.zeros(mask.shape)
rout = np.zeros(mask.shape)
bout[mask] = betas[-1, :]
tout[mask] = tstats[-1, :]
rout[mask] = r_square
Expand Down

0 comments on commit 8f541b4

Please sign in to comment.