From 4a06cf66966b52982cf4177bbcb270871533c3dd Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 28 May 2014 14:12:24 -0500
Subject: [PATCH] Fix accidental use of DP in tests

---
 test/test_clmath.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test_clmath.py b/test/test_clmath.py
index 6ebbe46b..586e9e07 100644
--- a/test/test_clmath.py
+++ b/test/test_clmath.py
@@ -132,7 +132,7 @@ def test_atan2(ctx_factory):
     queue = cl.CommandQueue(context)
 
     for s in sizes:
-        a = (cl_array.arange(queue, s, dtype=np.float32) - s / 2) / 100
+        a = (cl_array.arange(queue, s, dtype=np.float32) - np.float32(s / 2)) / 100
         a2 = (s / 2 - 1 - cl_array.arange(queue, s, dtype=np.float32)) / 100
         b = clmath.atan2(a, a2)
 
@@ -149,7 +149,7 @@ def test_atan2pi(ctx_factory):
     queue = cl.CommandQueue(context)
 
     for s in sizes:
-        a = (cl_array.arange(queue, s, dtype=np.float32) - s / 2) / 100
+        a = (cl_array.arange(queue, s, dtype=np.float32) - np.float32(s / 2)) / 100
         a2 = (s / 2 - 1 - cl_array.arange(queue, s, dtype=np.float32)) / 100
         b = clmath.atan2pi(a, a2)
 
-- 
GitLab