Skip to content

Commit

Permalink
MNT: remove_nan and remove_neg work with lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dgursoy committed Apr 5, 2015
1 parent bc69272 commit 6c4832e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tomopy/io/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def remove_neg(dat, val=0.):
out : ndarray
Corrected data.
"""
dat = as_float32(dat)
dat[dat < 0.0] = val
return dat

Expand All @@ -230,6 +231,7 @@ def remove_nan(dat, val=0.):
out : ndarray
Corrected data.
"""
dat = as_float32(dat)
dat[np.isnan(dat)] = val
return dat

Expand Down

0 comments on commit 6c4832e

Please sign in to comment.