diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-02-05 08:11:22 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-02-05 08:11:22 +0100 |
commit | a63afa58aa471b012161c7499bb6cbe489f62ce1 (patch) | |
tree | 7b1f463166c3b8d895fe3f704ba63e32f1102291 /lib/dfatool.py | |
parent | dca12474ab70843e4fc77c9e9cd3db57ad2ce364 (diff) |
move float_or_nan to utils
Diffstat (limited to 'lib/dfatool.py')
-rwxr-xr-x | lib/dfatool.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py index c5b58ee..93641d0 100755 --- a/lib/dfatool.py +++ b/lib/dfatool.py @@ -44,15 +44,6 @@ def soft_cast_int(n): except ValueError: return n -def float_or_nan(n): - """Convert to float (if numeric) or NaN.""" - if n == None: - return np.nan - try: - return float(n) - except ValueError: - return np.nan - def vprint(verbose, string): """ Print string if verbose. |