Skip to content

Commit

Permalink
Merge pull request #19 from class255/master
Browse files Browse the repository at this point in the history
No clip to 0-1
  • Loading branch information
haruishi43 authored Jan 16, 2024
2 parents 8d492b7 + 26cecbb commit dc352ee
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 dc352ee

Please sign in to comment.