From a211027fbfe70fc1df5d703f206eee5fa8446e96 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Wed, 18 Jan 2017 00:31:27 -0600 Subject: [PATCH] Adapt doctest output to new version of numpy --- doc/howto.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/howto.rst b/doc/howto.rst index 5ea67f7d..92b3243b 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -65,10 +65,10 @@ the device: >>> ary_host["field2"].fill(1000) >>> ary_host[13]["field2"] = 12 >>> print(ary_host) - [(217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 12.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0)] + [(217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 12.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.)] >>> ary = cl.array.to_device(queue, ary_host) @@ -85,10 +85,10 @@ We can then operate on the array with our own kernels: >>> evt = prg.set_to_1(queue, ary.shape, None, ary.data) >>> print(ary) - [(1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 12.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 1000.0)] + [(1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 12.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.)] as well as with PyOpenCL's built-in operations: @@ -99,7 +99,7 @@ as well as with PyOpenCL's built-in operations: ... preamble=my_struct_c_decl) >>> evt = elwise(ary) >>> print(ary) - [(2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 12.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 1000.0)] + [(2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 12.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.)] -- GitLab