From c49821c55b45574cd7d5300ddd4a83f12fcaa7e0 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 27 Jul 2015 21:49:30 +0200 Subject: BUG: fixed regression in np.histogram which caused input floating-point values to be modified --- numpy/lib/function_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 5a442240e..19040807b 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -232,7 +232,7 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, tmp_a = tmp_a[keep] if tmp_w is not None: tmp_w = tmp_w[keep] - tmp_a = np.array(tmp_a, dtype=float, copy=False) + tmp_a = tmp_a.astype(float) tmp_a -= mn tmp_a *= norm -- cgit v1.2.1