Skip to content

Commit

Permalink
revert simple_metrics to np.float64 computations for all input types
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Jan 27, 2016
1 parent 64f6203 commit 0f71278
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions skimage/measure/simple_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ def _assert_compatible(X, Y):


def _as_floats(X, Y):
"""Promote X, Y to nearest appropriate floating point precision."""
float_type = np.result_type(X.dtype, Y.dtype, np.float32)
if X.dtype != float_type:
X = X.astype(float_type)
if Y.dtype != float_type:
Y = Y.astype(float_type)
"""Promote X, Y to floating point precision."""
if X.dtype != np.float64:
X = X.astype(np.float64)
if Y.dtype != np.float64:
Y = Y.astype(np.float64)
return X, Y


Expand Down

0 comments on commit 0f71278

Please sign in to comment.