|
@@ -1050,7 +1050,8 @@ def copy(inp, device=None): |
|
|
|
|
|
|
|
|
Examples: |
|
|
Examples: |
|
|
|
|
|
|
|
|
>>> x = Tensor([1, 2, 3], numpy.int32) |
|
|
|
|
|
|
|
|
>>> import numpy as np |
|
|
|
|
|
>>> x = Tensor([1, 2, 3], np.int32) |
|
|
Tensor([1 2 3], dtype=int32, device=xpux:0) |
|
|
Tensor([1 2 3], dtype=int32, device=xpux:0) |
|
|
|
|
|
|
|
|
>>> F.copy(x, 'cpu1') |
|
|
>>> F.copy(x, 'cpu1') |
|
|