arrayfire.interop module

Interop with other python packages.

This module provides interoperability with the following python packages.

  1. numpy
  2. pycuda
  3. pyopencl
arrayfire.interop.to_array(in_array)[source]

Helper function to convert input from a different module to af.Array

Parameters:

in_array : array like object

Can be one of numpy.ndarray, pycuda.GPUArray, pyopencl.Array, array.array, list

Returns:

af.Array of same dimensions as input after copying the data from the input