Skip to content

Commit

Permalink
Fix Py2 syntax in tutorial (gh-340)
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jan 11, 2022
1 parent 9f3b898 commit 993df4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ original *a*::

a_doubled = numpy.empty_like(a)
cuda.memcpy_dtoh(a_doubled, a_gpu)
print a_doubled
print a
print(a_doubled)
print(a)

This will print something like this::

Expand Down Expand Up @@ -127,8 +127,8 @@ achieved with much less writing::

a_gpu = gpuarray.to_gpu(numpy.random.randn(4,4).astype(numpy.float32))
a_doubled = (2*a_gpu).get()
print a_doubled
print a_gpu
print(a_doubled)
print(a_gpu)

Advanced Topics
---------------
Expand Down

0 comments on commit 993df4d

Please sign in to comment.