Did I find the right examples for you? yes no

All Samples(24)  |  Call(21)  |  Derive(0)  |  Import(3)

src/v/l/vlfeat-ctypes-0.1.4/vlfeat/dsift.py   vlfeat-ctypes(Download)
        #       the provided binaries on os x, at least
        frames_p = cast(dsift.frames, c_double_p)
        frames_p_a = npc.as_array(frames_p, shape=(num_frames, 4))
        cols = [1, 0] if matlab_style else [0, 1]
        if norm:
            cols.append(3)
        frames = np.require(frames_p_a[:, cols], requirements=['C', 'O'])
 
        # copy descriptors into a new array
        descrs_p = npc.as_array(dsift.descrs, shape=(num_frames, descr_size))

src/p/y/pymultinest-0.4/pymultinest/run.py   pymultinest(Download)
 
from ctypes import *
from numpy.ctypeslib import as_array
import signal, sys
 
			# syntax is... but this should pass back the right numpy arrays,
			# without copies. Untested!
			pc =  as_array(paramConstr,shape=(nPar,4))
 
			dump_callback(nSamples,nlive,nPar,

src/p/y/PyMultiNest-HEAD/pymultinest/run.py   PyMultiNest(Download)
 
from ctypes import *
from numpy.ctypeslib import as_array
import signal, sys
 
			# syntax is... but this should pass back the right numpy arrays,
			# without copies. Untested!
			pc =  as_array(paramConstr,shape=(nPar,4))
 
			dump_callback(nSamples,nlive,nPar,

src/l/i/libstempo-1.2.8/multinest.py   libstempo(Download)
from ctypes import *
import numpy as N
from numpy.ctypeslib import as_array
 
# don't bother with parsing error
            # syntax is... but this should pass back the right numpy arrays,
            # without copies. Untested!
            pc =  as_array(paramConstr,shape=(nPar,4))
 
            dump_callback(nSamples,nlive,nPar,

src/c/o/comtypes-1.0.0/comtypes/safearray.py   comtypes(Download)
                        if (safearray_as_ndarray and self._itemtype_ in
                                numpy.ctypeslib._typecodes.values()):
                            arr = numpy.ctypeslib.as_array(ptr, (num_elements,))
                            return arr.copy()
                        return ptr[:num_elements]

src/h/u/HunTag-HEAD/feature_select.py   HunTag(Download)
    model_parameters["bias"] = model.bias
    model_parameters["label"] = model.label
    model_matrix =np.ctypeslib.as_array(model.w,(model.nr_feature, model.nr_class))
    for index,value in enumerate(model_matrix.flat):
        model.w[index] = value

src/c/o/colorcorrect-0.04/src/colorcorrect/algorithm.py   colorcorrect(Download)
    gains = c_double*3
    ret = libcutil.calc_sdwgw(pointer(img),subwidth,subheight)
    gains = np.ctypeslib.as_array(gains.from_address(ret))
    gains = gains.copy()
    libcutil.delete_doubleptr(ret)
    gains = c_double*3
    ret = libcutil.calc_sdlwgw(pointer(img),subwidth,subheight)
    gains = np.ctypeslib.as_array(gains.from_address(ret))
    gains = gains.copy()
    libcutil.delete_doubleptr(ret)
    gains = c_double*3
    ret = libcutil.calc_lwgw(pointer(img),subwidth,subheight)
    gains = np.ctypeslib.as_array(gains.from_address(ret))
    gains = gains.copy()
    libcutil.delete_doubleptr(ret)

src/p/y/pyccv-0.07/src/pyccv/__init__.py   pyccv(Download)
                   rgbmatrix[2].ctypes.data_as(POINTER(c_ubyte)))
    ret = libccv.calc_ccv(pointer(img),threashold)
    descriptor = np.ctypeslib.as_array(ccv.from_address(ret))
    descriptor = descriptor.copy()
    libccv.delete_ptr(ret)

src/a/r/arachnid-0.1.7/arachnid/core/parallel/process_tasks.py   arachnid(Download)
 
                base[key] = multiprocessing.sharedctypes.RawArray(typecode, ar.ravel().shape[0])
                arr[key] = numpy.ctypeslib.as_array(base[key])
                arr[key] = arr[key].view(shmem_array_info[key].dtype).reshape(shmem_array_info[key].shape)
            shmem_map.append(arr)                                  
                ar_map={}
                for key in ar.iterkeys():
                    ar_map[key] = numpy.ctypeslib.as_array(ar[key])
                    ar_map[key] = ar_map[key].view(shmem_map[process_number][key].dtype).reshape(shmem_map[process_number][key].shape)
                extra.update(ar_map)

src/g/l/Glymur-0.5.10/glymur/jp2k.py   Glymur(Download)
            nelts = nrows * ncols
            band = np.ctypeslib.as_array(
                (ctypes.c_int32 * nelts).from_address(addr))
            data[:, :, k] = np.reshape(band.astype(dtype), (nrows, ncols))
 
            warnings.simplefilter("ignore")
            band = np.ctypeslib.as_array(
                (ctypes.c_int32 * nrows * ncols).from_address(addr))
        data.append(np.reshape(band.astype(dtype), (nrows, ncols)))
 

  1 | 2  Next