Skip to content

Commit

Permalink
Merge pull request #28 from cupy/_v2-fix-gpu-tutorial
Browse files Browse the repository at this point in the history
Fix gpu tutorial to pass the test
  • Loading branch information
okuta committed Mar 21, 2017
2 parents a9ed101 + d161b12 commit ed79d3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/source/tutorial/gpu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ CuPy implements many functions on :class:`cupy.ndarray` objects.
Understanding NumPy might help utilizing most features of CuPy.
`See the NumPy documentation for learning it <http://docs.scipy.org/doc/numpy/index.html>`_.

.. testcode::

x_gpu = cupy.array([1, 2, 3, 4, 5])

The main difference of :class:`cupy.ndarray` from :class:`numpy.ndarray` is that the content is allocated on the device memory.
The allocation takes place on the current device by default.
The current device can be changed by :class:`cupy.cuda.Device` object as follows:
Expand Down

0 comments on commit ed79d3e

Please sign in to comment.