From 0f71278a1081f89238252f896cec73a23f39cfa7 Mon Sep 17 00:00:00 2001 From: "Gregory R. Lee" Date: Wed, 27 Jan 2016 12:36:22 -0500 Subject: [PATCH] revert simple_metrics to np.float64 computations for all input types --- skimage/measure/simple_metrics.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/skimage/measure/simple_metrics.py b/skimage/measure/simple_metrics.py index 01bd0f29..399bcf99 100644 --- a/skimage/measure/simple_metrics.py +++ b/skimage/measure/simple_metrics.py @@ -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