Next: , Previous: Elements, Up: Operations


4.3.2 Copying

— Generic Function: grid:copy object &key specification grid-type dimensions element-type destination

Copy contents into existing or new object.

— Function: grid:copy-to object &optional type

Make a grid of the specified type from the object.

Copying is performed with the function copy. This works between grid:foreign-arrays, pointers, and CL arrays. There are two functions provided to extract the dimensions of a vector or array: dim0 and dim1; the latter is applicable only for matrices. To copy to a grid with the same dimensions and element type, use copy-to.