| Home | Trees | Indices | Help |
|
|---|
|
|
1 #emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
2 #ex: set sts=4 ts=4 sw=4 et:
3 ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
4 #
5 # See COPYING file distributed along with the PyMVPA package for the
6 # copyright and license terms.
7 #
8 ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9 """Wraper for the stepwise_regression function for SMLR."""
10
11 if __debug__:
12 from mvpa.misc import debug
13 debug('INIT', 'mvpa.clfs.libsmlr')
14
15 import numpy as N
16 import ctypes as C
17 import os
18
19 from mvpa.clfs.libsmlr.ctypes_helper import extend_args, c_darray
20
21 # connect to library that's in this directory
22 smlrlib = N.ctypeslib.load_library('smlrc', os.path.dirname(__file__))
23
24 # wrap the stepwise function
26 func = smlrlib.stepwise_regression
27 func.argtypes = [C.c_int, C.c_int, c_darray,
28 C.c_int, C.c_int, c_darray,
29 C.c_int, C.c_int, c_darray,
30 C.c_int, C.c_int, c_darray,
31 C.c_int, C.c_int, c_darray,
32 C.c_int, c_darray,
33 C.c_int, c_darray,
34 C.c_int, c_darray,
35 C.c_int,
36 C.c_int,
37 C.c_double,
38 C.c_float,
39 C.c_float,
40 C.c_int64]
41 func.restype = C.c_long
42
43 # get the new arglist
44 arglist = extend_args(*args)
45 return func(*arglist)
46
47 if __debug__:
48 debug('INIT', 'mvpa.clfs.libsmlr end')
49
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun Jun 1 19:02:02 2008 | http://epydoc.sourceforge.net |