copapy.map_to_numpy#

copapy.map_to_numpy(arr, copy=False)#

Mark an array, vector or tensor to be returned by read out as numpy array (uint8, int32 or float32) instead of nested lists.

Without copy the numpy array is a view of the memory of the array on the target: it changes with the next run.

Parameters:
  • arr (array[Any] | ArrayType[Any]) – Array, vector or tensor

  • copy (bool) – Return a copy of the data that is independent of further runs

Return type:

array[Any]

Returns:

The marked array, further operations with it return unmarked arrays