Example #1
0
def int_array(seq):
    size = len(seq)
    array = svmc.new_int(size)
    i = 0
    for item in seq:
        svmc.int_setitem(array, i, int(item))
        i = i + 1
    return array
Example #2
0
File: _svm.py Project: esc/PyMVPA
def int_array(seq):
    size = len(seq)
    array = svmc.new_int(size)
    for i, item in enumerate(seq):
        svmc.int_setitem(array, i, int(item))
    return array