1
2
3
4
5
6
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
22 smlrlib = N.ctypeslib.load_library('smlrc', os.path.dirname(__file__))
23
24
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
44 arglist = extend_args(*args)
45 return func(*arglist)
46
47 if __debug__:
48 debug('INIT', 'mvpa.clfs.libsmlr end')
49