Skip to content

Commit

Permalink
fix: reformat debugs from prints
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Mar 13, 2024
1 parent 5d220d3 commit 397c300
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/icesat2waves/local_modules/m_tools_ph3.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,20 @@ def find_O(a, case="round"):


def stats(a):
_logger.debug("shape %s" , a.shape)
_logger.debug("Nans %s",np.sum(np.isnan(a)))
_logger.debug("max %s" , np.nanmax(a))
_logger.debug("min %s" ,np.nanmin(a))
_logger.debug("mean %s" ,np.nanmean(a))
_logger.debug(
f"shape: %s\n"
f"Nans: %s\n"
f"max: %s\n"
f"min: %s\n"
f"mean: %s"
, a.shape, np.sum(np.isnan(a)), np.nanmax(a), np.nanmin(a), np.nanmean(a))


def stats_format(a, name=None):
_logger.debug("Name: %s Shape: %s NaNs: %s max: %s min: %s mean: %s",
str(name), a.shape , np.sum(np.isnan(a)), np.nanmax(a),
np.nanmin(a), np.nanmean(a))
_logger.debug("Name: %s\n"
" Shape: %s\n"
" NaNs: %s\n"
" max: %s\n"
" min: %s\n"
" mean: %s",
name, a.shape, np.sum(np.isnan(a)), np.nanmax(a), np.nanmin(a), np.nanmean(a))

0 comments on commit 397c300

Please sign in to comment.