Skip to content

Commit

Permalink
No clip to 0-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinyoung Yi committed Jan 16, 2024
1 parent 8d492b7 commit 26cecbb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion equilib/cube2equi/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def run(
out = (
out.astype(horizon_dtype)
if horizon_dtype == np.dtype(np.uint8)
else np.clip(out, 0.0, 1.0)
else np.clip(out, np.nanmin(out), np.nanmax(out))
)

return out
2 changes: 1 addition & 1 deletion equilib/equi2cube/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def run(
out = (
out.astype(equi_dtype)
if equi_dtype == np.dtype(np.uint8)
else np.clip(out, 0.0, 1.0)
else np.clip(out, np.nanmin(out), np.nanmax(out))
)

# reformat the output
Expand Down
2 changes: 1 addition & 1 deletion equilib/equi2equi/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def run(
out = (
out.astype(src_dtype)
if src_dtype == np.dtype(np.uint8)
else np.clip(out, 0.0, 1.0)
else np.clip(out, np.nanmin(out), np.nanmax(out))
)

return out
2 changes: 1 addition & 1 deletion equilib/equi2pers/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def run(
out = (
out.astype(equi_dtype)
if equi_dtype == np.dtype(np.uint8) or not clip_output
else np.clip(out, 0.0, 1.0)
else np.clip(out, np.nanmin(out), np.nanmax(out))
)

return out
Expand Down

0 comments on commit 26cecbb

Please sign in to comment.