summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-07-04 16:18:40 +1000
committerDave Airlie <airlied@redhat.com>2016-07-05 05:48:03 +1000
commitb9767c8443c682f338cd5fa87e6a762bf9e1cea5 (patch)
tree9ab7dd7ae448d28b8de076ca60c2510f8cf59fb6 /generated_tests
parent7a11be33e419b2fef53092a4ce88472ba89fbc38 (diff)
builtin_function: try and use casts for 64-bits instead of dtype setting.
The dtype setting only works with numpy 1.9 and above, which doesn't seem to be in most distros yet. Reported-by: Jose Fonseca <jfonseca@vmware.com> Tested-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/builtin_function.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py
index a886dbd82..689a8055b 100644
--- a/generated_tests/builtin_function.py
+++ b/generated_tests/builtin_function.py
@@ -957,28 +957,28 @@ def _make_componentwise_test_vectors(test_suite_dict):
[np.linspace(-1.9, 1.9, 4), np.linspace(-1.9, 1.9, 4),
np.linspace(-2.0, 2.0, 4)])
- f('abs', 1, 150, np.abs, None, [np.linspace(-10, 15, 5, dtype=np.dtype(np.int64))],
+ f('abs', 1, 150, np.abs, None, [np.linspace(-10, 15, 54).astype(np.int64)],
extension="ARB_gpu_shader_int64")
- f('sign', 1, 150, np.sign, None, [np.linspace(-15, 15, 5, dtype=np.dtype(np.int64))],
+ f('sign', 1, 150, np.sign, None, [np.linspace(-15, 15, 5).astype(np.int64)],
extension="ARB_gpu_shader_int64")
f('min', 2, 150, min, [1],
- [np.linspace(-20, 20, 4, dtype=np.dtype(np.int64)), np.linspace(-20, 20, 4, dtype=np.dtype(np.int64))],
+ [np.linspace(-20, 20, 4).astype(np.int64), np.linspace(-20, 20, 4).astype(np.int64)],
extension="ARB_gpu_shader_int64")
f('min', 2, 150, min, [1],
- [np.linspace(20, 90, 4, dtype=np.dtype(np.uint64)), np.linspace(20, 90, 4, dtype=np.dtype(np.uint64))],
+ [np.linspace(20, 90, 4).astype(np.uint64), np.linspace(20, 90, 4).astype(np.uint64)],
extension="ARB_gpu_shader_int64")
f('max', 2, 150, max, [1],
- [np.linspace(-20, 20, 4, dtype=np.dtype(np.int64)), np.linspace(-20, 20, 4, dtype=np.dtype(np.int64))],
+ [np.linspace(-20, 20, 4).astype(np.int64), np.linspace(-20, 20, 4).astype(np.int64)],
extension="ARB_gpu_shader_int64")
f('max', 2, 150, max, [1],
- [np.linspace(20, 90, 4, dtype=np.dtype(np.uint64)), np.linspace(20, 90, 4, dtype=np.dtype(np.uint64))],
+ [np.linspace(20, 90, 4).astype(np.uint64), np.linspace(20, 90, 4).astype(np.uint64)],
extension="ARB_gpu_shader_int64")
- f('clamp', 3, 150, _clamp, [1, 2], [np.linspace(-20, 20, 4, dtype=np.dtype(np.int64)),
- np.linspace(-15, 15, 3, dtype=np.dtype(np.int64)),
- np.linspace(-15, 15, 3, dtype=np.dtype(np.int64))],
+ f('clamp', 3, 150, _clamp, [1, 2], [np.linspace(-20, 20, 4).astype(np.int64),
+ np.linspace(-15, 15, 3).astype(np.int64),
+ np.linspace(-15, 15, 3).astype(np.int64)],
extension="ARB_gpu_shader_int64")
f('mix', 3, 150, lambda x, y, a: y if a else x, None,
- [np.linspace(-20, 20, 2, dtype=np.dtype(np.int64)), np.linspace(-30, 30, 2, dtype=np.dtype(np.int64)), bools],
+ [np.linspace(-20, 20, 2).astype(np.int64), np.linspace(-30, 30, 2).astype(np.int64), bools],
extension="ARB_gpu_shader_int64")
_make_componentwise_test_vectors(test_suite)