copy_array¶ copy_array(arr)[source]¶ Return a copy of the passed array. For torch tensors, this uses the clone method, for everything else we use copy.copy to perform a shallow copy. Parameters: arr: array-likeThe array to copy Returns: array-likeThe copied array