Skip to content

Commit

Permalink
Merge pull request #626 from tomopy/SESAME-Synchrotron/master
Browse files Browse the repository at this point in the history
BUG: Fix incorrect call to np.median
  • Loading branch information
carterbox committed Nov 10, 2023
2 parents 19b6783 + 1781330 commit 15ca6cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/tomopy/prep/normalize.py
Expand Up @@ -150,8 +150,8 @@ def normalize(
flat = np.mean(flat, axis=0, dtype=np.float32)
dark = np.mean(dark, axis=0, dtype=np.float32)
elif averaging == 'median':
flat = np.median(flat, axis=0, dtype=np.float32)
dark = np.median(dark, axis=0, dtype=np.float32)
flat = np.median(flat, axis=0).astype(np.float32)
dark = np.median(dark, axis=0).astype(np.float32)
else:
raise ValueError(
f"'averaging' must be 'mean' or 'median' not {averaging}")
Expand Down

0 comments on commit 15ca6cc

Please sign in to comment.