def expi(z_gpu):

    if z_gpu.dtype == np.complex64:
        args = 'pycuda::complex<float> *z, pycuda::complex<float> *e' 
    elif z_gpu.dtype == np.complex128:
        args = 'pycuda::complex<double> *z, pycuda::complex<double> *e' 
    else:
        raise ValueError('unsupported type')
    op = 'e[i] = expi(z[i])'
   
    try:
        func = expi.cache[z_gpu.dtype]
    except KeyError:
        func = elementwise.ElementwiseKernel(args, op,
                                 options=["-I", install_headers],
                                 preamble='#include "cuSpecialFuncs.h"')
        expi.cache[z_gpu.dtype] = func

    e_gpu = gpuarray.empty_like(z_gpu)
    func(z_gpu, e_gpu)

    return e_gpu
TODO: add docstring
dataset/ETHPy150Open lebedov/scikit-cuda/skcuda/special.py/expi--crossover with--dataset/ETHPy150Open treasure-data/td-client-python/tdclient/bulk_import_model.py/BulkImport.commit