copy<T extends SizedNativeType> function

VARP copy<T extends SizedNativeType>(
  1. VARP a, {
  2. String order = "K",
})

copy(a, order='K', subok=False) Return an array copy of the given object.

Parameters

a : var_like Input data. order : {'C', 'F', 'A', 'K'}, optional Compatible with numpy. subok : bool, optional Compatible with numpy.

Returns

arr : var Var interpretation of a.

Examples

x = np.array(1, 2, 3) np.copy(x) var(1, 2, 3)

Implementation

VARP copy<T extends ffi.SizedNativeType>(
  VARP a, {
  String order = "K",
}) {
  _orderAssert(order);
  return F.clone(a, deepCopy: true);
}