diff --git a/python/docs/basics.md b/python/docs/basics.md index f731c231e..18830d793 100644 --- a/python/docs/basics.md +++ b/python/docs/basics.md @@ -54,7 +54,7 @@ DeviceBuffers can also be created by copying data from host memory: >>> import rmm >>> import numpy as np >>> a = np.array([1, 2, 3], dtype='float64') ->>> buf = rmm.to_device(a.tobytes()) +>>> buf = rmm.DeviceBuffer.to_device(a.view("int8")) # to_device expects an 8-bit type or `bytes` >>> buf.size 24 ```