Skip to content

Commit

Permalink
REF: Preserve intention of buggy call to np.median
Browse files Browse the repository at this point in the history
  • Loading branch information
carterbox committed Nov 10, 2023
1 parent 408e526 commit 1781330
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)
dark = np.median(dark, axis=0)
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 1781330

Please sign in to comment.