Interop with other python packages.
This module provides helper functions to copy data to arrayfire from the following modules:
numpy - numpy.ndarray
pycuda - pycuda.gpuarray
pyopencl - pyopencl.array
numba - numba.cuda.cudadrv.devicearray.DeviceNDArray
arrayfire.interop.
from_ndarray
(np_arr, copy=True)¶
Convert numpy.ndarray to arrayfire.Array.
Default is true. Can only be False if array is fortran contiguous.
arrayfire.interop.
np_to_af_array
(np_arr, copy=True)[source]¶
Convert numpy.ndarray to arrayfire.Array.
Default is true. Can only be False if array is fortran contiguous.
arrayfire.interop.
to_array
(in_array, copy=True)[source]¶
Helper function to convert input from a different module to af.Array
Can be one of the following: - numpy.ndarray - pycuda.GPUArray - pyopencl.Array - numba.cuda.cudadrv.devicearray.DeviceNDArray - array.array - list
Default is true. Can only be False if array is fortran contiguous.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4