NDArray::copy
public static function copy(NDArray|array|float|int $a, int $device = NULL): NDArray;
Create a copy of array $a
.
$device options
Default = NULL, copy on the same device as $a
- 0 - CPU copy (same as
$a->cpu()
); - 1 - GPU copy (same as
$a->gpu()
);
Notes
tip
GPU SUPPORTED
This operation is supported by GPU (VRAM) and contains a custom CUDA kernel.