diff --git a/.gitignore b/.gitignore index 7d796ac..46f72e4 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,10 @@ __pycache__/ # environment .pyenv +.venv*/ + +# Local wheel artifacts +*.whl # Distribution / packaging .Python diff --git a/README.md b/README.md index f3bf25b..6765caa 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,21 @@ pip install spams Make sure you have install libblas & liblapack (see above) ```bash git clone https://github.com/getspams/spams-python -cd spams-python +# spams-python + +## OpenBLAS / OpenMP warning +If you see messages like: + +> OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option + +This comes from **OpenBLAS**, typically when: +- SPAMS was built with OpenMP enabled (for parallelism), and +- the linked OpenBLAS was built **without** OpenMP support. + +Usually it is just a warning, but if you want to silence/avoid it you can: +- Set `OPENBLAS_NUM_THREADS=1` (and/or `OMP_NUM_THREADS=1`) at runtime. +- Install an OpenBLAS build compiled with OpenMP (`USE_OPENMP=1`) or use MKL. +- Rebuild SPAMS without OpenMP by setting `SPAMS_DISABLE_OPENMP=1` (or `SPAMS_USE_OPENMP=0`) when installing. pip install -e . ``` diff --git a/pyproject.toml b/pyproject.toml index da6730d..1963944 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,7 @@ [build-system] -requires = ["oldest-supported-numpy", - "setuptools<60.0", - "distro", - "wheel"] +requires = [ + "setuptools>=64", + "wheel", + "numpy>=2.0.0", +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 6f90272..4cba32c 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, Extension from setuptools.command.build_ext import build_ext -from distutils.sysconfig import get_python_inc +import sysconfig # from distutils.util import get_platform def check_openmp(): @@ -43,17 +43,48 @@ def check_openmp(): # output : 0 if ok, 1 if not return result +def _split_env_paths(value: str): + if not value: + return [] + return [p for p in value.split(os.pathsep) if p] + + +def _split_env_args(value: str): + """Split a string of args like: "-Wl,--as-needed -lm".""" + if not value: + return [] + return value.split() + + +def _split_env_libs(value: str): + """Split a list of libraries from an env var. + + Accepts comma and/or whitespace separated values. + """ + if not value: + return [] + # allow: "openblas" or "blas,lapack" or "blas lapack" + return [x for x in value.replace(',', ' ').split() if x] + + +def _env_truthy(value: str) -> bool: + return value.strip().lower() not in {"0", "false", "no", "off", ""} + + def get_config(): # Import numpy here, only when headers are needed import numpy as np - from numpy.distutils.system_info import blas_info incs = ['spams_wrap'] for x in ['linalg', 'prox', 'decomp', 'dictLearn']: incs.append(os.path.join('spams_wrap', x)) + + # NumPy + Python headers incs.append(np.get_include()) - incs.append(get_python_inc()) - incs.extend(blas_info().get_include_dirs()) + incs.append(sysconfig.get_path('include')) + + # Optional user overrides + incs.extend(_split_env_paths(os.environ.get('SPAMS_INCLUDE_DIRS', ''))) cc_flags = ['-fPIC', '-Wunused-variable', '-Wno-uninitialized'] if sys.maxsize > 2**32: @@ -61,75 +92,44 @@ def get_config(): else: cc_flags.append('-m32') - # blas/lapack compile/linking info - try: - blas_opt_info = np.__config__.blas_opt_info - except: - try: - blas_opt_info = np.__config__.blas_ilp64_opt_info - except: - blas_opt_info = None - - try: - lapack_opt_info = np.__config__.lapack_opt_info - except: - try: - lapack_opt_info = np.__config__.lapack_ilp64_opt_info - except: - lapack_opt_info = None - - # blas extra compile args - if blas_opt_info is not None: - for _ in blas_opt_info.get('extra_compile_args', []): - if _ not in cc_flags: - cc_flags.append(_) - - # lapack extra compile args - if lapack_opt_info is not None: - for _ in lapack_opt_info.get('extra_compile_args', []): - if _ not in cc_flags: - cc_flags.append(_) - # linking flags link_flags = [] - # blas extra linking flags - if blas_opt_info is not None: - for _ in blas_opt_info.get('extra_link_args', []): - if _ not in link_flags: - link_flags.append(_) - - # lapack extra linking flags - if lapack_opt_info is not None: - for _ in lapack_opt_info.get('extra_link_args', []): - if _ not in link_flags: - link_flags.append(_) - - # libs - libs = ['stdc++'] - - # mkl ? - is_mkl = False - if blas_opt_info is not None: - for lib in blas_opt_info.get('libraries', []): - if 'mkl' in lib: - is_mkl = True - break - - libdirs = blas_info().get_lib_dirs() - if is_mkl: - for _ in blas_opt_info.get('include_dirs', []): - if _ not in incs: - incs.append(_) - for _ in blas_opt_info.get('library_dirs', []): - if _ not in libdirs: - libdirs.append(_) - libs.extend(['mkl_rt']) - else: - libs.extend(['blas', 'lapack']) + # BLAS/LAPACK + libs = [] + libdirs = _split_env_paths(os.environ.get('SPAMS_LIBRARY_DIRS', '')) - # openMP - if check_openmp() == 0: + env_libs = os.environ.get('SPAMS_BLAS_LIBS', '') + if env_libs: + libs.extend(_split_env_libs(env_libs)) + else: + if sys.platform == 'darwin': + # Apple Accelerate provides BLAS+LAPACK + link_flags.extend(['-framework', 'Accelerate']) + else: + libs.extend(['blas', 'lapack']) + + # Extra flags (escape hatch) + cc_flags.extend(_split_env_args(os.environ.get('SPAMS_EXTRA_COMPILE_ARGS', ''))) + link_flags.extend(_split_env_args(os.environ.get('SPAMS_EXTRA_LINK_ARGS', ''))) + + # OpenMP + # + # Some OpenBLAS builds (USE_OPENMP=0) emit a runtime warning when called from + # OpenMP regions. We keep OpenMP enabled by default for performance, but + # provide a build-time escape hatch: + # - SPAMS_DISABLE_OPENMP=1 (force off) + # - SPAMS_USE_OPENMP=0/1 (explicit on/off) + disable_openmp = os.environ.get('SPAMS_DISABLE_OPENMP', '') + use_openmp = os.environ.get('SPAMS_USE_OPENMP', '') + + enable_openmp = True + if disable_openmp: + enable_openmp = False + elif use_openmp: + enable_openmp = _env_truthy(use_openmp) + + if enable_openmp and check_openmp() == 0: cc_flags.append('-fopenmp') link_flags.append('-fopenmp') @@ -157,13 +157,22 @@ def run(self): def get_extension(): # Generic initialization of the extension - spams_wrap = Extension('_spams_wrap', - sources=['spams_wrap/spams_wrap.cpp'], - extra_compile_args=['-DNDEBUG', - '-DUSE_BLAS_LIB', - '-std=c++11'], - language='c++', - depends=['spams_wrap/spams.h']) + spams_wrap = Extension( + 'spams_wrap._spams_wrap', + sources=['spams_wrap/spams_wrap.cpp'], + define_macros=[ + # Build against NumPy 2.x but target the 1.19 C-API feature set. + # (NumPy 2 defaults to this, but we keep it explicit.) + ('NPY_TARGET_VERSION', 'NPY_1_19_API_VERSION'), + ], + extra_compile_args=[ + '-DNDEBUG', + '-DUSE_BLAS_LIB', + '-std=c++11', + ], + language='c++', + depends=['spams_wrap/spams.h'], + ) return [spams_wrap] @@ -194,8 +203,8 @@ def get_extension(): "Source": "https://github.com/getspams/spams-python", }, license='GPLv3', - python_requires='>=3', - install_requires=['numpy>=1.12', 'Pillow>=6.0', 'scipy>=1.0'], + python_requires='>=3.10', + install_requires=['numpy>=1.19', 'Pillow>=6.0', 'scipy>=1.0'], packages=['spams_wrap', 'spams', 'spams.tests'], cmdclass={'build_ext': CustomBuildExtCommand}, ext_modules=get_extension(), diff --git a/spams/__init__.py b/spams/__init__.py index 7f39bee..9cb4198 100644 --- a/spams/__init__.py +++ b/spams/__init__.py @@ -1,6 +1,13 @@ __all__ = ['spams'] -from pkg_resources import get_distribution -__version__ = get_distribution('spams').version +try: + from importlib.metadata import PackageNotFoundError, version +except ImportError: # pragma: no cover + from importlib_metadata import PackageNotFoundError, version + +try: + __version__ = version('spams') +except PackageNotFoundError: # pragma: no cover + __version__ = '0+unknown' from .spams import * diff --git a/spams_wrap/__init__.py b/spams_wrap/__init__.py index 5e5cfbe..8a6cdf7 100644 --- a/spams_wrap/__init__.py +++ b/spams_wrap/__init__.py @@ -1,6 +1,13 @@ -__all__ = ['spams_wrap', 'decomp','dictLearn','linalg','prox'] +__all__ = ['spams_wrap', 'decomp', 'dictLearn', 'linalg', 'prox'] -from pkg_resources import get_distribution -__version__ = get_distribution('spams').version +try: + from importlib.metadata import PackageNotFoundError, version +except ImportError: # pragma: no cover + from importlib_metadata import PackageNotFoundError, version + +try: + __version__ = version('spams') +except PackageNotFoundError: # pragma: no cover + __version__ = '0+unknown' from .spams_wrap import * diff --git a/spams_wrap/spams_wrap.cpp b/spams_wrap/spams_wrap.cpp index b032484..88fbf1a 100644 --- a/spams_wrap/spams_wrap.cpp +++ b/spams_wrap/spams_wrap.cpp @@ -1,44 +1,16 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.8 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.0 * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * Do not make changes to this file unless you know what you are doing - modify + * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#ifndef SWIGPYTHON +#define SWIG_VERSION 0x040200 #define SWIGPYTHON -#endif - #define SWIG_PYTHON_DIRECTOR_NO_VTABLE - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -106,9 +78,11 @@ template T SwigValueInit() { #endif /* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif # endif #endif @@ -161,16 +135,51 @@ template T SwigValueInit() { # pragma warning disable 592 #endif +#if __cplusplus >=201103L +# define SWIG_NULLPTR nullptr +#else +# define SWIG_NULLPTR NULL +#endif + + +#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) +/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ +# include +#endif + +#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN) +#define PY_SSIZE_T_CLEAN +#endif + +#if __GNUC__ >= 7 +#pragma GCC diagnostic push +#if defined(__cplusplus) && __cplusplus >=201703L +#pragma GCC diagnostic ignored "-Wregister" /* For python-2.7 headers that use register */ +#endif +#endif #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) /* Use debug wrappers with the Python release dll */ + +#if defined(_MSC_VER) && _MSC_VER >= 1929 +/* Workaround compilation errors when redefining _DEBUG in MSVC 2019 version 16.10 and later + * See https://github.com/swig/swig/issues/2090 */ +# include +#endif + # undef _DEBUG # include -# define _DEBUG +# define _DEBUG 1 #else # include #endif +#if __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif + +#include + /* ----------------------------------------------------------------------------- * swigrun.swg * @@ -216,6 +225,9 @@ template T SwigValueInit() { /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 +#define SWIG_POINTER_CLEAR 0x8 +#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN) /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -287,7 +299,7 @@ template T SwigValueInit() { SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this + allows returning the 'cast rank', for example, if you have this int food(double) int fooi(int); @@ -301,7 +313,13 @@ template T SwigValueInit() { */ #define SWIG_OK (0) +/* Runtime errors are < 0 */ #define SWIG_ERROR (-1) +/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */ +/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */ +/* Errors < -200 are generic runtime specific errors */ +#define SWIG_ERROR_RELEASE_NOT_OWNED (-200) + #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) @@ -309,14 +327,14 @@ template T SwigValueInit() { #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ +/* The TmpMask is for in/out typemaps that use temporary objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ +/* Check, add and del object mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) @@ -345,6 +363,23 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif +/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF + * if you're missing it. + */ +#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \ + (defined __cplusplus && __cplusplus >= 201103L) || \ + defined SWIG_HAVE_SNPRINTF) && \ + !defined SWIG_NO_SNPRINTF +# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A) +# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B) +#else +/* Fallback versions ignore the buffer size, but most of our uses either have a + * fixed maximum possible size or dynamically allocate a buffer that's large + * enough. + */ +# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A) +# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B) +#endif #include @@ -462,7 +497,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { +SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { @@ -522,9 +557,9 @@ SWIG_TypeName(const swig_type_info *ty) { SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ + type, separated by vertical-bar characters. Choose the last + name. It should be the most specific; a fully resolved name + but not necessarily with default template parameters expanded. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; @@ -668,16 +703,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { char d = *(c++); unsigned char uu; if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); + uu = (unsigned char)((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); + uu = (unsigned char)((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); + uu |= (unsigned char)(d - '0'); else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); + uu |= (unsigned char)(d - ('a'-10)); else return (char *) 0; *u = uu; @@ -744,7 +779,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { } #endif -/* Errors in SWIG */ +/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 @@ -760,7 +795,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #define SWIG_NullReferenceError -13 - /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 @@ -776,7 +810,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif @@ -794,34 +827,29 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #endif -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) +/* Wrapper around PyUnicode_AsUTF8AndSize - call Py_XDECREF on the returned pbytes when finished with the returned string */ +SWIGINTERN const char * +SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes) { -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; +#if PY_VERSION_HEX >= 0x03030000 +# if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000 + *pbytes = NULL; + return PyUnicode_AsUTF8AndSize(str, psize); +# else + *pbytes = PyUnicode_AsUTF8String(str); + const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); + return chars; +# endif #else - return PyString_AsString(str); + char *chars = NULL; + *pbytes = NULL; + PyString_AsStringAndSize(str, &chars, psize); + return chars; #endif } -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { @@ -832,152 +860,37 @@ SWIG_Python_str_FromChar(const char *c) #endif } -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) +/* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +#ifdef SWIGPYTHON_BUILTIN +# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule_builtin" SWIG_TYPE_TABLE_NAME +#else +# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule" SWIG_TYPE_TABLE_NAME #endif +# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION "." SWIGPY_CAPSULE_ATTR_NAME) #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +#ifdef Py_LIMITED_API +# define PyTuple_GET_ITEM PyTuple_GetItem +/* Note that PyTuple_SetItem() has different semantics from PyTuple_SET_ITEM as it decref's the original tuple item, so in general they cannot be used + interchangeably. However in SWIG-generated code PyTuple_SET_ITEM is only used with newly initialized tuples without any items and for them this does work. */ +# define PyTuple_SET_ITEM PyTuple_SetItem +# define PyTuple_GET_SIZE PyTuple_Size +# define PyCFunction_GET_FLAGS PyCFunction_GetFlags +# define PyCFunction_GET_FUNCTION PyCFunction_GetFunction +# define PyCFunction_GET_SELF PyCFunction_GetSelf +# define PyList_GET_ITEM PyList_GetItem +# define PyList_SET_ITEM PyList_SetItem +# define PySliceObject PyObject #endif /* ----------------------------------------------------------------------------- @@ -1035,15 +948,19 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *value = 0; PyObject *traceback = 0; - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (PyErr_Occurred()) + PyErr_Fetch(&type, &value, &traceback); if (value) { - char *tmp; PyObject *old_str = PyObject_Str(value); + PyObject *bytes = NULL; + const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); + if (tmp) + PyErr_Format(type, "%s %s", tmp, mesg); + else + PyErr_Format(type, "%s", mesg); + Py_XDECREF(bytes); Py_DECREF(old_str); Py_DECREF(value); } else { @@ -1051,6 +968,41 @@ SWIG_Python_AddErrorMsg(const char* mesg) } } +SWIGRUNTIME int +SWIG_Python_TypeErrorOccurred(PyObject *obj) +{ + PyObject *error; + if (obj) + return 0; + error = PyErr_Occurred(); + return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); +} + +SWIGRUNTIME void +SWIG_Python_RaiseOrModifyTypeError(const char *message) +{ + if (SWIG_Python_TypeErrorOccurred(NULL)) { + /* Use existing TypeError to preserve stacktrace and enhance with given message */ + PyObject *newvalue; + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); +#if PY_VERSION_HEX >= 0x03000000 + newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); +#else + newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); +#endif + if (newvalue) { + Py_XDECREF(value); + PyErr_Restore(type, newvalue, traceback); + } else { + PyErr_Restore(type, value, traceback); + } + } else { + /* Raise TypeError using given message */ + PyErr_SetString(PyExc_TypeError, message); + } +} + #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS @@ -1058,13 +1010,15 @@ SWIG_Python_AddErrorMsg(const char* mesg) #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif +# define SWIG_PYTHON_USE_GIL # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# if PY_VERSION_HEX < 0x03070000 +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# else +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { @@ -1079,7 +1033,7 @@ SWIG_Python_AddErrorMsg(const char* mesg) bool status; PyThreadState *save; public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + void end() { if (status) { status = false; PyEval_RestoreThread(save); }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; @@ -1137,30 +1091,13 @@ extern "C" { /* Constant information structure */ typedef struct swig_const_info { int type; - char *name; + const char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - #ifdef __cplusplus } #endif @@ -1175,6 +1112,14 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), * * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ +# error "This version of SWIG only supports Python >= 2.7" +#endif + +#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03030000 +# error "This version of SWIG only supports Python 3 >= 3.3" +#endif + /* Common SWIG API */ /* for raw pointers */ @@ -1258,11 +1203,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else PyDict_SetItemString(d, name, obj); -#endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); @@ -1272,11 +1213,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else PyDict_SetItemString(d, name, obj); -#endif Py_DECREF(obj); } @@ -1286,7 +1223,6 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { @@ -1296,35 +1232,17 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); - PyList_SetItem(result, 0, o2); + if (result) { + PyList_SET_ITEM(result, 0, o2); + } else { + Py_DECREF(obj); + return o2; + } } PyList_Append(result,obj); Py_DECREF(obj); } return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif } /* Unpack the argument tuple */ @@ -1375,12 +1293,21 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi } } +SWIGINTERN int +SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { + int no_kwargs = 1; + if (kwargs) { + assert(PyDict_Check(kwargs)); + if (PyDict_Size(kwargs) > 0) { + PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); + no_kwargs = 0; + } + } + return no_kwargs; +} + /* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif /* Helper for static pointer initialization for both C and C++ code, for example @@ -1392,6 +1319,261 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif +#ifdef __cplusplus +extern "C" { +#endif + +/* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + +/* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + +typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; +} swig_globalvar; + +typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; +} swig_varlinkobject; + +SWIGINTERN PyObject * +swig_varlink_repr(PyObject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else + return PyString_FromString(""); +#endif +} + +SWIGINTERN PyObject * +swig_varlink_str(PyObject *o) { + swig_varlinkobject *v = (swig_varlinkobject *) o; +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; +} + +SWIGINTERN void +swig_varlink_dealloc(PyObject *o) { + swig_varlinkobject *v = (swig_varlinkobject *) o; + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } +} + +SWIGINTERN PyObject * +swig_varlink_getattr(PyObject *o, char *n) { + swig_varlinkobject *v = (swig_varlinkobject *) o; + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; +} + +SWIGINTERN int +swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { + swig_varlinkobject *v = (swig_varlinkobject *) o; + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; +} + +SWIGINTERN PyTypeObject* +swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; +#ifndef Py_LIMITED_API + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc)0, /*tp_print*/ +#else + (Py_ssize_t)0, /*tp_vectorcall_offset*/ +#endif + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030C0000 + 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; + if (PyType_Ready(&varlink_type) < 0) + return NULL; + } + return &varlink_type; +#else + PyType_Slot slots[] = { + { Py_tp_dealloc, (void *)swig_varlink_dealloc }, + { Py_tp_repr, (void *)swig_varlink_repr }, + { Py_tp_getattr, (void *)swig_varlink_getattr }, + { Py_tp_setattr, (void *)swig_varlink_setattr }, + { Py_tp_str, (void *)swig_varlink_str }, + { Py_tp_doc, (void *)varlink__doc__ }, + { 0, NULL } + }; + PyType_Spec spec = { + "swigvarlink", + sizeof(swig_varlinkobject), + 0, + Py_TPFLAGS_DEFAULT, + slots + }; + return (PyTypeObject *)PyType_FromSpec(&spec); +#endif +} + +/* Create a variable linking object for use later */ +SWIGINTERN PyObject * +SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_New(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); +} + +SWIGINTERN void +SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + memcpy(gv->name, name, size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; +} + + +static PyObject *Swig_Globals_global = NULL; + +SWIGINTERN PyObject * +SWIG_globals(void) { + if (Swig_Globals_global == NULL) { + Swig_Globals_global = SWIG_newvarlink(); + } + return Swig_Globals_global; +} + +#ifdef __cplusplus +} +#endif + /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ @@ -1409,35 +1591,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi extern "C" { #endif -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - /* The python void return value */ SWIGRUNTIMEINLINE PyObject * @@ -1464,7 +1617,10 @@ SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; + int fail = data ? data->implicitconv : 0; + if (fail) + PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); + return fail; } SWIGRUNTIMEINLINE PyObject * @@ -1488,38 +1644,34 @@ SwigPyClientData_New(PyObject* obj) /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - data->newargs = obj; Py_INCREF(obj); + data->newargs = obj; } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif + data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); + data->newargs = PyTuple_New(1); + if (data->newargs) { + Py_INCREF(obj); + PyTuple_SET_ITEM(data->newargs, 0, obj); + } else { + Py_DECREF(data->newraw); + Py_DECREF(data->klass); + free(data); + return 0; + } } else { - data->newargs = obj; + Py_INCREF(obj); + data->newargs = obj; } - Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif + data->delargs = !(PyCFunction_GET_FLAGS(data->destroy) & METH_O); } else { data->delargs = 0; } @@ -1530,10 +1682,13 @@ SwigPyClientData_New(PyObject* obj) } SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { +SwigPyClientData_Del(SwigPyClientData *data) +{ + Py_XDECREF(data->klass); Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); + free(data); } /* =============== SwigPyObject =====================*/ @@ -1560,7 +1715,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_INCREF(sobj->dict); + Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1578,18 +1733,21 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + PyObject *val = SwigPyObject_long(v); + if (val) { + PyObject *ofmt; + PyTuple_SET_ITEM(args, 0, val); + ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); + res = PyUnicode_Format(ofmt,args); #else - res = PyString_Format(ofmt,args); + res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + Py_DECREF(ofmt); } - Py_DECREF(args); } + Py_DECREF(args); } return res; } @@ -1607,30 +1765,35 @@ SwigPyObject_hex(SwigPyObject *v) } SWIGRUNTIME PyObject * -#ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS + if (repr && v->next) { PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif + if (nrep) { # if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; # else - PyString_ConcatAndDel(&repr,nrep); + PyString_ConcatAndDel(&repr,nrep); # endif + } else { + Py_DecRef(repr); + repr = NULL; + } } - return repr; + return repr; +} + +/* We need a version taking two PyObject* parameters so it's a valid + * PyCFunction to use in swigobject_methods[]. */ +SWIGRUNTIME PyObject * +SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + return SwigPyObject_repr((SwigPyObject*)v); } SWIGRUNTIME int @@ -1645,12 +1808,14 @@ SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + PyObject* res = NULL; + if (!PyErr_Occurred()) { + if (op != Py_EQ && op != Py_NE) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } @@ -1678,20 +1843,34 @@ SwigPyObject_type(void) { SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) + PyTypeObject *op_type = Py_TYPE(op); +#ifdef SWIGPYTHON_BUILTIN + if (PyType_IsSubtype(op_type, target_tp)) return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); + return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); + if (op_type == target_tp) + return 1; +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + if (!tp_name) + return 0; + cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); + Py_DECREF(tp_name); + return cmp == 0; +# else + return (strcmp(op_type->tp_name, "SwigPyObject") == 0); +# endif #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); +static PyObject* Swig_Capsule_global = NULL; + SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { @@ -1706,20 +1885,24 @@ SwigPyObject_dealloc(PyObject *v) PyObject *res; /* PyObject_CallFunction() has the potential to silently drop - the active active exception. In cases of unnamed temporary + the active exception. In cases of unnamed temporary variable or where we just finished iterating over a generator StopIteration will be active right now, and this needs to remain true upon return from SwigPyObject_dealloc. So save and restore. */ - PyObject *val = NULL, *type = NULL, *tb = NULL; - PyErr_Fetch(&val, &type, &tb); + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); + if (tmp) { + res = SWIG_Python_CallFunctor(destroy, tmp); + } else { + res = 0; + } + Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1728,7 +1911,7 @@ SwigPyObject_dealloc(PyObject *v) if (!res) PyErr_WriteUnraisable(destroy); - PyErr_Restore(val, type, tb); + PyErr_Restore(type, value, traceback); Py_XDECREF(res); } @@ -1738,8 +1921,12 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - } + Py_XDECREF(Swig_Capsule_global); + } Py_XDECREF(next); +#ifdef SWIGPYTHON_BUILTIN + Py_XDECREF(sobj->dict); +#endif PyObject_DEL(v); } @@ -1747,26 +1934,18 @@ SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif if (!SwigPyObject_Check(next)) { PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } + ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { @@ -1778,11 +1957,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) } SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; @@ -1790,11 +1965,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) } SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; @@ -1805,75 +1976,37 @@ SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { + return NULL; + } else { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { + if (PyObject_IsTrue(val)) { + Py_DECREF(SwigPyObject_acquire(v,args)); + } else { + Py_DECREF(SwigPyObject_disown(v,args)); + } } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } + return obj; + } } -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else static PyMethodDef swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, + {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, + {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, + {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, + {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, + {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, {0, 0, 0, 0} }; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - +#ifndef Py_LIMITED_API static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -1913,12 +2046,8 @@ SwigPyObject_TypeOnce(void) { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ +#else 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -1926,26 +2055,25 @@ SwigPyObject_TypeOnce(void) { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - (char *)"SwigPyObject", /* tp_name */ + "SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc)0, /*tp_print*/ #else - (getattrfunc)0, /* tp_getattr */ + (Py_ssize_t)0, /*tp_vectorcall_offset*/ #endif + (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif @@ -1955,7 +2083,7 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ + 0, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ @@ -1965,7 +2093,6 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ @@ -1986,47 +2113,74 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ -#endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030C0000 + 0, /* tp_watched */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ -#endif 0 /* tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) + if (PyType_Ready(&swigpyobject_type) != 0) return NULL; -#endif } return &swigpyobject_type; +#else + PyType_Slot slots[] = { + { Py_tp_dealloc, (void *)SwigPyObject_dealloc }, + { Py_tp_repr, (void *)SwigPyObject_repr }, + { Py_tp_getattro, (void *)PyObject_GenericGetAttr }, + { Py_tp_doc, (void *)swigobject_doc }, + { Py_tp_richcompare, (void *)SwigPyObject_richcompare }, + { Py_tp_methods, (void *)swigobject_methods }, + { Py_nb_int, (void *)SwigPyObject_long }, + { 0, NULL } + }; + PyType_Spec spec = { + "SwigPyObject", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT, + slots + }; + return (PyTypeObject *)PyType_FromSpec(&spec); +#endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; +#ifdef SWIGPYTHON_BUILTIN + sobj->dict = 0; +#endif + if (own == SWIG_POINTER_OWN) { + /* Obtain a reference to the Python capsule wrapping the module information, so that the + * module information is correctly destroyed after all SWIG python objects have been freed + * by the GC (and corresponding destructors invoked) */ + Py_XINCREF(Swig_Capsule_global); + } } return (PyObject *)sobj; } @@ -2042,20 +2196,6 @@ typedef struct { size_t size; } SwigPyPacked; -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { @@ -2084,7 +2224,7 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); + return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); @@ -2097,8 +2237,20 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); + PyTypeObject* op_type = Py_TYPE(op); + if (op_type == SwigPyPacked_TypeOnce()) + return 1; +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + if (!tp_name) + return 0; + cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); + Py_DECREF(tp_name); + return cmp == 0; +#else + return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); +#endif } SWIGRUNTIME void @@ -2114,22 +2266,26 @@ SwigPyPacked_dealloc(PyObject *v) SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; +#ifndef Py_LIMITED_API static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - (char *)"SwigPyPacked", /* tp_name */ + "SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc)0, /*tp_print*/ +#else + (Py_ssize_t)0, /*tp_vectorcall_offset*/ +#endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 @@ -2153,7 +2309,6 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ @@ -2174,42 +2329,58 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ -#endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030C0000 + 0, /* tp_watched */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ -#endif 0 /* tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) + if (PyType_Ready(&swigpypacked_type) != 0) return NULL; -#endif } return &swigpypacked_type; +#else + PyType_Slot slots[] = { + { Py_tp_dealloc, (void *)SwigPyPacked_dealloc }, + { Py_tp_repr, (void *)SwigPyPacked_repr }, + { Py_tp_str, (void *)SwigPyPacked_str }, + { Py_tp_getattro, (void *)PyObject_GenericGetAttr }, + { Py_tp_doc, (void *)swigpacked_doc }, + { 0, NULL } + }; + PyType_Spec spec = { + "SwigPyPacked", + sizeof(SwigPyPacked), + 0, + Py_TPFLAGS_DEFAULT, + slots + }; + return (PyTypeObject *)PyType_FromSpec(&spec); +#endif } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + SwigPyPacked *sobj = PyObject_New(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { @@ -2242,20 +2413,14 @@ SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) * pointers/data manipulation * ----------------------------------------------------------------------------- */ -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; +static PyObject *Swig_This_global = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; + if (Swig_This_global == NULL) + Swig_This_global = SWIG_Python_str_FromChar("this"); + return Swig_This_global; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ @@ -2287,7 +2452,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) obj = 0; -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { @@ -2357,7 +2522,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int if (obj == Py_None && !implicit_conv) { if (ptr) *ptr = 0; - return SWIG_OK; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; } res = SWIG_ERROR; @@ -2396,12 +2561,19 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; + if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !sobj->own) { + res = SWIG_ERROR_RELEASE_NOT_OWNED; + } else { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + if (flags & SWIG_POINTER_CLEAR) { + sobj->ptr = 0; + } + res = SWIG_OK; } - res = SWIG_OK; } else { if (implicit_conv) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; @@ -2437,13 +2609,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } } } return res; @@ -2457,31 +2629,38 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; - + swig_cast_info *tc; + /* here we get the method pointer for callbacks */ +#ifndef Py_LIMITED_API const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); +#else + PyObject* pystr_doc = PyObject_GetAttrString(obj, "__doc__"); + PyObject *bytes = NULL; + const char *doc = pystr_doc ? SWIG_PyUnicode_AsUTF8AndSize(pystr_doc, NULL, &bytes) : 0; +#endif const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) +#ifdef Py_LIMITED_API + Py_XDECREF(bytes); + Py_XDECREF(pystr_doc); +#endif + if (!desc) return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } + tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ } else { - *ptr = vptr; + return SWIG_ERROR; } return SWIG_OK; } } -/* Convert a packed value value */ +/* Convert a packed pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { @@ -2509,7 +2688,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { -#if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { @@ -2518,88 +2696,80 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + } else{ + Py_DECREF(inst); + inst = 0; + } } #else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } #endif } } else { #if PY_VERSION_HEX >= 0x03000000 - inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } + PyObject *empty_args = PyTuple_New(0); + if (empty_args) { + PyObject *empty_kwargs = PyDict_New(); + if (empty_kwargs) { +#ifndef Py_LIMITED_API + newfunc newfn = ((PyTypeObject *)data->newargs)->tp_new; #else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } + newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; + inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); + Py_DECREF(empty_kwargs); + if (inst) { + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } else { + PyType_Modified(Py_TYPE(inst)); + } + } + } + Py_DECREF(empty_args); + } #else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } #endif + } + return inst; } -SWIGRUNTIME void +SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + if (dict) { + return PyDict_SetItem(dict, SWIG_This(), swig_this); + } else{ + return -1; + } + } #endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); + return PyObject_SetAttr(inst, SWIG_This(), swig_this); } @@ -2611,9 +2781,10 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); + Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); + if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) + return NULL; } return SWIG_Py_Void(); } @@ -2637,7 +2808,12 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); +#ifndef Py_LIMITED_API + allocfunc alloc = clientdata->pytype->tp_alloc; +#else + allocfunc alloc = (allocfunc)PyType_GetSlot(clientdata->pytype, Py_tp_alloc); +#endif + PyObject *next_self = alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; @@ -2649,7 +2825,9 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); #ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; + if (newobj) { + newobj->dict = 0; + } #endif } if (newobj) { @@ -2688,115 +2866,83 @@ SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { void *SWIG_ReturnGlobalTypeList(void *); #endif +static PyObject *Swig_TypeCache_global = NULL; + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + if (Swig_TypeCache_global == NULL) { + Swig_TypeCache_global = PyDict_New(); + } + return Swig_TypeCache_global; +} + SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { +#ifdef SWIG_LINK_RUNTIME static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); + } #else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif + void *type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; } +#endif return (swig_module_info *) type_pointer; } -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif + +static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */ SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif { -#ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif swig_type_info **types = swig_module->types; size_t i; + if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */ + return; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + ty->clientdata = 0; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); - swig_this = NULL; + Swig_This_global = NULL; + Py_DECREF(SWIG_globals()); + Swig_Globals_global = NULL; + Py_DECREF(SWIG_Python_TypeCache()); + Swig_TypeCache_global = NULL; + Swig_Capsule_global = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); + PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); + PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif -#ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + if (PyModule_AddObject(module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) { + ++interpreter_counter; + Swig_Capsule_global = pointer; + } else { + Py_DECREF(pointer); + } } else { Py_XDECREF(pointer); } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; } SWIGRUNTIME swig_type_info * @@ -2807,22 +2953,16 @@ SWIG_Python_TypeQuery(const char *type) PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { -#ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + if (obj) { + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } } } Py_DECREF(key); @@ -2845,16 +2985,18 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { - char *tmp; PyObject *old_str = PyObject_Str(value); + PyObject *bytes = NULL; + const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); + const char *errmesg = tmp ? tmp : "Invalid error message"; Py_XINCREF(type); PyErr_Clear(); if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); + PyErr_Format(type, "%s %s", mesg, errmesg); } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + PyErr_Format(type, "%s %s", errmesg, mesg); } - SWIG_Python_str_DelForPy3(tmp); + Py_XDECREF(bytes); Py_DECREF(old_str); } return 1; @@ -2899,21 +3041,25 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) } else #endif { +#ifndef Py_LIMITED_API + /* tp_name is not accessible */ const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + PyObject *bytes = NULL; + const char *cstr = str ? SWIG_PyUnicode_AsUTF8AndSize(str, NULL, &bytes) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } + Py_XDECREF(bytes); Py_XDECREF(str); return; } +#endif } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { @@ -2928,12 +3074,6 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(arg void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif } return result; } @@ -2964,7 +3104,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { } if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) + if (PyType_Ready(tp) != 0) goto done; } @@ -2978,6 +3118,8 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); + if (!encoded_name) + goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); @@ -3000,7 +3142,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else +#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0) @@ -3026,11 +3168,10 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; /* -------- TYPES TABLE (END) -------- */ -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif +#ifdef SWIG_TypeQuery +# undef SWIG_TypeQuery #endif +#define SWIG_TypeQuery SWIG_Python_TypeQuery /*----------------------------------------------- @(target):= _spams_wrap.so @@ -3044,8 +3185,52 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; #endif #define SWIG_name "_spams_wrap" -#define SWIGVERSION 0x030008 -#define SWIG_VERSION SWIGVERSION +#ifdef __cplusplus +#include +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigSmartPointer { + T *ptr; + SwigSmartPointer(T *p) : ptr(p) { } + ~SwigSmartPointer() { delete ptr; } + SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; } +#if __cplusplus >=201103L + SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; } + operator T&&() const { return std::move(*pointer.ptr); } +#else + operator T&() const { return *pointer.ptr; } +#endif + T *operator&() const { return pointer.ptr; } + static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); } +}; + +/* + * SwigValueInit() is a generic initialisation solution as the following approach: + * + * T c_result = T(); + * + * doesn't compile for all types for example: + * + * unsigned int c_result = unsigned int(); + */ +template T SwigValueInit() { + return T(); +} + +#if __cplusplus >=201103L +# define SWIG_STD_MOVE(OBJ) std::move(OBJ) +#else +# define SWIG_STD_MOVE(OBJ) OBJ +#endif + +#endif #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) @@ -3128,7 +3313,7 @@ namespace swig { #define SWIG_FILE_WITH_INIT #include "spams.h" -#include "prox/groups-graph.h" +#include "groups-graph.h" #ifdef DEBUG #include "spams-tst.h" @@ -3174,7 +3359,7 @@ SWIG_AsVal_double (PyObject *obj, double *val) return SWIG_OK; #if PY_VERSION_HEX < 0x03000000 } else if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); + if (val) *val = (double) PyInt_AsLong(obj); return SWIG_OK; #endif } else if (PyLong_Check(obj)) { @@ -3221,9 +3406,11 @@ SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + double fx, cx, rd; + errno = 0; + fx = floor(x); + cx = ceil(x); + rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { @@ -3279,7 +3466,12 @@ SWIG_AsVal_long (PyObject *obj, long* val) if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + // Largest double not larger than LONG_MAX (not portably calculated easily) + // Note that double(LONG_MAX) is stored in a double rounded up by one (for 64-bit long) + // 0x7ffffffffffffc00LL == (int64_t)std::nextafter(double(__uint128_t(LONG_MAX)+1), double(0)) + const double long_max = sizeof(long) == 8 ? 0x7ffffffffffffc00LL : LONG_MAX; + // No equivalent needed for 64-bit double(LONG_MIN) is exactly LONG_MIN + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, long_max)) { if (val) *val = (long)(d); return res; } @@ -3319,67 +3511,53 @@ SWIG_pchar_descriptor(void) } +/* Return string from Python obj. NOTE: obj must remain in scope in order + to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else if (PyUnicode_Check(obj)) +#endif #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; + PyObject *bytes = NULL; + int ret = SWIG_OK; + if (alloc) + *alloc = SWIG_OLDOBJ; +#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; #else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { + cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes); + if (!cstr) + return SWIG_TypeError; + /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */ + if (bytes && cptr) { if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } + cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif - *cptr = SWIG_Python_str_AsChar(obj); + /* alloc must be set in order to clean up allocated memory */ + return SWIG_RuntimeError; } } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); #endif - return SWIG_OK; + if (cptr) *cptr = cstr; + if (psize) *psize = len + 1; + Py_XDECREF(bytes); + return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif #if PY_VERSION_HEX<0x03000000 if (PyUnicode_Check(obj)) { char *cstr; Py_ssize_t len; @@ -3387,10 +3565,12 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (cptr) { if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); } if (psize) *psize = len + 1; @@ -3431,10 +3611,10 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 -#if PY_VERSION_HEX >= 0x03010000 - return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); #else - return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); + return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); #endif #else return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); @@ -3462,7 +3642,7 @@ SWIGINTERNINLINE PyObject* /* Support older NumPy data type names */ -#if NDARRAY_VERSION < 0x01000000 +#if (defined(NDARRAY_VERSION) && (NDARRAY_VERSION < 0x01000000)) || (defined(NPY_VERSION) && (NPY_VERSION < 0x01000000)) #define NPY_BOOL PyArray_BOOL #define NPY_BYTE PyArray_BYTE #define NPY_UBYTE PyArray_UBYTE @@ -3516,7 +3696,7 @@ SWIGINTERNINLINE PyObject* /* Macros to extract array attributes. */ #define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) -#define array_type(a) (int)(PyArray_TYPE(a)) +#define array_type(a) (int)(PyArray_TYPE((const PyArrayObject *)(a))) #define array_numdims(a) (((PyArrayObject *)a)->nd) #define array_dimensions(a) (((PyArrayObject *)a)->dimensions) #define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) @@ -3622,7 +3802,7 @@ SWIGINTERNINLINE PyObject* } else { - py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT); + py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT); /* If NULL, PyArray_FromObject will have set python error value.*/ ary = (PyArrayObject*) py_obj; *is_new_object = 1; @@ -3673,7 +3853,7 @@ SWIGINTERNINLINE PyObject* else { Py_INCREF(ary->descr); - result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_FORTRAN); + result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_ARRAY_F_CONTIGUOUS); *is_new_object = 1; } return result; @@ -3758,7 +3938,7 @@ SWIGINTERNINLINE PyObject* } else { - py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT); + py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT); /* If NULL, PyArray_FromObject will have set python error value.*/ ary = (PyArrayObject*) py_obj; *is_new_object = 1; @@ -3968,7 +4148,7 @@ SWIGINTERNINLINE PyObject* int i; if (array_is_fortran(ary)) return success; /* Set the FORTRAN ordered flag */ - ary->flags = NPY_FARRAY; + ary->flags = NPY_ARRAY_FARRAY; /* Recompute the strides */ ary->strides[0] = ary->strides[nd-1]; for (i=1; i < nd; ++i) @@ -3994,8 +4174,27 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */ #ifndef SWIG_isfinite +/* isfinite() is a macro for C99 */ # if defined(isfinite) # define SWIG_isfinite(X) (isfinite(X)) +# elif defined(__cplusplus) && __cplusplus >= 201103L +/* Use a template so that this works whether isfinite() is std::isfinite() or + * in the global namespace. The reality seems to vary between compiler + * versions. + * + * Make sure namespace std exists to avoid compiler warnings. + * + * extern "C++" is required as this fragment can end up inside an extern "C" { } block + */ +namespace std { } +extern "C++" template +inline int SWIG_isfinite_func(T x) { + using namespace std; + return isfinite(x); +} +# define SWIG_isfinite(X) (SWIG_isfinite_func(X)) +# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +# define SWIG_isfinite(X) (__builtin_isfinite(X)) # elif defined(_MSC_VER) # define SWIG_isfinite(X) (_finite(X)) # elif defined(__sun) && defined(__SVR4) @@ -4043,16 +4242,18 @@ SWIG_AsVal_float (PyObject * obj, float *val) #ifdef __cplusplus extern "C" { #endif -SWIGINTERN PyObject *_wrap_m_ones(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_m_ones(PyObject *self, PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; int *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:m_ones",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "m_ones" "', argument " "1"" of type '" "int""'"); } @@ -4065,17 +4266,19 @@ SWIGINTERN PyObject *_wrap_m_ones(PyObject *SWIGUNUSEDPARM(self), PyObject *args } -SWIGINTERN PyObject *_wrap_skip_space(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_skip_space(PyObject *self, PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:skip_space",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "skip_space" "', argument " "1"" of type '" "char *""'"); } @@ -4090,7 +4293,7 @@ SWIGINTERN PyObject *_wrap_skip_space(PyObject *SWIGUNUSEDPARM(self), PyObject * } -SWIGINTERN PyObject *_wrap_parse_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_parse_line(PyObject *self, PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; std::vector< std::string > *arg2 = 0 ; @@ -4099,17 +4302,17 @@ SWIGINTERN PyObject *_wrap_parse_line(PyObject *SWIGUNUSEDPARM(self), PyObject * int alloc1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; int result; - if (!PyArg_ParseTuple(args,(char *)"OO:parse_line",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + (void)self; + if (!SWIG_Python_UnpackTuple(args, "parse_line", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parse_line" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__string_t, 0 ); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "parse_line" "', argument " "2"" of type '" "std::vector< std::string > &""'"); } @@ -4127,17 +4330,19 @@ SWIGINTERN PyObject *_wrap_parse_line(PyObject *SWIGUNUSEDPARM(self), PyObject * } -SWIGINTERN PyObject *_wrap_intlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_intlist(PyObject *self, PyObject *args) { PyObject *resultobj = 0; string arg1 ; void *argp1 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; std::vector< int > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:intlist",&obj0)) SWIG_fail; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; { - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_string, 0 | 0); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_string, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intlist" "', argument " "1"" of type '" "string""'"); } @@ -4149,7 +4354,7 @@ SWIGINTERN PyObject *_wrap_intlist(PyObject *SWIGUNUSEDPARM(self), PyObject *arg if (SWIG_IsNewObj(res1)) delete temp; } } - result = (std::vector< int > *)intlist(arg1); + result = (std::vector< int > *)intlist(SWIG_STD_MOVE(arg1)); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); return resultobj; fail: @@ -4157,36 +4362,33 @@ SWIGINTERN PyObject *_wrap_intlist(PyObject *SWIGUNUSEDPARM(self), PyObject *arg } -SWIGINTERN PyObject *_wrap_sort__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_sort__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Vector< double > *arg1 = (Vector< double > *) 0 ; bool arg2 ; PyArrayObject *array1 = NULL ; bool val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:sort",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); if (!array1 || !require_dimensions(array1,1) || !require_contiguous(array1) || !require_native(array1)) SWIG_fail; arg1 = new Vector ((double *)array_data(array1),(int)array_size(array1,0)); } - ecode2 = SWIG_AsVal_bool(obj1, &val2); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sort" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); try { _sort< double >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -4200,36 +4402,33 @@ SWIGINTERN PyObject *_wrap_sort__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_sort__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_sort__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Vector< float > *arg1 = (Vector< float > *) 0 ; bool arg2 ; PyArrayObject *array1 = NULL ; bool val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:sort",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); if (!array1 || !require_dimensions(array1,1) || !require_contiguous(array1) || !require_native(array1)) SWIG_fail; arg1 = new Vector ((float *)array_data(array1),(int)array_size(array1,0)); } - ecode2 = SWIG_AsVal_bool(obj1, &val2); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sort" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); try { _sort< float >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -4248,15 +4447,11 @@ SWIGINTERN PyObject *_wrap_sort(PyObject *self, PyObject *args) { PyObject *argv[3] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "sort", 0, 2, argv))) SWIG_fail; + --argc; if (argc == 2) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 1) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -4267,12 +4462,12 @@ SWIGINTERN PyObject *_wrap_sort(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_sort__SWIG_0(self, args); + return _wrap_sort__SWIG_0(self, argc, argv); } } } if (argc == 2) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 1) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -4283,13 +4478,13 @@ SWIGINTERN PyObject *_wrap_sort(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_sort__SWIG_1(self, args); + return _wrap_sort__SWIG_1(self, argc, argv); } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'sort'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'sort'.\n" " Possible C/C++ prototypes are:\n" " _sort< double >(Vector< double > *,bool)\n" " _sort< float >(Vector< float > *,bool)\n"); @@ -4297,7 +4492,7 @@ SWIGINTERN PyObject *_wrap_sort(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -4317,18 +4512,12 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:mult",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + (void)self; + if ((nobjs < 7) || (nobjs > 7)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4345,7 +4534,7 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4362,7 +4551,7 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4377,35 +4566,33 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject /*@SWIG@*/ } - ecode4 = SWIG_AsVal_bool(obj3, &val4); + ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "mult" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(obj4, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "mult" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "mult" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "mult" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); try { _mult< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -4431,7 +4618,7 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_mult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_mult__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -4451,18 +4638,12 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject int ecode6 = 0 ; float val7 ; int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:mult",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + (void)self; + if ((nobjs < 7) || (nobjs > 7)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4479,7 +4660,7 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4496,7 +4677,7 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4511,35 +4692,33 @@ SWIGINTERN PyObject *_wrap_mult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject /*@SWIG@*/ } - ecode4 = SWIG_AsVal_bool(obj3, &val4); + ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "mult" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(obj4, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "mult" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_float(obj5, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "mult" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_float(obj6, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "mult" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); try { _mult< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -4570,15 +4749,11 @@ SWIGINTERN PyObject *_wrap_mult(PyObject *self, PyObject *args) { PyObject *argv[8] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 7) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "mult", 0, 7, argv))) SWIG_fail; + --argc; if (argc == 7) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -4614,7 +4789,7 @@ SWIGINTERN PyObject *_wrap_mult(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_mult__SWIG_1(self, args); + return _wrap_mult__SWIG_1(self, argc, argv); } } } @@ -4624,7 +4799,7 @@ SWIGINTERN PyObject *_wrap_mult(PyObject *self, PyObject *args) { } } if (argc == 7) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -4660,7 +4835,7 @@ SWIGINTERN PyObject *_wrap_mult(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_mult__SWIG_0(self, args); + return _wrap_mult__SWIG_0(self, argc, argv); } } } @@ -4671,7 +4846,7 @@ SWIGINTERN PyObject *_wrap_mult(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'mult'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'mult'.\n" " Possible C/C++ prototypes are:\n" " _mult< double >(Matrix< double > *,Matrix< double > *,Matrix< double > *,bool const,bool const,double const,double const)\n" " _mult< float >(Matrix< float > *,Matrix< float > *,Matrix< float > *,bool const,bool const,float const,float const)\n"); @@ -4679,16 +4854,15 @@ SWIGINTERN PyObject *_wrap_mult(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_AAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AAt__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; SpMatrix< double > *arg1 = (SpMatrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; PyObject *sparray1 = NULL ; PyArrayObject *array2 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AAt",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { /* a column compressed storage sparse matrix in python scipy looks like this @@ -4709,7 +4883,7 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray1 = obj0; + sparray1 = swig_obj[0]; if ( !( PyObject_HasAttrString(sparray1, "indptr") && PyObject_HasAttrString(sparray1, "indices") && PyObject_HasAttrString(sparray1, "data") && @@ -4769,7 +4943,7 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4786,13 +4960,11 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } try { _AAt< double >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -4812,16 +4984,15 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_AAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AAt__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; SpMatrix< float > *arg1 = (SpMatrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; PyObject *sparray1 = NULL ; PyArrayObject *array2 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AAt",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { /* a column compressed storage sparse matrix in python scipy looks like this @@ -4842,7 +5013,7 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray1 = obj0; + sparray1 = swig_obj[0]; if ( !( PyObject_HasAttrString(sparray1, "indptr") && PyObject_HasAttrString(sparray1, "indices") && PyObject_HasAttrString(sparray1, "data") && @@ -4902,7 +5073,7 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -4919,13 +5090,11 @@ SWIGINTERN PyObject *_wrap_AAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } try { _AAt< float >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -4950,15 +5119,11 @@ SWIGINTERN PyObject *_wrap_AAt(PyObject *self, PyObject *args) { PyObject *argv[3] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "AAt", 0, 2, argv))) SWIG_fail; + --argc; if (argc == 2) { - int _v; + int _v = 0; { _v = check_sparse(argv[0]); /* @@ -4975,12 +5140,12 @@ SWIGINTERN PyObject *_wrap_AAt(PyObject *self, PyObject *args) { } if (_v) { - return _wrap_AAt__SWIG_0(self, args); + return _wrap_AAt__SWIG_0(self, argc, argv); } } } if (argc == 2) { - int _v; + int _v = 0; { _v = check_sparse(argv[0]); /* @@ -4997,13 +5162,13 @@ SWIGINTERN PyObject *_wrap_AAt(PyObject *self, PyObject *args) { } if (_v) { - return _wrap_AAt__SWIG_1(self, args); + return _wrap_AAt__SWIG_1(self, argc, argv); } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'AAt'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'AAt'.\n" " Possible C/C++ prototypes are:\n" " _AAt< double >(SpMatrix< double > *,Matrix< double > *)\n" " _AAt< float >(SpMatrix< float > *,Matrix< float > *)\n"); @@ -5011,7 +5176,7 @@ SWIGINTERN PyObject *_wrap_AAt(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; SpMatrix< double > *arg1 = (SpMatrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -5019,11 +5184,9 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject *sparray1 = NULL ; PyArrayObject *array2 = NULL ; PyArrayObject *array3 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:XAt",&obj0,&obj1,&obj2)) SWIG_fail; + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; { /* a column compressed storage sparse matrix in python scipy looks like this @@ -5044,7 +5207,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray1 = obj0; + sparray1 = swig_obj[0]; if ( !( PyObject_HasAttrString(sparray1, "indptr") && PyObject_HasAttrString(sparray1, "indices") && PyObject_HasAttrString(sparray1, "data") && @@ -5104,7 +5267,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5121,7 +5284,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5138,13 +5301,11 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } try { _XAt< double >(arg1,arg2,arg3); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -5170,7 +5331,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; SpMatrix< float > *arg1 = (SpMatrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -5178,11 +5339,9 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject *sparray1 = NULL ; PyArrayObject *array2 = NULL ; PyArrayObject *array3 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:XAt",&obj0,&obj1,&obj2)) SWIG_fail; + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; { /* a column compressed storage sparse matrix in python scipy looks like this @@ -5203,7 +5362,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray1 = obj0; + sparray1 = swig_obj[0]; if ( !( PyObject_HasAttrString(sparray1, "indptr") && PyObject_HasAttrString(sparray1, "indices") && PyObject_HasAttrString(sparray1, "data") && @@ -5263,7 +5422,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5280,7 +5439,7 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5297,13 +5456,11 @@ SWIGINTERN PyObject *_wrap_XAt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } try { _XAt< float >(arg1,arg2,arg3); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -5334,15 +5491,11 @@ SWIGINTERN PyObject *_wrap_XAt(PyObject *self, PyObject *args) { PyObject *argv[4] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "XAt", 0, 3, argv))) SWIG_fail; + --argc; if (argc == 3) { - int _v; + int _v = 0; { _v = check_sparse(argv[0]); /* @@ -5364,13 +5517,13 @@ SWIGINTERN PyObject *_wrap_XAt(PyObject *self, PyObject *args) { } if (_v) { - return _wrap_XAt__SWIG_0(self, args); + return _wrap_XAt__SWIG_0(self, argc, argv); } } } } if (argc == 3) { - int _v; + int _v = 0; { _v = check_sparse(argv[0]); /* @@ -5392,14 +5545,14 @@ SWIGINTERN PyObject *_wrap_XAt(PyObject *self, PyObject *args) { } if (_v) { - return _wrap_XAt__SWIG_1(self, args); + return _wrap_XAt__SWIG_1(self, argc, argv); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'XAt'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'XAt'.\n" " Possible C/C++ prototypes are:\n" " _XAt< double >(SpMatrix< double > *,Matrix< double > *,Matrix< double > *)\n" " _XAt< float >(SpMatrix< float > *,Matrix< float > *,Matrix< float > *)\n"); @@ -5407,36 +5560,33 @@ SWIGINTERN PyObject *_wrap_XAt(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_applyBayerPattern__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_applyBayerPattern__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Vector< double > *arg1 = (Vector< double > *) 0 ; int arg2 ; PyArrayObject *array1 = NULL ; int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:applyBayerPattern",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); if (!array1 || !require_dimensions(array1,1) || !require_contiguous(array1) || !require_native(array1)) SWIG_fail; arg1 = new Vector ((double *)array_data(array1),(int)array_size(array1,0)); } - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "applyBayerPattern" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { _applyBayerPattern< double >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -5450,36 +5600,33 @@ SWIGINTERN PyObject *_wrap_applyBayerPattern__SWIG_0(PyObject *SWIGUNUSEDPARM(se } -SWIGINTERN PyObject *_wrap_applyBayerPattern__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_applyBayerPattern__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Vector< float > *arg1 = (Vector< float > *) 0 ; int arg2 ; PyArrayObject *array1 = NULL ; int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:applyBayerPattern",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); if (!array1 || !require_dimensions(array1,1) || !require_contiguous(array1) || !require_native(array1)) SWIG_fail; arg1 = new Vector ((float *)array_data(array1),(int)array_size(array1,0)); } - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "applyBayerPattern" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { _applyBayerPattern< float >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -5498,15 +5645,11 @@ SWIGINTERN PyObject *_wrap_applyBayerPattern(PyObject *self, PyObject *args) { PyObject *argv[3] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "applyBayerPattern", 0, 2, argv))) SWIG_fail; + --argc; if (argc == 2) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 1) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -5517,12 +5660,12 @@ SWIGINTERN PyObject *_wrap_applyBayerPattern(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_applyBayerPattern__SWIG_0(self, args); + return _wrap_applyBayerPattern__SWIG_0(self, argc, argv); } } } if (argc == 2) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 1) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -5533,13 +5676,13 @@ SWIGINTERN PyObject *_wrap_applyBayerPattern(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_applyBayerPattern__SWIG_1(self, args); + return _wrap_applyBayerPattern__SWIG_1(self, argc, argv); } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'applyBayerPattern'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'applyBayerPattern'.\n" " Possible C/C++ prototypes are:\n" " _applyBayerPattern< double >(Vector< double > *,int)\n" " _applyBayerPattern< float >(Vector< float > *,int)\n"); @@ -5547,7 +5690,7 @@ SWIGINTERN PyObject *_wrap_applyBayerPattern(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Vector< double > *arg2 = (Vector< double > *) 0 ; @@ -5561,16 +5704,12 @@ SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_0(PyObject *SWIGUNUSEDPARM(se int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:conjugateGradient",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + (void)self; + if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5586,34 +5725,32 @@ SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_0(PyObject *SWIGUNUSEDPARM(se /*@SWIG@*/ } { - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); if (!array2 || !require_dimensions(array2,1) || !require_contiguous(array2) || !require_native(array2)) SWIG_fail; arg2 = new Vector ((double *)array_data(array2),(int)array_size(array2,0)); } { - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((double *)array_data(array3),(int)array_size(array3,0)); } - ecode4 = SWIG_AsVal_double(obj3, &val4); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "conjugateGradient" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "conjugateGradient" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { _conjugateGradient< double >(arg1,arg2,arg3,arg4,arg5); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -5639,7 +5776,7 @@ SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_0(PyObject *SWIGUNUSEDPARM(se } -SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Vector< float > *arg2 = (Vector< float > *) 0 ; @@ -5653,16 +5790,12 @@ SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_1(PyObject *SWIGUNUSEDPARM(se int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:conjugateGradient",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + (void)self; + if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5678,34 +5811,32 @@ SWIGINTERN PyObject *_wrap_conjugateGradient__SWIG_1(PyObject *SWIGUNUSEDPARM(se /*@SWIG@*/ } { - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); if (!array2 || !require_dimensions(array2,1) || !require_contiguous(array2) || !require_native(array2)) SWIG_fail; arg2 = new Vector ((float *)array_data(array2),(int)array_size(array2,0)); } { - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((float *)array_data(array3),(int)array_size(array3,0)); } - ecode4 = SWIG_AsVal_float(obj3, &val4); + ecode4 = SWIG_AsVal_float(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "conjugateGradient" "', argument " "4"" of type '" "float""'"); } arg4 = static_cast< float >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "conjugateGradient" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { _conjugateGradient< float >(arg1,arg2,arg3,arg4,arg5); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -5736,15 +5867,11 @@ SWIGINTERN PyObject *_wrap_conjugateGradient(PyObject *self, PyObject *args) { PyObject *argv[6] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "conjugateGradient", 0, 5, argv))) SWIG_fail; + --argc; if (argc == 5) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -5770,7 +5897,7 @@ SWIGINTERN PyObject *_wrap_conjugateGradient(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_conjugateGradient__SWIG_1(self, args); + return _wrap_conjugateGradient__SWIG_1(self, argc, argv); } } } @@ -5778,7 +5905,7 @@ SWIGINTERN PyObject *_wrap_conjugateGradient(PyObject *self, PyObject *args) { } } if (argc == 5) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -5804,7 +5931,7 @@ SWIGINTERN PyObject *_wrap_conjugateGradient(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_conjugateGradient__SWIG_0(self, args); + return _wrap_conjugateGradient__SWIG_0(self, argc, argv); } } } @@ -5813,7 +5940,7 @@ SWIGINTERN PyObject *_wrap_conjugateGradient(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'conjugateGradient'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'conjugateGradient'.\n" " Possible C/C++ prototypes are:\n" " _conjugateGradient< double >(Matrix< double > *,Vector< double > *,Vector< double > *,double const,int const)\n" " _conjugateGradient< float >(Matrix< float > *,Vector< float > *,Vector< float > *,float const,int const)\n"); @@ -5821,16 +5948,16 @@ SWIGINTERN PyObject *_wrap_conjugateGradient(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_invSym__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_invSym__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; PyArrayObject *array1 = NULL ; - PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:invSym",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5859,16 +5986,16 @@ SWIGINTERN PyObject *_wrap_invSym__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObje } -SWIGINTERN PyObject *_wrap_invSym__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_invSym__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; PyArrayObject *array1 = NULL ; - PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:invSym",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5902,36 +6029,32 @@ SWIGINTERN PyObject *_wrap_invSym(PyObject *self, PyObject *args) { PyObject *argv[2] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "invSym", 0, 1, argv))) SWIG_fail; + --argc; if (argc == 1) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); } if (_v) { - return _wrap_invSym__SWIG_0(self, args); + return _wrap_invSym__SWIG_0(self, argc, argv); } } if (argc == 1) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); } if (_v) { - return _wrap_invSym__SWIG_1(self, args); + return _wrap_invSym__SWIG_1(self, argc, argv); } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'invSym'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'invSym'.\n" " Possible C/C++ prototypes are:\n" " _invSym< double >(Matrix< double > *)\n" " _invSym< float >(Matrix< float > *)\n"); @@ -5939,16 +6062,16 @@ SWIGINTERN PyObject *_wrap_invSym(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_normalize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_normalize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; PyArrayObject *array1 = NULL ; - PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:normalize",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -5977,16 +6100,16 @@ SWIGINTERN PyObject *_wrap_normalize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } -SWIGINTERN PyObject *_wrap_normalize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_normalize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; PyArrayObject *array1 = NULL ; - PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:normalize",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6020,36 +6143,32 @@ SWIGINTERN PyObject *_wrap_normalize(PyObject *self, PyObject *args) { PyObject *argv[2] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "normalize", 0, 1, argv))) SWIG_fail; + --argc; if (argc == 1) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); } if (_v) { - return _wrap_normalize__SWIG_0(self, args); + return _wrap_normalize__SWIG_0(self, argc, argv); } } if (argc == 1) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); } if (_v) { - return _wrap_normalize__SWIG_1(self, args); + return _wrap_normalize__SWIG_1(self, argc, argv); } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'normalize'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'normalize'.\n" " Possible C/C++ prototypes are:\n" " _normalize< double >(Matrix< double > *)\n" " _normalize< float >(Matrix< float > *)\n"); @@ -6057,84 +6176,7 @@ SWIGINTERN PyObject *_wrap_normalize(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *L1COEFFS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L1COEFFS",SWIG_From_int(static_cast< int >(L1COEFFS))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *L2ERROR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L2ERROR",SWIG_From_int(static_cast< int >(L2ERROR))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *PENALTY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "PENALTY",SWIG_From_int(static_cast< int >(PENALTY))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *SPARSITY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "SPARSITY",SWIG_From_int(static_cast< int >(SPARSITY))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *L2ERROR2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L2ERROR2",SWIG_From_int(static_cast< int >(L2ERROR2))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *PENALTY2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "PENALTY2",SWIG_From_int(static_cast< int >(PENALTY2))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *FISTAMODE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "FISTAMODE",SWIG_From_int(static_cast< int >(FISTAMODE))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *_wrap_sparseProject__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_sparseProject__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -6161,20 +6203,12 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:sparseProject",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6191,7 +6225,7 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6206,50 +6240,48 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode3 = SWIG_AsVal_double(obj2, &val3); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sparseProject" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sparseProject" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sparseProject" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sparseProject" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "sparseProject" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); - ecode8 = SWIG_AsVal_bool(obj7, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "sparseProject" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "sparseProject" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { _sparseProject< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -6269,7 +6301,7 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_sparseProject__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_sparseProject__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -6296,20 +6328,12 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:sparseProject",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6326,7 +6350,7 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6341,50 +6365,48 @@ SWIGINTERN PyObject *_wrap_sparseProject__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode3 = SWIG_AsVal_float(obj2, &val3); + ecode3 = SWIG_AsVal_float(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sparseProject" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sparseProject" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_float(obj4, &val5); + ecode5 = SWIG_AsVal_float(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sparseProject" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); - ecode6 = SWIG_AsVal_float(obj5, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sparseProject" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_float(obj6, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "sparseProject" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); - ecode8 = SWIG_AsVal_bool(obj7, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "sparseProject" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "sparseProject" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { _sparseProject< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -6409,15 +6431,11 @@ SWIGINTERN PyObject *_wrap_sparseProject(PyObject *self, PyObject *args) { PyObject *argv[10] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 9) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "sparseProject", 0, 9, argv))) SWIG_fail; + --argc; if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -6463,7 +6481,7 @@ SWIGINTERN PyObject *_wrap_sparseProject(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_sparseProject__SWIG_1(self, args); + return _wrap_sparseProject__SWIG_1(self, argc, argv); } } } @@ -6475,7 +6493,7 @@ SWIGINTERN PyObject *_wrap_sparseProject(PyObject *self, PyObject *args) { } } if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -6521,7 +6539,7 @@ SWIGINTERN PyObject *_wrap_sparseProject(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_sparseProject__SWIG_0(self, args); + return _wrap_sparseProject__SWIG_0(self, argc, argv); } } } @@ -6534,7 +6552,7 @@ SWIGINTERN PyObject *_wrap_sparseProject(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'sparseProject'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'sparseProject'.\n" " Possible C/C++ prototypes are:\n" " _sparseProject< double >(Matrix< double > *,Matrix< double > *,double const,int const,double const,double const,double const,bool const,int const)\n" " _sparseProject< float >(Matrix< float > *,Matrix< float > *,float const,int const,float const,float const,float const,bool const,int const)\n"); @@ -6542,7 +6560,7 @@ SWIGINTERN PyObject *_wrap_sparseProject(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_lassoD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoD__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -6583,29 +6601,17 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObje int ecode13 = 0 ; bool val14 ; int ecode14 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; SpMatrix< double > *result = 0 ; { //# argout in arg3 = &data_temp3; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:lassoD",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; + (void)self; + if ((nobjs < 13) || (nobjs > 13)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6622,7 +6628,7 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObje } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6637,70 +6643,68 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObje /*@SWIG@*/ } - ecode4 = SWIG_AsVal_bool(obj2, &val4); + ecode4 = SWIG_AsVal_bool(swig_obj[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lassoD" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_int(obj3, &val5); + ecode5 = SWIG_AsVal_int(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoD" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_double(obj4, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoD" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_double(obj5, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoD" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoD" "', argument " "8"" of type '" "constraint_type""'"); } arg8 = static_cast< constraint_type >(val8); - ecode9 = SWIG_AsVal_bool(obj7, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoD" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); - ecode10 = SWIG_AsVal_bool(obj8, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[8], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "lassoD" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_int(obj9, &val11); + ecode11 = SWIG_AsVal_int(swig_obj[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "lassoD" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); - ecode12 = SWIG_AsVal_int(obj10, &val12); + ecode12 = SWIG_AsVal_int(swig_obj[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "lassoD" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); - ecode13 = SWIG_AsVal_bool(obj11, &val13); + ecode13 = SWIG_AsVal_bool(swig_obj[11], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "lassoD" "', argument " "13"" of type '" "bool""'"); } arg13 = static_cast< bool >(val13); - ecode14 = SWIG_AsVal_bool(obj12, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[12], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "lassoD" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); try { result = (SpMatrix< double > *)_lassoD< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -6778,7 +6782,7 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObje } -SWIGINTERN PyObject *_wrap_lassoD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoD__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -6819,29 +6823,17 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObje int ecode13 = 0 ; bool val14 ; int ecode14 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; SpMatrix< float > *result = 0 ; { //# argout in arg3 = &data_temp3; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:lassoD",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; + (void)self; + if ((nobjs < 13) || (nobjs > 13)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6858,7 +6850,7 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObje } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -6873,70 +6865,68 @@ SWIGINTERN PyObject *_wrap_lassoD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObje /*@SWIG@*/ } - ecode4 = SWIG_AsVal_bool(obj2, &val4); + ecode4 = SWIG_AsVal_bool(swig_obj[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lassoD" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_int(obj3, &val5); + ecode5 = SWIG_AsVal_int(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoD" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_float(obj4, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoD" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_float(obj5, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoD" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoD" "', argument " "8"" of type '" "constraint_type""'"); } arg8 = static_cast< constraint_type >(val8); - ecode9 = SWIG_AsVal_bool(obj7, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoD" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); - ecode10 = SWIG_AsVal_bool(obj8, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[8], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "lassoD" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_int(obj9, &val11); + ecode11 = SWIG_AsVal_int(swig_obj[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "lassoD" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); - ecode12 = SWIG_AsVal_int(obj10, &val12); + ecode12 = SWIG_AsVal_int(swig_obj[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "lassoD" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); - ecode13 = SWIG_AsVal_bool(obj11, &val13); + ecode13 = SWIG_AsVal_bool(swig_obj[11], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "lassoD" "', argument " "13"" of type '" "bool""'"); } arg13 = static_cast< bool >(val13); - ecode14 = SWIG_AsVal_bool(obj12, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[12], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "lassoD" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); try { result = (SpMatrix< float > *)_lassoD< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -7019,15 +7009,11 @@ SWIGINTERN PyObject *_wrap_lassoD(PyObject *self, PyObject *args) { PyObject *argv[14] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 13) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "lassoD", 0, 13, argv))) SWIG_fail; + --argc; if (argc == 13) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -7093,7 +7079,7 @@ SWIGINTERN PyObject *_wrap_lassoD(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoD__SWIG_1(self, args); + return _wrap_lassoD__SWIG_1(self, argc, argv); } } } @@ -7109,7 +7095,7 @@ SWIGINTERN PyObject *_wrap_lassoD(PyObject *self, PyObject *args) { } } if (argc == 13) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -7175,7 +7161,7 @@ SWIGINTERN PyObject *_wrap_lassoD(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoD__SWIG_0(self, args); + return _wrap_lassoD__SWIG_0(self, argc, argv); } } } @@ -7192,7 +7178,7 @@ SWIGINTERN PyObject *_wrap_lassoD(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'lassoD'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'lassoD'.\n" " Possible C/C++ prototypes are:\n" " _lassoD< double >(Matrix< double > *,Matrix< double > *,Matrix< double > **,bool,int,double const,double const,constraint_type,bool const,bool const,int const,int,bool const,bool)\n" " _lassoD< float >(Matrix< float > *,Matrix< float > *,Matrix< float > **,bool,int,float const,float const,constraint_type,bool const,bool const,int const,int,bool const,bool)\n"); @@ -7200,7 +7186,7 @@ SWIGINTERN PyObject *_wrap_lassoD(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -7243,30 +7229,17 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj int ecode14 = 0 ; bool val15 ; int ecode15 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; SpMatrix< double > *result = 0 ; { //# argout in arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOO:lassoQq",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail; + (void)self; + if ((nobjs < 14) || (nobjs > 14)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7283,7 +7256,7 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7300,7 +7273,7 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7315,70 +7288,68 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj /*@SWIG@*/ } - ecode5 = SWIG_AsVal_bool(obj3, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoQq" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_int(obj4, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoQq" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_double(obj5, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoQq" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); - ecode8 = SWIG_AsVal_double(obj6, &val8); + ecode8 = SWIG_AsVal_double(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoQq" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoQq" "', argument " "9"" of type '" "constraint_type""'"); } arg9 = static_cast< constraint_type >(val9); - ecode10 = SWIG_AsVal_bool(obj8, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[8], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "lassoQq" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_bool(obj9, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "lassoQq" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_int(obj10, &val12); + ecode12 = SWIG_AsVal_int(swig_obj[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "lassoQq" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); - ecode13 = SWIG_AsVal_int(obj11, &val13); + ecode13 = SWIG_AsVal_int(swig_obj[11], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "lassoQq" "', argument " "13"" of type '" "int""'"); } arg13 = static_cast< int >(val13); - ecode14 = SWIG_AsVal_bool(obj12, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[12], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "lassoQq" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_bool(obj13, &val15); + ecode15 = SWIG_AsVal_bool(swig_obj[13], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "lassoQq" "', argument " "15"" of type '" "bool""'"); } arg15 = static_cast< bool >(val15); try { result = (SpMatrix< double > *)_lassoQq< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -7462,7 +7433,7 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } -SWIGINTERN PyObject *_wrap_lassoQq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoQq__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -7505,30 +7476,17 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj int ecode14 = 0 ; bool val15 ; int ecode15 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; SpMatrix< float > *result = 0 ; { //# argout in arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOO:lassoQq",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail; + (void)self; + if ((nobjs < 14) || (nobjs > 14)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7545,7 +7503,7 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7562,7 +7520,7 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7577,70 +7535,68 @@ SWIGINTERN PyObject *_wrap_lassoQq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj /*@SWIG@*/ } - ecode5 = SWIG_AsVal_bool(obj3, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoQq" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_int(obj4, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoQq" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_float(obj5, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoQq" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); - ecode8 = SWIG_AsVal_float(obj6, &val8); + ecode8 = SWIG_AsVal_float(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoQq" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoQq" "', argument " "9"" of type '" "constraint_type""'"); } arg9 = static_cast< constraint_type >(val9); - ecode10 = SWIG_AsVal_bool(obj8, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[8], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "lassoQq" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_bool(obj9, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "lassoQq" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_int(obj10, &val12); + ecode12 = SWIG_AsVal_int(swig_obj[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "lassoQq" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); - ecode13 = SWIG_AsVal_int(obj11, &val13); + ecode13 = SWIG_AsVal_int(swig_obj[11], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "lassoQq" "', argument " "13"" of type '" "int""'"); } arg13 = static_cast< int >(val13); - ecode14 = SWIG_AsVal_bool(obj12, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[12], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "lassoQq" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_bool(obj13, &val15); + ecode15 = SWIG_AsVal_bool(swig_obj[13], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "lassoQq" "', argument " "15"" of type '" "bool""'"); } arg15 = static_cast< bool >(val15); try { result = (SpMatrix< float > *)_lassoQq< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -7729,15 +7685,11 @@ SWIGINTERN PyObject *_wrap_lassoQq(PyObject *self, PyObject *args) { PyObject *argv[15] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 14) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "lassoQq", 0, 14, argv))) SWIG_fail; + --argc; if (argc == 14) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -7808,7 +7760,7 @@ SWIGINTERN PyObject *_wrap_lassoQq(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoQq__SWIG_1(self, args); + return _wrap_lassoQq__SWIG_1(self, argc, argv); } } } @@ -7825,7 +7777,7 @@ SWIGINTERN PyObject *_wrap_lassoQq(PyObject *self, PyObject *args) { } } if (argc == 14) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -7896,7 +7848,7 @@ SWIGINTERN PyObject *_wrap_lassoQq(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoQq__SWIG_0(self, args); + return _wrap_lassoQq__SWIG_0(self, argc, argv); } } } @@ -7914,7 +7866,7 @@ SWIGINTERN PyObject *_wrap_lassoQq(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'lassoQq'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'lassoQq'.\n" " Possible C/C++ prototypes are:\n" " _lassoQq< double >(Matrix< double > *,Matrix< double > *,Matrix< double > *,Matrix< double > **,bool,int,double const,double const,constraint_type,bool const,bool const,int const,int,bool const,bool)\n" " _lassoQq< float >(Matrix< float > *,Matrix< float > *,Matrix< float > *,Matrix< float > **,bool,int,float const,float const,constraint_type,bool const,bool const,int const,int,bool const,bool)\n"); @@ -7922,7 +7874,7 @@ SWIGINTERN PyObject *_wrap_lassoQq(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -7951,22 +7903,13 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO int ecode9 = 0 ; bool val10 ; int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; SpMatrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:lassoMask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; + (void)self; + if ((nobjs < 10) || (nobjs > 10)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -7983,7 +7926,7 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8000,7 +7943,7 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_BOOL); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_BOOL); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8015,50 +7958,48 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO /*@SWIG@*/ } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lassoMask" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoMask" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoMask" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoMask" "', argument " "7"" of type '" "constraint_type""'"); } arg7 = static_cast< constraint_type >(val7); - ecode8 = SWIG_AsVal_bool(obj7, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoMask" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoMask" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_bool(obj9, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "lassoMask" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); try { result = (SpMatrix< double > *)_lassoMask< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -8124,7 +8065,7 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } -SWIGINTERN PyObject *_wrap_lassoMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoMask__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -8153,22 +8094,13 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO int ecode9 = 0 ; bool val10 ; int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; SpMatrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:lassoMask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; + (void)self; + if ((nobjs < 10) || (nobjs > 10)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8185,7 +8117,7 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8202,7 +8134,7 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_BOOL); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_BOOL); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8217,50 +8149,48 @@ SWIGINTERN PyObject *_wrap_lassoMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO /*@SWIG@*/ } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lassoMask" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_float(obj4, &val5); + ecode5 = SWIG_AsVal_float(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoMask" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); - ecode6 = SWIG_AsVal_float(obj5, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoMask" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoMask" "', argument " "7"" of type '" "constraint_type""'"); } arg7 = static_cast< constraint_type >(val7); - ecode8 = SWIG_AsVal_bool(obj7, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoMask" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoMask" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_bool(obj9, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "lassoMask" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); try { result = (SpMatrix< float > *)_lassoMask< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -8331,15 +8261,11 @@ SWIGINTERN PyObject *_wrap_lassoMask(PyObject *self, PyObject *args) { PyObject *argv[11] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 10) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "lassoMask", 0, 10, argv))) SWIG_fail; + --argc; if (argc == 10) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -8390,7 +8316,7 @@ SWIGINTERN PyObject *_wrap_lassoMask(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoMask__SWIG_1(self, args); + return _wrap_lassoMask__SWIG_1(self, argc, argv); } } } @@ -8403,7 +8329,7 @@ SWIGINTERN PyObject *_wrap_lassoMask(PyObject *self, PyObject *args) { } } if (argc == 10) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -8454,7 +8380,7 @@ SWIGINTERN PyObject *_wrap_lassoMask(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoMask__SWIG_0(self, args); + return _wrap_lassoMask__SWIG_0(self, argc, argv); } } } @@ -8468,7 +8394,7 @@ SWIGINTERN PyObject *_wrap_lassoMask(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'lassoMask'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'lassoMask'.\n" " Possible C/C++ prototypes are:\n" " _lassoMask< double >(Matrix< double > *,Matrix< double > *,Matrix< bool > *,int,double const,double const,constraint_type,bool const,int const,bool)\n" " _lassoMask< float >(Matrix< float > *,Matrix< float > *,Matrix< bool > *,int,float const,float const,constraint_type,bool const,int const,bool)\n"); @@ -8476,7 +8402,7 @@ SWIGINTERN PyObject *_wrap_lassoMask(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -8502,21 +8428,13 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int ecode8 = 0 ; bool val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; SpMatrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:lassoWeighted",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8533,7 +8451,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8550,7 +8468,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8565,45 +8483,43 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lassoWeighted" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoWeighted" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoWeighted" "', argument " "6"" of type '" "constraint_type""'"); } arg6 = static_cast< constraint_type >(val6); - ecode7 = SWIG_AsVal_bool(obj6, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoWeighted" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoWeighted" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_bool(obj8, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoWeighted" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); try { result = (SpMatrix< double > *)_lassoWeighted< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -8669,7 +8585,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -8695,21 +8611,13 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int ecode8 = 0 ; bool val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; SpMatrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:lassoWeighted",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8726,7 +8634,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8743,7 +8651,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -8758,45 +8666,43 @@ SWIGINTERN PyObject *_wrap_lassoWeighted__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lassoWeighted" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_float(obj4, &val5); + ecode5 = SWIG_AsVal_float(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lassoWeighted" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lassoWeighted" "', argument " "6"" of type '" "constraint_type""'"); } arg6 = static_cast< constraint_type >(val6); - ecode7 = SWIG_AsVal_bool(obj6, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lassoWeighted" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "lassoWeighted" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_bool(obj8, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "lassoWeighted" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); try { result = (SpMatrix< float > *)_lassoWeighted< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -8867,15 +8773,11 @@ SWIGINTERN PyObject *_wrap_lassoWeighted(PyObject *self, PyObject *args) { PyObject *argv[10] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 9) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "lassoWeighted", 0, 9, argv))) SWIG_fail; + --argc; if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -8921,7 +8823,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoWeighted__SWIG_1(self, args); + return _wrap_lassoWeighted__SWIG_1(self, argc, argv); } } } @@ -8933,7 +8835,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted(PyObject *self, PyObject *args) { } } if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -8979,7 +8881,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_lassoWeighted__SWIG_0(self, args); + return _wrap_lassoWeighted__SWIG_0(self, argc, argv); } } } @@ -8992,7 +8894,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'lassoWeighted'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'lassoWeighted'.\n" " Possible C/C++ prototypes are:\n" " _lassoWeighted< double >(Matrix< double > *,Matrix< double > *,Matrix< double > *,int,double const,constraint_type,bool const,int const,bool)\n" " _lassoWeighted< float >(Matrix< float > *,Matrix< float > *,Matrix< float > *,int,float const,constraint_type,bool const,int const,bool)\n"); @@ -9000,7 +8902,7 @@ SWIGINTERN PyObject *_wrap_lassoWeighted(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_omp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_omp__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -9029,26 +8931,17 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject PyArrayObject *array10 = NULL ; int val11 ; int ecode11 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; SpMatrix< double > *result = 0 ; { //# argout in arg3 = &data_temp3; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:omp",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; + (void)self; + if ((nobjs < 10) || (nobjs > 10)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9065,7 +8958,7 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9080,55 +8973,53 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject /*@SWIG@*/ } - ecode4 = SWIG_AsVal_bool(obj2, &val4); + ecode4 = SWIG_AsVal_bool(swig_obj[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "omp" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(obj3, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "omp" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); { - array6 = obj_to_array_no_conversion(obj4, NPY_INT); + array6 = obj_to_array_no_conversion(swig_obj[4], NPY_INT); if (!array6 || !require_dimensions(array6,1) || !require_contiguous(array6) || !require_native(array6)) SWIG_fail; arg6 = new Vector ((int *)array_data(array6),(int)array_size(array6,0)); } - ecode7 = SWIG_AsVal_bool(obj5, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "omp" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); { - array8 = obj_to_array_no_conversion(obj6, NPY_DOUBLE); + array8 = obj_to_array_no_conversion(swig_obj[6], NPY_DOUBLE); if (!array8 || !require_dimensions(array8,1) || !require_contiguous(array8) || !require_native(array8)) SWIG_fail; arg8 = new Vector ((double *)array_data(array8),(int)array_size(array8,0)); } - ecode9 = SWIG_AsVal_bool(obj7, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "omp" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); { - array10 = obj_to_array_no_conversion(obj8, NPY_DOUBLE); + array10 = obj_to_array_no_conversion(swig_obj[8], NPY_DOUBLE); if (!array10 || !require_dimensions(array10,1) || !require_contiguous(array10) || !require_native(array10)) SWIG_fail; arg10 = new Vector ((double *)array_data(array10),(int)array_size(array10,0)); } - ecode11 = SWIG_AsVal_int(obj9, &val11); + ecode11 = SWIG_AsVal_int(swig_obj[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "omp" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (SpMatrix< double > *)_omp< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -9224,7 +9115,7 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_omp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_omp__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -9253,26 +9144,17 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject PyArrayObject *array10 = NULL ; int val11 ; int ecode11 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; SpMatrix< float > *result = 0 ; { //# argout in arg3 = &data_temp3; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:omp",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; + (void)self; + if ((nobjs < 10) || (nobjs > 10)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9289,7 +9171,7 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9304,55 +9186,53 @@ SWIGINTERN PyObject *_wrap_omp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject /*@SWIG@*/ } - ecode4 = SWIG_AsVal_bool(obj2, &val4); + ecode4 = SWIG_AsVal_bool(swig_obj[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "omp" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); - ecode5 = SWIG_AsVal_bool(obj3, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "omp" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); { - array6 = obj_to_array_no_conversion(obj4, NPY_INT); + array6 = obj_to_array_no_conversion(swig_obj[4], NPY_INT); if (!array6 || !require_dimensions(array6,1) || !require_contiguous(array6) || !require_native(array6)) SWIG_fail; arg6 = new Vector ((int *)array_data(array6),(int)array_size(array6,0)); } - ecode7 = SWIG_AsVal_bool(obj5, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "omp" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); { - array8 = obj_to_array_no_conversion(obj6, NPY_FLOAT); + array8 = obj_to_array_no_conversion(swig_obj[6], NPY_FLOAT); if (!array8 || !require_dimensions(array8,1) || !require_contiguous(array8) || !require_native(array8)) SWIG_fail; arg8 = new Vector ((float *)array_data(array8),(int)array_size(array8,0)); } - ecode9 = SWIG_AsVal_bool(obj7, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "omp" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); { - array10 = obj_to_array_no_conversion(obj8, NPY_FLOAT); + array10 = obj_to_array_no_conversion(swig_obj[8], NPY_FLOAT); if (!array10 || !require_dimensions(array10,1) || !require_contiguous(array10) || !require_native(array10)) SWIG_fail; arg10 = new Vector ((float *)array_data(array10),(int)array_size(array10,0)); } - ecode11 = SWIG_AsVal_int(obj9, &val11); + ecode11 = SWIG_AsVal_int(swig_obj[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "omp" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (SpMatrix< float > *)_omp< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -9453,15 +9333,11 @@ SWIGINTERN PyObject *_wrap_omp(PyObject *self, PyObject *args) { PyObject *argv[11] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 10) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "omp", 0, 10, argv))) SWIG_fail; + --argc; if (argc == 10) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -9512,7 +9388,7 @@ SWIGINTERN PyObject *_wrap_omp(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_omp__SWIG_0(self, args); + return _wrap_omp__SWIG_0(self, argc, argv); } } } @@ -9525,7 +9401,7 @@ SWIGINTERN PyObject *_wrap_omp(PyObject *self, PyObject *args) { } } if (argc == 10) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -9576,7 +9452,7 @@ SWIGINTERN PyObject *_wrap_omp(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_omp__SWIG_1(self, args); + return _wrap_omp__SWIG_1(self, argc, argv); } } } @@ -9590,7 +9466,7 @@ SWIGINTERN PyObject *_wrap_omp(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'omp'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'omp'.\n" " Possible C/C++ prototypes are:\n" " _omp< double >(Matrix< double > *,Matrix< double > *,Matrix< double > **,bool,bool,Vector< int > *,bool,Vector< double > *,bool,Vector< double > *,int const)\n" " _omp< float >(Matrix< float > *,Matrix< float > *,Matrix< float > **,bool,bool,Vector< int > *,bool,Vector< float > *,bool,Vector< float > *,int const)\n"); @@ -9598,7 +9474,7 @@ SWIGINTERN PyObject *_wrap_omp(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -9629,27 +9505,17 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj PyArrayObject *array11 = NULL ; int val12 ; int ecode12 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; SpMatrix< double > *result = 0 ; { //# argout in arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:ompMask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; + (void)self; + if ((nobjs < 11) || (nobjs > 11)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9666,7 +9532,7 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9683,7 +9549,7 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_BOOL); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_BOOL); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9698,55 +9564,53 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj /*@SWIG@*/ } - ecode5 = SWIG_AsVal_bool(obj3, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ompMask" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_bool(obj4, &val6); + ecode6 = SWIG_AsVal_bool(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ompMask" "', argument " "6"" of type '" "bool""'"); } arg6 = static_cast< bool >(val6); { - array7 = obj_to_array_no_conversion(obj5, NPY_INT); + array7 = obj_to_array_no_conversion(swig_obj[5], NPY_INT); if (!array7 || !require_dimensions(array7,1) || !require_contiguous(array7) || !require_native(array7)) SWIG_fail; arg7 = new Vector ((int *)array_data(array7),(int)array_size(array7,0)); } - ecode8 = SWIG_AsVal_bool(obj6, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ompMask" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); { - array9 = obj_to_array_no_conversion(obj7, NPY_DOUBLE); + array9 = obj_to_array_no_conversion(swig_obj[7], NPY_DOUBLE); if (!array9 || !require_dimensions(array9,1) || !require_contiguous(array9) || !require_native(array9)) SWIG_fail; arg9 = new Vector ((double *)array_data(array9),(int)array_size(array9,0)); } - ecode10 = SWIG_AsVal_bool(obj8, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[8], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ompMask" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); { - array11 = obj_to_array_no_conversion(obj9, NPY_DOUBLE); + array11 = obj_to_array_no_conversion(swig_obj[9], NPY_DOUBLE); if (!array11 || !require_dimensions(array11,1) || !require_contiguous(array11) || !require_native(array11)) SWIG_fail; arg11 = new Vector ((double *)array_data(array11),(int)array_size(array11,0)); } - ecode12 = SWIG_AsVal_int(obj10, &val12); + ecode12 = SWIG_AsVal_int(swig_obj[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ompMask" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); try { result = (SpMatrix< double > *)_ompMask< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -9848,7 +9712,7 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } -SWIGINTERN PyObject *_wrap_ompMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ompMask__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -9879,27 +9743,17 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj PyArrayObject *array11 = NULL ; int val12 ; int ecode12 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; SpMatrix< float > *result = 0 ; { //# argout in arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:ompMask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; + (void)self; + if ((nobjs < 11) || (nobjs > 11)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9916,7 +9770,7 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9933,7 +9787,7 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_BOOL); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_BOOL); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -9948,55 +9802,53 @@ SWIGINTERN PyObject *_wrap_ompMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj /*@SWIG@*/ } - ecode5 = SWIG_AsVal_bool(obj3, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ompMask" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_bool(obj4, &val6); + ecode6 = SWIG_AsVal_bool(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ompMask" "', argument " "6"" of type '" "bool""'"); } arg6 = static_cast< bool >(val6); { - array7 = obj_to_array_no_conversion(obj5, NPY_INT); + array7 = obj_to_array_no_conversion(swig_obj[5], NPY_INT); if (!array7 || !require_dimensions(array7,1) || !require_contiguous(array7) || !require_native(array7)) SWIG_fail; arg7 = new Vector ((int *)array_data(array7),(int)array_size(array7,0)); } - ecode8 = SWIG_AsVal_bool(obj6, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ompMask" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); { - array9 = obj_to_array_no_conversion(obj7, NPY_FLOAT); + array9 = obj_to_array_no_conversion(swig_obj[7], NPY_FLOAT); if (!array9 || !require_dimensions(array9,1) || !require_contiguous(array9) || !require_native(array9)) SWIG_fail; arg9 = new Vector ((float *)array_data(array9),(int)array_size(array9,0)); } - ecode10 = SWIG_AsVal_bool(obj8, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[8], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ompMask" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); { - array11 = obj_to_array_no_conversion(obj9, NPY_FLOAT); + array11 = obj_to_array_no_conversion(swig_obj[9], NPY_FLOAT); if (!array11 || !require_dimensions(array11,1) || !require_contiguous(array11) || !require_native(array11)) SWIG_fail; arg11 = new Vector ((float *)array_data(array11),(int)array_size(array11,0)); } - ecode12 = SWIG_AsVal_int(obj10, &val12); + ecode12 = SWIG_AsVal_int(swig_obj[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ompMask" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); try { result = (SpMatrix< float > *)_ompMask< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -10103,15 +9955,11 @@ SWIGINTERN PyObject *_wrap_ompMask(PyObject *self, PyObject *args) { PyObject *argv[12] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 11) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "ompMask", 0, 11, argv))) SWIG_fail; + --argc; if (argc == 11) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -10167,7 +10015,7 @@ SWIGINTERN PyObject *_wrap_ompMask(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_ompMask__SWIG_0(self, args); + return _wrap_ompMask__SWIG_0(self, argc, argv); } } } @@ -10181,7 +10029,7 @@ SWIGINTERN PyObject *_wrap_ompMask(PyObject *self, PyObject *args) { } } if (argc == 11) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -10237,7 +10085,7 @@ SWIGINTERN PyObject *_wrap_ompMask(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_ompMask__SWIG_1(self, args); + return _wrap_ompMask__SWIG_1(self, argc, argv); } } } @@ -10252,7 +10100,7 @@ SWIGINTERN PyObject *_wrap_ompMask(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ompMask'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ompMask'.\n" " Possible C/C++ prototypes are:\n" " _ompMask< double >(Matrix< double > *,Matrix< double > *,Matrix< bool > *,Matrix< double > **,bool,bool,Vector< int > *,bool,Vector< double > *,bool,Vector< double > *,int const)\n" " _ompMask< float >(Matrix< float > *,Matrix< float > *,Matrix< bool > *,Matrix< float > **,bool,bool,Vector< int > *,bool,Vector< float > *,bool,Vector< float > *,int const)\n"); @@ -10260,7 +10108,7 @@ SWIGINTERN PyObject *_wrap_ompMask(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_somp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_somp__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -10277,18 +10125,13 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; SpMatrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:somp",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + (void)self; + if ((nobjs < 6) || (nobjs > 6)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10305,7 +10148,7 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10321,34 +10164,32 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_INT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_INT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((int *)array_data(array3),(int)array_size(array3,0)); } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "somp" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "somp" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "somp" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); try { result = (SpMatrix< double > *)_somp< double >(arg1,arg2,arg3,arg4,arg5,arg6); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -10414,7 +10255,7 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_somp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_somp__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -10431,18 +10272,13 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; SpMatrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:somp",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + (void)self; + if ((nobjs < 6) || (nobjs > 6)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10459,7 +10295,7 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10475,34 +10311,32 @@ SWIGINTERN PyObject *_wrap_somp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_INT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_INT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((int *)array_data(array3),(int)array_size(array3,0)); } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "somp" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_float(obj4, &val5); + ecode5 = SWIG_AsVal_float(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "somp" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "somp" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); try { result = (SpMatrix< float > *)_somp< float >(arg1,arg2,arg3,arg4,arg5,arg6); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -10573,15 +10407,11 @@ SWIGINTERN PyObject *_wrap_somp(PyObject *self, PyObject *args) { PyObject *argv[7] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 6) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "somp", 0, 6, argv))) SWIG_fail; + --argc; if (argc == 6) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -10612,7 +10442,7 @@ SWIGINTERN PyObject *_wrap_somp(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_somp__SWIG_1(self, args); + return _wrap_somp__SWIG_1(self, argc, argv); } } } @@ -10621,7 +10451,7 @@ SWIGINTERN PyObject *_wrap_somp(PyObject *self, PyObject *args) { } } if (argc == 6) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -10652,7 +10482,7 @@ SWIGINTERN PyObject *_wrap_somp(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_somp__SWIG_0(self, args); + return _wrap_somp__SWIG_0(self, argc, argv); } } } @@ -10662,7 +10492,7 @@ SWIGINTERN PyObject *_wrap_somp(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'somp'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'somp'.\n" " Possible C/C++ prototypes are:\n" " _somp< double >(Matrix< double > *,Matrix< double > *,Vector< int > *,int,double,int)\n" " _somp< float >(Matrix< float > *,Matrix< float > *,Vector< int > *,int,float,int)\n"); @@ -10670,7 +10500,7 @@ SWIGINTERN PyObject *_wrap_somp(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -10693,20 +10523,13 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; SpMatrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cd",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + (void)self; + if ((nobjs < 8) || (nobjs > 8)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10723,7 +10546,7 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10758,7 +10581,7 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray3 = obj2; + sparray3 = swig_obj[2]; if ( !( PyObject_HasAttrString(sparray3, "indptr") && PyObject_HasAttrString(sparray3, "indices") && PyObject_HasAttrString(sparray3, "data") && @@ -10816,40 +10639,38 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * /*@SWIG@*/ } - ecode4 = SWIG_AsVal_double(obj3, &val4); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cd" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cd" "', argument " "5"" of type '" "constraint_type""'"); } arg5 = static_cast< constraint_type >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cd" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cd" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cd" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); try { result = (SpMatrix< double > *)_cd< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -10915,7 +10736,7 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * } -SWIGINTERN PyObject *_wrap_cd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cd__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -10938,20 +10759,13 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; SpMatrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cd",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + (void)self; + if ((nobjs < 8) || (nobjs > 8)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -10968,7 +10782,7 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11003,7 +10817,7 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray3 = obj2; + sparray3 = swig_obj[2]; if ( !( PyObject_HasAttrString(sparray3, "indptr") && PyObject_HasAttrString(sparray3, "indices") && PyObject_HasAttrString(sparray3, "data") && @@ -11061,40 +10875,38 @@ SWIGINTERN PyObject *_wrap_cd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * /*@SWIG@*/ } - ecode4 = SWIG_AsVal_float(obj3, &val4); + ecode4 = SWIG_AsVal_float(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cd" "', argument " "4"" of type '" "float""'"); } arg4 = static_cast< float >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cd" "', argument " "5"" of type '" "constraint_type""'"); } arg5 = static_cast< constraint_type >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cd" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_float(obj6, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cd" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cd" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); try { result = (SpMatrix< float > *)_cd< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -11165,15 +10977,11 @@ SWIGINTERN PyObject *_wrap_cd(PyObject *self, PyObject *args) { PyObject *argv[9] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 8) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "cd", 0, 8, argv))) SWIG_fail; + --argc; if (argc == 8) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -11220,7 +11028,7 @@ SWIGINTERN PyObject *_wrap_cd(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_cd__SWIG_1(self, args); + return _wrap_cd__SWIG_1(self, argc, argv); } } } @@ -11231,7 +11039,7 @@ SWIGINTERN PyObject *_wrap_cd(PyObject *self, PyObject *args) { } } if (argc == 8) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -11278,7 +11086,7 @@ SWIGINTERN PyObject *_wrap_cd(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_cd__SWIG_0(self, args); + return _wrap_cd__SWIG_0(self, argc, argv); } } } @@ -11290,7 +11098,7 @@ SWIGINTERN PyObject *_wrap_cd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'cd'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'cd'.\n" " Possible C/C++ prototypes are:\n" " _cd< double >(Matrix< double > *,Matrix< double > *,SpMatrix< double > *,double,constraint_type,int,double,int)\n" " _cd< float >(Matrix< float > *,Matrix< float > *,SpMatrix< float > *,float,constraint_type,int,float,int)\n"); @@ -11298,7 +11106,7 @@ SWIGINTERN PyObject *_wrap_cd(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -11323,20 +11131,12 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:l1L2BCD",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11353,7 +11153,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11370,7 +11170,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11386,44 +11186,42 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj /*@SWIG@*/ } { - array4 = obj_to_array_no_conversion(obj3, NPY_INT); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_INT); if (!array4 || !require_dimensions(array4,1) || !require_contiguous(array4) || !require_native(array4)) SWIG_fail; arg4 = new Vector ((int *)array_data(array4),(int)array_size(array4,0)); } - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "l1L2BCD" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "l1L2BCD" "', argument " "6"" of type '" "constraint_type""'"); } arg6 = static_cast< constraint_type >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "l1L2BCD" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "l1L2BCD" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "l1L2BCD" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { _l1L2BCD< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -11455,7 +11253,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObj } -SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -11480,20 +11278,12 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:l1L2BCD",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11510,7 +11300,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11527,7 +11317,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -11543,44 +11333,42 @@ SWIGINTERN PyObject *_wrap_l1L2BCD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObj /*@SWIG@*/ } { - array4 = obj_to_array_no_conversion(obj3, NPY_INT); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_INT); if (!array4 || !require_dimensions(array4,1) || !require_contiguous(array4) || !require_native(array4)) SWIG_fail; arg4 = new Vector ((int *)array_data(array4),(int)array_size(array4,0)); } - ecode5 = SWIG_AsVal_float(obj4, &val5); + ecode5 = SWIG_AsVal_float(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "l1L2BCD" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "l1L2BCD" "', argument " "6"" of type '" "constraint_type""'"); } arg6 = static_cast< constraint_type >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "l1L2BCD" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_float(obj7, &val8); + ecode8 = SWIG_AsVal_float(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "l1L2BCD" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "l1L2BCD" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { _l1L2BCD< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -11617,15 +11405,11 @@ SWIGINTERN PyObject *_wrap_l1L2BCD(PyObject *self, PyObject *args) { PyObject *argv[10] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 9) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "l1L2BCD", 0, 9, argv))) SWIG_fail; + --argc; if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -11671,7 +11455,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_l1L2BCD__SWIG_1(self, args); + return _wrap_l1L2BCD__SWIG_1(self, argc, argv); } } } @@ -11683,7 +11467,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD(PyObject *self, PyObject *args) { } } if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -11729,7 +11513,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_l1L2BCD__SWIG_0(self, args); + return _wrap_l1L2BCD__SWIG_0(self, argc, argv); } } } @@ -11742,7 +11526,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'l1L2BCD'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'l1L2BCD'.\n" " Possible C/C++ prototypes are:\n" " _l1L2BCD< double >(Matrix< double > *,Matrix< double > *,Matrix< double > *,Vector< int > *,double,constraint_type,int,double,int)\n" " _l1L2BCD< float >(Matrix< float > *,Matrix< float > *,Matrix< float > *,Vector< int > *,float,constraint_type,int,float,int)\n"); @@ -11750,51 +11534,7 @@ SWIGINTERN PyObject *_wrap_l1L2BCD(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *L2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L2",SWIG_From_int(static_cast< int >(L2))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *L1L2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L1L2",SWIG_From_int(static_cast< int >(L1L2))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *L1L2FL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L1L2FL",SWIG_From_int(static_cast< int >(L1L2FL))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *L1L2MU_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *module; - PyObject *d; - if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL; - d = PyModule_GetDict(module); - if (!d) return NULL; - SWIG_Python_SetConstant(d, "L1L2MU",SWIG_From_int(static_cast< int >(L1L2MU))); - return SWIG_Py_Void(); -} - - -SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Data< double > *arg1 = (Data< double > *) 0 ; bool arg2 ; @@ -11917,47 +11657,6 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py int res44 ; char *buf44 = 0 ; int alloc44 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; - PyObject * obj40 = 0 ; Matrix< double > *result = 0 ; { @@ -11972,12 +11671,13 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py //# argout in arg5 = &data_temp5; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:alltrainDL",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39,&obj40)) SWIG_fail; + (void)self; + if ((nobjs < 41) || (nobjs > 41)) SWIG_fail; { - if ( PyObject_HasAttrString(obj0, "indptr")) { - PyObject* sparray =obj0; + if ( PyObject_HasAttrString(swig_obj[0], "indptr")) { + PyObject* sparray =swig_obj[0]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj0; + sparray = swig_obj[0]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -12036,7 +11736,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12052,19 +11752,19 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } } - ecode2 = SWIG_AsVal_bool(obj1, &val2); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "alltrainDL" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - ecode6 = SWIG_AsVal_bool(obj2, &val6); + ecode6 = SWIG_AsVal_bool(swig_obj[2], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "alltrainDL" "', argument " "6"" of type '" "bool""'"); } arg6 = static_cast< bool >(val6); { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array7 = obj_to_array_no_conversion(obj3, NPY_DOUBLE); + array7 = obj_to_array_no_conversion(swig_obj[3], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12081,7 +11781,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array8 = obj_to_array_no_conversion(obj4, NPY_DOUBLE); + array8 = obj_to_array_no_conversion(swig_obj[4], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12096,14 +11796,14 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } - ecode9 = SWIG_AsVal_int(obj5, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[5], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "alltrainDL" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array10 = obj_to_array_no_conversion(obj6, NPY_DOUBLE); + array10 = obj_to_array_no_conversion(swig_obj[6], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12119,7 +11819,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } { - array11 = obj_to_array_no_conversion(obj7, NPY_DOUBLE); + array11 = obj_to_array_no_conversion(swig_obj[7], NPY_DOUBLE); if (!array11 || !require_dimensions(array11,1) || !require_contiguous(array11) || !require_native(array11)) SWIG_fail; arg11 = new Vector ((double *)array_data(array11),(int)array_size(array11,0)); } @@ -12143,7 +11843,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray12 = obj8; + sparray12 = swig_obj[8]; if ( !( PyObject_HasAttrString(sparray12, "indptr") && PyObject_HasAttrString(sparray12, "indices") && PyObject_HasAttrString(sparray12, "data") && @@ -12221,7 +11921,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray13 = obj9; + sparray13 = swig_obj[9]; if ( !( PyObject_HasAttrString(sparray13, "indptr") && PyObject_HasAttrString(sparray13, "indices") && PyObject_HasAttrString(sparray13, "data") && @@ -12280,169 +11980,167 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } { - array14 = obj_to_array_no_conversion(obj10, NPY_INT); + array14 = obj_to_array_no_conversion(swig_obj[10], NPY_INT); if (!array14 || !require_dimensions(array14,1) || !require_contiguous(array14) || !require_native(array14)) SWIG_fail; arg14 = new Vector ((int *)array_data(array14),(int)array_size(array14,0)); } { - array15 = obj_to_array_no_conversion(obj11, NPY_INT); + array15 = obj_to_array_no_conversion(swig_obj[11], NPY_INT); if (!array15 || !require_dimensions(array15,1) || !require_contiguous(array15) || !require_native(array15)) SWIG_fail; arg15 = new Vector ((int *)array_data(array15),(int)array_size(array15,0)); } - ecode16 = SWIG_AsVal_int(obj12, &val16); + ecode16 = SWIG_AsVal_int(swig_obj[12], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "alltrainDL" "', argument " "16"" of type '" "int""'"); } arg16 = static_cast< int >(val16); - ecode17 = SWIG_AsVal_double(obj13, &val17); + ecode17 = SWIG_AsVal_double(swig_obj[13], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "alltrainDL" "', argument " "17"" of type '" "double""'"); } arg17 = static_cast< double >(val17); - ecode18 = SWIG_AsVal_bool(obj14, &val18); + ecode18 = SWIG_AsVal_bool(swig_obj[14], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "alltrainDL" "', argument " "18"" of type '" "bool""'"); } arg18 = static_cast< bool >(val18); - ecode19 = SWIG_AsVal_bool(obj15, &val19); + ecode19 = SWIG_AsVal_bool(swig_obj[15], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "alltrainDL" "', argument " "19"" of type '" "bool""'"); } arg19 = static_cast< bool >(val19); - ecode20 = SWIG_AsVal_int(obj16, &val20); + ecode20 = SWIG_AsVal_int(swig_obj[16], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "alltrainDL" "', argument " "20"" of type '" "int""'"); } arg20 = static_cast< int >(val20); - ecode21 = SWIG_AsVal_int(obj17, &val21); + ecode21 = SWIG_AsVal_int(swig_obj[17], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "alltrainDL" "', argument " "21"" of type '" "int""'"); } arg21 = static_cast< int >(val21); - ecode22 = SWIG_AsVal_double(obj18, &val22); + ecode22 = SWIG_AsVal_double(swig_obj[18], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "alltrainDL" "', argument " "22"" of type '" "double""'"); } arg22 = static_cast< double >(val22); - ecode23 = SWIG_AsVal_double(obj19, &val23); + ecode23 = SWIG_AsVal_double(swig_obj[19], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "alltrainDL" "', argument " "23"" of type '" "double""'"); } arg23 = static_cast< double >(val23); - ecode24 = SWIG_AsVal_double(obj20, &val24); + ecode24 = SWIG_AsVal_double(swig_obj[20], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "alltrainDL" "', argument " "24"" of type '" "double""'"); } arg24 = static_cast< double >(val24); - ecode25 = SWIG_AsVal_int(obj21, &val25); + ecode25 = SWIG_AsVal_int(swig_obj[21], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "alltrainDL" "', argument " "25"" of type '" "int""'"); } arg25 = static_cast< int >(val25); - ecode26 = SWIG_AsVal_double(obj22, &val26); + ecode26 = SWIG_AsVal_double(swig_obj[22], &val26); if (!SWIG_IsOK(ecode26)) { SWIG_exception_fail(SWIG_ArgError(ecode26), "in method '" "alltrainDL" "', argument " "26"" of type '" "double""'"); } arg26 = static_cast< double >(val26); - ecode27 = SWIG_AsVal_int(obj23, &val27); + ecode27 = SWIG_AsVal_int(swig_obj[23], &val27); if (!SWIG_IsOK(ecode27)) { SWIG_exception_fail(SWIG_ArgError(ecode27), "in method '" "alltrainDL" "', argument " "27"" of type '" "constraint_type""'"); } arg27 = static_cast< constraint_type >(val27); - res28 = SWIG_AsCharPtrAndSize(obj24, &buf28, NULL, &alloc28); + res28 = SWIG_AsCharPtrAndSize(swig_obj[24], &buf28, NULL, &alloc28); if (!SWIG_IsOK(res28)) { SWIG_exception_fail(SWIG_ArgError(res28), "in method '" "alltrainDL" "', argument " "28"" of type '" "char *""'"); } arg28 = reinterpret_cast< char * >(buf28); - ecode29 = SWIG_AsVal_bool(obj25, &val29); + ecode29 = SWIG_AsVal_bool(swig_obj[25], &val29); if (!SWIG_IsOK(ecode29)) { SWIG_exception_fail(SWIG_ArgError(ecode29), "in method '" "alltrainDL" "', argument " "29"" of type '" "bool""'"); } arg29 = static_cast< bool >(val29); - ecode30 = SWIG_AsVal_bool(obj26, &val30); + ecode30 = SWIG_AsVal_bool(swig_obj[26], &val30); if (!SWIG_IsOK(ecode30)) { SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "alltrainDL" "', argument " "30"" of type '" "bool""'"); } arg30 = static_cast< bool >(val30); - ecode31 = SWIG_AsVal_bool(obj27, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[27], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "alltrainDL" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_int(obj28, &val32); + ecode32 = SWIG_AsVal_int(swig_obj[28], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "alltrainDL" "', argument " "32"" of type '" "constraint_type_D""'"); } arg32 = static_cast< constraint_type_D >(val32); - ecode33 = SWIG_AsVal_bool(obj29, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[29], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "alltrainDL" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - ecode34 = SWIG_AsVal_bool(obj30, &val34); + ecode34 = SWIG_AsVal_bool(swig_obj[30], &val34); if (!SWIG_IsOK(ecode34)) { SWIG_exception_fail(SWIG_ArgError(ecode34), "in method '" "alltrainDL" "', argument " "34"" of type '" "bool""'"); } arg34 = static_cast< bool >(val34); - ecode35 = SWIG_AsVal_bool(obj31, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[31], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "alltrainDL" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); - ecode36 = SWIG_AsVal_double(obj32, &val36); + ecode36 = SWIG_AsVal_double(swig_obj[32], &val36); if (!SWIG_IsOK(ecode36)) { SWIG_exception_fail(SWIG_ArgError(ecode36), "in method '" "alltrainDL" "', argument " "36"" of type '" "double""'"); } arg36 = static_cast< double >(val36); - ecode37 = SWIG_AsVal_double(obj33, &val37); + ecode37 = SWIG_AsVal_double(swig_obj[33], &val37); if (!SWIG_IsOK(ecode37)) { SWIG_exception_fail(SWIG_ArgError(ecode37), "in method '" "alltrainDL" "', argument " "37"" of type '" "double""'"); } arg37 = static_cast< double >(val37); - ecode38 = SWIG_AsVal_double(obj34, &val38); + ecode38 = SWIG_AsVal_double(swig_obj[34], &val38); if (!SWIG_IsOK(ecode38)) { SWIG_exception_fail(SWIG_ArgError(ecode38), "in method '" "alltrainDL" "', argument " "38"" of type '" "double""'"); } arg38 = static_cast< double >(val38); - ecode39 = SWIG_AsVal_int(obj35, &val39); + ecode39 = SWIG_AsVal_int(swig_obj[35], &val39); if (!SWIG_IsOK(ecode39)) { SWIG_exception_fail(SWIG_ArgError(ecode39), "in method '" "alltrainDL" "', argument " "39"" of type '" "int""'"); } arg39 = static_cast< int >(val39); - ecode40 = SWIG_AsVal_bool(obj36, &val40); + ecode40 = SWIG_AsVal_bool(swig_obj[36], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "alltrainDL" "', argument " "40"" of type '" "bool""'"); } arg40 = static_cast< bool >(val40); - ecode41 = SWIG_AsVal_int(obj37, &val41); + ecode41 = SWIG_AsVal_int(swig_obj[37], &val41); if (!SWIG_IsOK(ecode41)) { SWIG_exception_fail(SWIG_ArgError(ecode41), "in method '" "alltrainDL" "', argument " "41"" of type '" "int""'"); } arg41 = static_cast< int >(val41); - ecode42 = SWIG_AsVal_bool(obj38, &val42); + ecode42 = SWIG_AsVal_bool(swig_obj[38], &val42); if (!SWIG_IsOK(ecode42)) { SWIG_exception_fail(SWIG_ArgError(ecode42), "in method '" "alltrainDL" "', argument " "42"" of type '" "bool""'"); } arg42 = static_cast< bool >(val42); - ecode43 = SWIG_AsVal_bool(obj39, &val43); + ecode43 = SWIG_AsVal_bool(swig_obj[39], &val43); if (!SWIG_IsOK(ecode43)) { SWIG_exception_fail(SWIG_ArgError(ecode43), "in method '" "alltrainDL" "', argument " "43"" of type '" "bool""'"); } arg43 = static_cast< bool >(val43); - res44 = SWIG_AsCharPtrAndSize(obj40, &buf44, NULL, &alloc44); + res44 = SWIG_AsCharPtrAndSize(swig_obj[40], &buf44, NULL, &alloc44); if (!SWIG_IsOK(res44)) { SWIG_exception_fail(SWIG_ArgError(res44), "in method '" "alltrainDL" "', argument " "44"" of type '" "char *""'"); } arg44 = reinterpret_cast< char * >(buf44); try { result = (Matrix< double > *)_alltrainDL< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40,arg41,arg42,arg43,arg44); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -12574,7 +12272,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } -SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Data< float > *arg1 = (Data< float > *) 0 ; bool arg2 ; @@ -12697,47 +12395,6 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py int res44 ; char *buf44 = 0 ; int alloc44 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; - PyObject * obj40 = 0 ; Matrix< float > *result = 0 ; { @@ -12752,12 +12409,13 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py //# argout in arg5 = &data_temp5; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:alltrainDL",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39,&obj40)) SWIG_fail; + (void)self; + if ((nobjs < 41) || (nobjs > 41)) SWIG_fail; { - if ( PyObject_HasAttrString(obj0, "indptr")) { - PyObject* sparray =obj0; + if ( PyObject_HasAttrString(swig_obj[0], "indptr")) { + PyObject* sparray =swig_obj[0]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj0; + sparray = swig_obj[0]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -12816,7 +12474,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12832,19 +12490,19 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } } - ecode2 = SWIG_AsVal_bool(obj1, &val2); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "alltrainDL" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - ecode6 = SWIG_AsVal_bool(obj2, &val6); + ecode6 = SWIG_AsVal_bool(swig_obj[2], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "alltrainDL" "', argument " "6"" of type '" "bool""'"); } arg6 = static_cast< bool >(val6); { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array7 = obj_to_array_no_conversion(obj3, NPY_FLOAT); + array7 = obj_to_array_no_conversion(swig_obj[3], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12861,7 +12519,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array8 = obj_to_array_no_conversion(obj4, NPY_FLOAT); + array8 = obj_to_array_no_conversion(swig_obj[4], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12876,14 +12534,14 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } - ecode9 = SWIG_AsVal_int(obj5, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[5], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "alltrainDL" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array10 = obj_to_array_no_conversion(obj6, NPY_FLOAT); + array10 = obj_to_array_no_conversion(swig_obj[6], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -12899,7 +12557,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } { - array11 = obj_to_array_no_conversion(obj7, NPY_FLOAT); + array11 = obj_to_array_no_conversion(swig_obj[7], NPY_FLOAT); if (!array11 || !require_dimensions(array11,1) || !require_contiguous(array11) || !require_native(array11)) SWIG_fail; arg11 = new Vector ((float *)array_data(array11),(int)array_size(array11,0)); } @@ -12923,7 +12581,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray12 = obj8; + sparray12 = swig_obj[8]; if ( !( PyObject_HasAttrString(sparray12, "indptr") && PyObject_HasAttrString(sparray12, "indices") && PyObject_HasAttrString(sparray12, "data") && @@ -13001,7 +12659,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray13 = obj9; + sparray13 = swig_obj[9]; if ( !( PyObject_HasAttrString(sparray13, "indptr") && PyObject_HasAttrString(sparray13, "indices") && PyObject_HasAttrString(sparray13, "data") && @@ -13060,169 +12718,167 @@ SWIGINTERN PyObject *_wrap_alltrainDL__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py } { - array14 = obj_to_array_no_conversion(obj10, NPY_INT); + array14 = obj_to_array_no_conversion(swig_obj[10], NPY_INT); if (!array14 || !require_dimensions(array14,1) || !require_contiguous(array14) || !require_native(array14)) SWIG_fail; arg14 = new Vector ((int *)array_data(array14),(int)array_size(array14,0)); } { - array15 = obj_to_array_no_conversion(obj11, NPY_INT); + array15 = obj_to_array_no_conversion(swig_obj[11], NPY_INT); if (!array15 || !require_dimensions(array15,1) || !require_contiguous(array15) || !require_native(array15)) SWIG_fail; arg15 = new Vector ((int *)array_data(array15),(int)array_size(array15,0)); } - ecode16 = SWIG_AsVal_int(obj12, &val16); + ecode16 = SWIG_AsVal_int(swig_obj[12], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "alltrainDL" "', argument " "16"" of type '" "int""'"); } arg16 = static_cast< int >(val16); - ecode17 = SWIG_AsVal_float(obj13, &val17); + ecode17 = SWIG_AsVal_float(swig_obj[13], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "alltrainDL" "', argument " "17"" of type '" "float""'"); } arg17 = static_cast< float >(val17); - ecode18 = SWIG_AsVal_bool(obj14, &val18); + ecode18 = SWIG_AsVal_bool(swig_obj[14], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "alltrainDL" "', argument " "18"" of type '" "bool""'"); } arg18 = static_cast< bool >(val18); - ecode19 = SWIG_AsVal_bool(obj15, &val19); + ecode19 = SWIG_AsVal_bool(swig_obj[15], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "alltrainDL" "', argument " "19"" of type '" "bool""'"); } arg19 = static_cast< bool >(val19); - ecode20 = SWIG_AsVal_int(obj16, &val20); + ecode20 = SWIG_AsVal_int(swig_obj[16], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "alltrainDL" "', argument " "20"" of type '" "int""'"); } arg20 = static_cast< int >(val20); - ecode21 = SWIG_AsVal_int(obj17, &val21); + ecode21 = SWIG_AsVal_int(swig_obj[17], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "alltrainDL" "', argument " "21"" of type '" "int""'"); } arg21 = static_cast< int >(val21); - ecode22 = SWIG_AsVal_double(obj18, &val22); + ecode22 = SWIG_AsVal_double(swig_obj[18], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "alltrainDL" "', argument " "22"" of type '" "double""'"); } arg22 = static_cast< double >(val22); - ecode23 = SWIG_AsVal_double(obj19, &val23); + ecode23 = SWIG_AsVal_double(swig_obj[19], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "alltrainDL" "', argument " "23"" of type '" "double""'"); } arg23 = static_cast< double >(val23); - ecode24 = SWIG_AsVal_double(obj20, &val24); + ecode24 = SWIG_AsVal_double(swig_obj[20], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "alltrainDL" "', argument " "24"" of type '" "double""'"); } arg24 = static_cast< double >(val24); - ecode25 = SWIG_AsVal_int(obj21, &val25); + ecode25 = SWIG_AsVal_int(swig_obj[21], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "alltrainDL" "', argument " "25"" of type '" "int""'"); } arg25 = static_cast< int >(val25); - ecode26 = SWIG_AsVal_double(obj22, &val26); + ecode26 = SWIG_AsVal_double(swig_obj[22], &val26); if (!SWIG_IsOK(ecode26)) { SWIG_exception_fail(SWIG_ArgError(ecode26), "in method '" "alltrainDL" "', argument " "26"" of type '" "double""'"); } arg26 = static_cast< double >(val26); - ecode27 = SWIG_AsVal_int(obj23, &val27); + ecode27 = SWIG_AsVal_int(swig_obj[23], &val27); if (!SWIG_IsOK(ecode27)) { SWIG_exception_fail(SWIG_ArgError(ecode27), "in method '" "alltrainDL" "', argument " "27"" of type '" "constraint_type""'"); } arg27 = static_cast< constraint_type >(val27); - res28 = SWIG_AsCharPtrAndSize(obj24, &buf28, NULL, &alloc28); + res28 = SWIG_AsCharPtrAndSize(swig_obj[24], &buf28, NULL, &alloc28); if (!SWIG_IsOK(res28)) { SWIG_exception_fail(SWIG_ArgError(res28), "in method '" "alltrainDL" "', argument " "28"" of type '" "char *""'"); } arg28 = reinterpret_cast< char * >(buf28); - ecode29 = SWIG_AsVal_bool(obj25, &val29); + ecode29 = SWIG_AsVal_bool(swig_obj[25], &val29); if (!SWIG_IsOK(ecode29)) { SWIG_exception_fail(SWIG_ArgError(ecode29), "in method '" "alltrainDL" "', argument " "29"" of type '" "bool""'"); } arg29 = static_cast< bool >(val29); - ecode30 = SWIG_AsVal_bool(obj26, &val30); + ecode30 = SWIG_AsVal_bool(swig_obj[26], &val30); if (!SWIG_IsOK(ecode30)) { SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "alltrainDL" "', argument " "30"" of type '" "bool""'"); } arg30 = static_cast< bool >(val30); - ecode31 = SWIG_AsVal_bool(obj27, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[27], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "alltrainDL" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_int(obj28, &val32); + ecode32 = SWIG_AsVal_int(swig_obj[28], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "alltrainDL" "', argument " "32"" of type '" "constraint_type_D""'"); } arg32 = static_cast< constraint_type_D >(val32); - ecode33 = SWIG_AsVal_bool(obj29, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[29], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "alltrainDL" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - ecode34 = SWIG_AsVal_bool(obj30, &val34); + ecode34 = SWIG_AsVal_bool(swig_obj[30], &val34); if (!SWIG_IsOK(ecode34)) { SWIG_exception_fail(SWIG_ArgError(ecode34), "in method '" "alltrainDL" "', argument " "34"" of type '" "bool""'"); } arg34 = static_cast< bool >(val34); - ecode35 = SWIG_AsVal_bool(obj31, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[31], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "alltrainDL" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); - ecode36 = SWIG_AsVal_double(obj32, &val36); + ecode36 = SWIG_AsVal_double(swig_obj[32], &val36); if (!SWIG_IsOK(ecode36)) { SWIG_exception_fail(SWIG_ArgError(ecode36), "in method '" "alltrainDL" "', argument " "36"" of type '" "double""'"); } arg36 = static_cast< double >(val36); - ecode37 = SWIG_AsVal_double(obj33, &val37); + ecode37 = SWIG_AsVal_double(swig_obj[33], &val37); if (!SWIG_IsOK(ecode37)) { SWIG_exception_fail(SWIG_ArgError(ecode37), "in method '" "alltrainDL" "', argument " "37"" of type '" "double""'"); } arg37 = static_cast< double >(val37); - ecode38 = SWIG_AsVal_float(obj34, &val38); + ecode38 = SWIG_AsVal_float(swig_obj[34], &val38); if (!SWIG_IsOK(ecode38)) { SWIG_exception_fail(SWIG_ArgError(ecode38), "in method '" "alltrainDL" "', argument " "38"" of type '" "float""'"); } arg38 = static_cast< float >(val38); - ecode39 = SWIG_AsVal_int(obj35, &val39); + ecode39 = SWIG_AsVal_int(swig_obj[35], &val39); if (!SWIG_IsOK(ecode39)) { SWIG_exception_fail(SWIG_ArgError(ecode39), "in method '" "alltrainDL" "', argument " "39"" of type '" "int""'"); } arg39 = static_cast< int >(val39); - ecode40 = SWIG_AsVal_bool(obj36, &val40); + ecode40 = SWIG_AsVal_bool(swig_obj[36], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "alltrainDL" "', argument " "40"" of type '" "bool""'"); } arg40 = static_cast< bool >(val40); - ecode41 = SWIG_AsVal_int(obj37, &val41); + ecode41 = SWIG_AsVal_int(swig_obj[37], &val41); if (!SWIG_IsOK(ecode41)) { SWIG_exception_fail(SWIG_ArgError(ecode41), "in method '" "alltrainDL" "', argument " "41"" of type '" "int""'"); } arg41 = static_cast< int >(val41); - ecode42 = SWIG_AsVal_bool(obj38, &val42); + ecode42 = SWIG_AsVal_bool(swig_obj[38], &val42); if (!SWIG_IsOK(ecode42)) { SWIG_exception_fail(SWIG_ArgError(ecode42), "in method '" "alltrainDL" "', argument " "42"" of type '" "bool""'"); } arg42 = static_cast< bool >(val42); - ecode43 = SWIG_AsVal_bool(obj39, &val43); + ecode43 = SWIG_AsVal_bool(swig_obj[39], &val43); if (!SWIG_IsOK(ecode43)) { SWIG_exception_fail(SWIG_ArgError(ecode43), "in method '" "alltrainDL" "', argument " "43"" of type '" "bool""'"); } arg43 = static_cast< bool >(val43); - res44 = SWIG_AsCharPtrAndSize(obj40, &buf44, NULL, &alloc44); + res44 = SWIG_AsCharPtrAndSize(swig_obj[40], &buf44, NULL, &alloc44); if (!SWIG_IsOK(res44)) { SWIG_exception_fail(SWIG_ArgError(res44), "in method '" "alltrainDL" "', argument " "44"" of type '" "char *""'"); } arg44 = reinterpret_cast< char * >(buf44); try { result = (Matrix< float > *)_alltrainDL< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40,arg41,arg42,arg43,arg44); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -13359,15 +13015,11 @@ SWIGINTERN PyObject *_wrap_alltrainDL(PyObject *self, PyObject *args) { PyObject *argv[42] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 41) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "alltrainDL", 0, 41, argv))) SWIG_fail; + --argc; if (argc == 41) { - int _v; + int _v = 0; { if( PyObject_HasAttrString(argv[0], "indptr")) _v = check_sparse(argv[0]); @@ -13583,7 +13235,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL(PyObject *self, PyObject *args) { int res = SWIG_AsCharPtrAndSize(argv[40], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_alltrainDL__SWIG_1(self, args); + return _wrap_alltrainDL__SWIG_1(self, argc, argv); } } } @@ -13627,7 +13279,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL(PyObject *self, PyObject *args) { } } if (argc == 41) { - int _v; + int _v = 0; { if( PyObject_HasAttrString(argv[0], "indptr")) _v = check_sparse(argv[0]); @@ -13843,7 +13495,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL(PyObject *self, PyObject *args) { int res = SWIG_AsCharPtrAndSize(argv[40], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_alltrainDL__SWIG_0(self, args); + return _wrap_alltrainDL__SWIG_0(self, argc, argv); } } } @@ -13888,7 +13540,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'alltrainDL'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'alltrainDL'.\n" " Possible C/C++ prototypes are:\n" " _alltrainDL< double >(Data< double > *,bool,Matrix< double > **,Matrix< double > **,Vector< int > **,bool,Matrix< double > *,Matrix< double > *,int,Matrix< double > *,Vector< double > *,SpMatrix< bool > *,SpMatrix< bool > *,Vector< int > *,Vector< int > *,int,double,bool,bool,int,int,double,double,double,int,double,constraint_type,char *,bool,bool,bool,constraint_type_D,bool,bool,bool,double,double,double,int,bool,int,bool,bool,char *)\n" " _alltrainDL< float >(Data< float > *,bool,Matrix< float > **,Matrix< float > **,Vector< int > **,bool,Matrix< float > *,Matrix< float > *,int,Matrix< float > *,Vector< float > *,SpMatrix< bool > *,SpMatrix< bool > *,Vector< int > *,Vector< int > *,int,float,bool,bool,int,int,double,double,double,int,double,constraint_type,char *,bool,bool,bool,constraint_type_D,bool,bool,bool,double,double,float,int,bool,int,bool,bool,char *)\n"); @@ -13896,7 +13548,7 @@ SWIGINTERN PyObject *_wrap_alltrainDL(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; int arg2 ; @@ -13928,15 +13580,6 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_0(PyObject *SWIGUNUSEDPARM(s int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; Matrix< double > *result = 0 ; { @@ -13945,10 +13588,11 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_0(PyObject *SWIGUNUSEDPARM(s { arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:archetypalAnalysis",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -13963,55 +13607,53 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_0(PyObject *SWIGUNUSEDPARM(s /*@SWIG@*/ } - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archetypalAnalysis" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - ecode5 = SWIG_AsVal_bool(obj2, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[2], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "archetypalAnalysis" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_double(obj3, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[3], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "archetypalAnalysis" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_bool(obj4, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "archetypalAnalysis" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "archetypalAnalysis" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "archetypalAnalysis" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_bool(obj7, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[7], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "archetypalAnalysis" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_int(obj8, &val11); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "archetypalAnalysis" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (Matrix< double > *)_archetypalAnalysis< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -14130,7 +13772,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_0(PyObject *SWIGUNUSEDPARM(s } -SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; int arg2 ; @@ -14162,15 +13804,6 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_1(PyObject *SWIGUNUSEDPARM(s int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; Matrix< float > *result = 0 ; { @@ -14179,10 +13812,11 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_1(PyObject *SWIGUNUSEDPARM(s { arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:archetypalAnalysis",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + (void)self; + if ((nobjs < 9) || (nobjs > 9)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -14197,55 +13831,53 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis__SWIG_1(PyObject *SWIGUNUSEDPARM(s /*@SWIG@*/ } - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archetypalAnalysis" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - ecode5 = SWIG_AsVal_bool(obj2, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[2], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "archetypalAnalysis" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_float(obj3, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[3], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "archetypalAnalysis" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_bool(obj4, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "archetypalAnalysis" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "archetypalAnalysis" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "archetypalAnalysis" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_bool(obj7, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[7], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "archetypalAnalysis" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_int(obj8, &val11); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "archetypalAnalysis" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (Matrix< float > *)_archetypalAnalysis< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -14369,15 +14001,11 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis(PyObject *self, PyObject *args) { PyObject *argv[10] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 9) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "archetypalAnalysis", 0, 9, argv))) SWIG_fail; + --argc; if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -14423,7 +14051,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_archetypalAnalysis__SWIG_1(self, args); + return _wrap_archetypalAnalysis__SWIG_1(self, argc, argv); } } } @@ -14435,7 +14063,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis(PyObject *self, PyObject *args) { } } if (argc == 9) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -14481,7 +14109,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_archetypalAnalysis__SWIG_0(self, args); + return _wrap_archetypalAnalysis__SWIG_0(self, argc, argv); } } } @@ -14494,7 +14122,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'archetypalAnalysis'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'archetypalAnalysis'.\n" " Possible C/C++ prototypes are:\n" " _archetypalAnalysis< double >(Matrix< double > *,int,SpMatrix< double > **,SpMatrix< double > **,bool,double,bool,int,int,bool,int)\n" " _archetypalAnalysis< float >(Matrix< float > *,int,SpMatrix< float > **,SpMatrix< float > **,bool,float,bool,int,int,bool,int)\n"); @@ -14502,7 +14130,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysis(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -14530,14 +14158,6 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *SWIGUNUSEDPA int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; Matrix< double > *result = 0 ; { @@ -14546,10 +14166,11 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *SWIGUNUSEDPA { arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:archetypalAnalysisInit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + (void)self; + if ((nobjs < 8) || (nobjs > 8)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -14566,7 +14187,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *SWIGUNUSEDPA } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -14581,45 +14202,43 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *SWIGUNUSEDPA /*@SWIG@*/ } - ecode5 = SWIG_AsVal_bool(obj2, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[2], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "archetypalAnalysisInit" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_double(obj3, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[3], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "archetypalAnalysisInit" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_bool(obj4, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "archetypalAnalysisInit" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "archetypalAnalysisInit" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "archetypalAnalysisInit" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_int(obj7, &val10); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "archetypalAnalysisInit" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); try { result = (Matrix< double > *)_archetypalAnalysisInit< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -14744,7 +14363,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_0(PyObject *SWIGUNUSEDPA } -SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -14772,14 +14391,6 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_1(PyObject *SWIGUNUSEDPA int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; Matrix< float > *result = 0 ; { @@ -14788,10 +14399,11 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_1(PyObject *SWIGUNUSEDPA { arg4 = &data_temp4; } - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:archetypalAnalysisInit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + (void)self; + if ((nobjs < 8) || (nobjs > 8)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -14808,7 +14420,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_1(PyObject *SWIGUNUSEDPA } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -14823,45 +14435,43 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit__SWIG_1(PyObject *SWIGUNUSEDPA /*@SWIG@*/ } - ecode5 = SWIG_AsVal_bool(obj2, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[2], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "archetypalAnalysisInit" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - ecode6 = SWIG_AsVal_float(obj3, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[3], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "archetypalAnalysisInit" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_bool(obj4, &val7); + ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "archetypalAnalysisInit" "', argument " "7"" of type '" "bool""'"); } arg7 = static_cast< bool >(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "archetypalAnalysisInit" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "archetypalAnalysisInit" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_int(obj7, &val10); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "archetypalAnalysisInit" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); try { result = (Matrix< float > *)_archetypalAnalysisInit< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -14991,15 +14601,11 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit(PyObject *self, PyObject *args PyObject *argv[9] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 8) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "archetypalAnalysisInit", 0, 8, argv))) SWIG_fail; + --argc; if (argc == 8) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -15040,7 +14646,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit(PyObject *self, PyObject *args _v = SWIG_CheckState(res); } if (_v) { - return _wrap_archetypalAnalysisInit__SWIG_1(self, args); + return _wrap_archetypalAnalysisInit__SWIG_1(self, argc, argv); } } } @@ -15051,7 +14657,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit(PyObject *self, PyObject *args } } if (argc == 8) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -15092,7 +14698,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit(PyObject *self, PyObject *args _v = SWIG_CheckState(res); } if (_v) { - return _wrap_archetypalAnalysisInit__SWIG_0(self, args); + return _wrap_archetypalAnalysisInit__SWIG_0(self, argc, argv); } } } @@ -15104,7 +14710,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'archetypalAnalysisInit'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'archetypalAnalysisInit'.\n" " Possible C/C++ prototypes are:\n" " _archetypalAnalysisInit< double >(Matrix< double > *,Matrix< double > *,SpMatrix< double > **,SpMatrix< double > **,bool,double,bool,int,int,int)\n" " _archetypalAnalysisInit< float >(Matrix< float > *,Matrix< float > *,SpMatrix< float > **,SpMatrix< float > **,bool,float,bool,int,int,int)\n"); @@ -15112,7 +14718,7 @@ SWIGINTERN PyObject *_wrap_archetypalAnalysisInit(PyObject *self, PyObject *args } -SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -15124,16 +14730,13 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; SpMatrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:decompSimplex",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15150,7 +14753,7 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15165,25 +14768,23 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode3 = SWIG_AsVal_bool(obj2, &val3); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "decompSimplex" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "decompSimplex" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (SpMatrix< double > *)_decompSimplex< double >(arg1,arg2,arg3,arg4); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -15243,7 +14844,7 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -15255,16 +14856,13 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; SpMatrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:decompSimplex",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15281,7 +14879,7 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15296,25 +14894,23 @@ SWIGINTERN PyObject *_wrap_decompSimplex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode3 = SWIG_AsVal_bool(obj2, &val3); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "decompSimplex" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "decompSimplex" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (SpMatrix< float > *)_decompSimplex< float >(arg1,arg2,arg3,arg4); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -15379,15 +14975,11 @@ SWIGINTERN PyObject *_wrap_decompSimplex(PyObject *self, PyObject *args) { PyObject *argv[5] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "decompSimplex", 0, 4, argv))) SWIG_fail; + --argc; if (argc == 4) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -15408,14 +15000,14 @@ SWIGINTERN PyObject *_wrap_decompSimplex(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_decompSimplex__SWIG_0(self, args); + return _wrap_decompSimplex__SWIG_0(self, argc, argv); } } } } } if (argc == 4) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -15436,7 +15028,7 @@ SWIGINTERN PyObject *_wrap_decompSimplex(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_decompSimplex__SWIG_1(self, args); + return _wrap_decompSimplex__SWIG_1(self, argc, argv); } } } @@ -15444,7 +15036,7 @@ SWIGINTERN PyObject *_wrap_decompSimplex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'decompSimplex'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'decompSimplex'.\n" " Possible C/C++ prototypes are:\n" " _decompSimplex< double >(Matrix< double > *,Matrix< double > *,bool,int)\n" " _decompSimplex< float >(Matrix< float > *,Matrix< float > *,bool,int)\n"); @@ -15452,7 +15044,7 @@ SWIGINTERN PyObject *_wrap_decompSimplex(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; AbstractMatrixB< double > *arg2 = (AbstractMatrixB< double > *) 0 ; @@ -15570,52 +15162,13 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO int ecode39 = 0 ; int val40 ; int ecode40 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; Matrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:fistaFlat",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39)) SWIG_fail; + (void)self; + if ((nobjs < 40) || (nobjs > 40)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15649,10 +15202,10 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO >>> type(A.shape) */ - if ( PyObject_HasAttrString(obj1, "indptr")) { - PyObject* sparray =obj1; + if ( PyObject_HasAttrString(swig_obj[1], "indptr")) { + PyObject* sparray =swig_obj[1]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj1; + sparray = swig_obj[1]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -15711,7 +15264,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15729,7 +15282,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15746,7 +15299,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array4 = obj_to_array_no_conversion(obj3, NPY_DOUBLE); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -15762,194 +15315,192 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO /*@SWIG@*/ } { - array5 = obj_to_array_no_conversion(obj4, NPY_INT); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_INT); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((int *)array_data(array5),(int)array_size(array5,0)); } - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fistaFlat" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fistaFlat" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fistaFlat" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); - ecode9 = SWIG_AsVal_bool(obj8, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fistaFlat" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); - ecode10 = SWIG_AsVal_double(obj9, &val10); + ecode10 = SWIG_AsVal_double(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fistaFlat" "', argument " "10"" of type '" "double""'"); } arg10 = static_cast< double >(val10); - ecode11 = SWIG_AsVal_double(obj10, &val11); + ecode11 = SWIG_AsVal_double(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fistaFlat" "', argument " "11"" of type '" "double""'"); } arg11 = static_cast< double >(val11); - ecode12 = SWIG_AsVal_double(obj11, &val12); + ecode12 = SWIG_AsVal_double(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fistaFlat" "', argument " "12"" of type '" "double""'"); } arg12 = static_cast< double >(val12); - ecode13 = SWIG_AsVal_double(obj12, &val13); + ecode13 = SWIG_AsVal_double(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fistaFlat" "', argument " "13"" of type '" "double""'"); } arg13 = static_cast< double >(val13); - ecode14 = SWIG_AsVal_double(obj13, &val14); + ecode14 = SWIG_AsVal_double(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fistaFlat" "', argument " "14"" of type '" "double""'"); } arg14 = static_cast< double >(val14); - ecode15 = SWIG_AsVal_double(obj14, &val15); + ecode15 = SWIG_AsVal_double(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fistaFlat" "', argument " "15"" of type '" "double""'"); } arg15 = static_cast< double >(val15); - ecode16 = SWIG_AsVal_double(obj15, &val16); + ecode16 = SWIG_AsVal_double(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fistaFlat" "', argument " "16"" of type '" "double""'"); } arg16 = static_cast< double >(val16); - ecode17 = SWIG_AsVal_double(obj16, &val17); + ecode17 = SWIG_AsVal_double(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "fistaFlat" "', argument " "17"" of type '" "double""'"); } arg17 = static_cast< double >(val17); - ecode18 = SWIG_AsVal_double(obj17, &val18); + ecode18 = SWIG_AsVal_double(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "fistaFlat" "', argument " "18"" of type '" "double""'"); } arg18 = static_cast< double >(val18); - ecode19 = SWIG_AsVal_int(obj18, &val19); + ecode19 = SWIG_AsVal_int(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "fistaFlat" "', argument " "19"" of type '" "int""'"); } arg19 = static_cast< int >(val19); - ecode20 = SWIG_AsVal_int(obj19, &val20); + ecode20 = SWIG_AsVal_int(swig_obj[19], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "fistaFlat" "', argument " "20"" of type '" "int""'"); } arg20 = static_cast< int >(val20); - ecode21 = SWIG_AsVal_bool(obj20, &val21); + ecode21 = SWIG_AsVal_bool(swig_obj[20], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "fistaFlat" "', argument " "21"" of type '" "bool""'"); } arg21 = static_cast< bool >(val21); - ecode22 = SWIG_AsVal_bool(obj21, &val22); + ecode22 = SWIG_AsVal_bool(swig_obj[21], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "fistaFlat" "', argument " "22"" of type '" "bool""'"); } arg22 = static_cast< bool >(val22); - ecode23 = SWIG_AsVal_bool(obj22, &val23); + ecode23 = SWIG_AsVal_bool(swig_obj[22], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "fistaFlat" "', argument " "23"" of type '" "bool""'"); } arg23 = static_cast< bool >(val23); - ecode24 = SWIG_AsVal_bool(obj23, &val24); + ecode24 = SWIG_AsVal_bool(swig_obj[23], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "fistaFlat" "', argument " "24"" of type '" "bool""'"); } arg24 = static_cast< bool >(val24); - ecode25 = SWIG_AsVal_bool(obj24, &val25); + ecode25 = SWIG_AsVal_bool(swig_obj[24], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "fistaFlat" "', argument " "25"" of type '" "bool""'"); } arg25 = static_cast< bool >(val25); - res26 = SWIG_AsCharPtrAndSize(obj25, &buf26, NULL, &alloc26); + res26 = SWIG_AsCharPtrAndSize(swig_obj[25], &buf26, NULL, &alloc26); if (!SWIG_IsOK(res26)) { SWIG_exception_fail(SWIG_ArgError(res26), "in method '" "fistaFlat" "', argument " "26"" of type '" "char *""'"); } arg26 = reinterpret_cast< char * >(buf26); - res27 = SWIG_AsCharPtrAndSize(obj26, &buf27, NULL, &alloc27); + res27 = SWIG_AsCharPtrAndSize(swig_obj[26], &buf27, NULL, &alloc27); if (!SWIG_IsOK(res27)) { SWIG_exception_fail(SWIG_ArgError(res27), "in method '" "fistaFlat" "', argument " "27"" of type '" "char *""'"); } arg27 = reinterpret_cast< char * >(buf27); - ecode28 = SWIG_AsVal_bool(obj27, &val28); + ecode28 = SWIG_AsVal_bool(swig_obj[27], &val28); if (!SWIG_IsOK(ecode28)) { SWIG_exception_fail(SWIG_ArgError(ecode28), "in method '" "fistaFlat" "', argument " "28"" of type '" "bool""'"); } arg28 = static_cast< bool >(val28); - ecode29 = SWIG_AsVal_bool(obj28, &val29); + ecode29 = SWIG_AsVal_bool(swig_obj[28], &val29); if (!SWIG_IsOK(ecode29)) { SWIG_exception_fail(SWIG_ArgError(ecode29), "in method '" "fistaFlat" "', argument " "29"" of type '" "bool""'"); } arg29 = static_cast< bool >(val29); - ecode30 = SWIG_AsVal_bool(obj29, &val30); + ecode30 = SWIG_AsVal_bool(swig_obj[29], &val30); if (!SWIG_IsOK(ecode30)) { SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "fistaFlat" "', argument " "30"" of type '" "bool""'"); } arg30 = static_cast< bool >(val30); - ecode31 = SWIG_AsVal_bool(obj30, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[30], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "fistaFlat" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_bool(obj31, &val32); + ecode32 = SWIG_AsVal_bool(swig_obj[31], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "fistaFlat" "', argument " "32"" of type '" "bool""'"); } arg32 = static_cast< bool >(val32); - ecode33 = SWIG_AsVal_bool(obj32, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[32], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "fistaFlat" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - res34 = SWIG_AsCharPtrAndSize(obj33, &buf34, NULL, &alloc34); + res34 = SWIG_AsCharPtrAndSize(swig_obj[33], &buf34, NULL, &alloc34); if (!SWIG_IsOK(res34)) { SWIG_exception_fail(SWIG_ArgError(res34), "in method '" "fistaFlat" "', argument " "34"" of type '" "char *""'"); } arg34 = reinterpret_cast< char * >(buf34); - ecode35 = SWIG_AsVal_bool(obj34, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[34], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "fistaFlat" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); { - array36 = obj_to_array_no_conversion(obj35, NPY_DOUBLE); + array36 = obj_to_array_no_conversion(swig_obj[35], NPY_DOUBLE); if (!array36 || !require_dimensions(array36,1) || !require_contiguous(array36) || !require_native(array36)) SWIG_fail; arg36 = new Vector ((double *)array_data(array36),(int)array_size(array36,0)); } - ecode37 = SWIG_AsVal_int(obj36, &val37); + ecode37 = SWIG_AsVal_int(swig_obj[36], &val37); if (!SWIG_IsOK(ecode37)) { SWIG_exception_fail(SWIG_ArgError(ecode37), "in method '" "fistaFlat" "', argument " "37"" of type '" "int""'"); } arg37 = static_cast< int >(val37); - ecode38 = SWIG_AsVal_bool(obj37, &val38); + ecode38 = SWIG_AsVal_bool(swig_obj[37], &val38); if (!SWIG_IsOK(ecode38)) { SWIG_exception_fail(SWIG_ArgError(ecode38), "in method '" "fistaFlat" "', argument " "38"" of type '" "bool""'"); } arg38 = static_cast< bool >(val38); - ecode39 = SWIG_AsVal_bool(obj38, &val39); + ecode39 = SWIG_AsVal_bool(swig_obj[38], &val39); if (!SWIG_IsOK(ecode39)) { SWIG_exception_fail(SWIG_ArgError(ecode39), "in method '" "fistaFlat" "', argument " "39"" of type '" "bool""'"); } arg39 = static_cast< bool >(val39); - ecode40 = SWIG_AsVal_int(obj39, &val40); + ecode40 = SWIG_AsVal_int(swig_obj[39], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "fistaFlat" "', argument " "40"" of type '" "int""'"); } arg40 = static_cast< int >(val40); try { result = (Matrix< double > *)_fistaFlat< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -16016,7 +15567,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } -SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; AbstractMatrixB< float > *arg2 = (AbstractMatrixB< float > *) 0 ; @@ -16134,52 +15685,13 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO int ecode39 = 0 ; int val40 ; int ecode40 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; Matrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:fistaFlat",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39)) SWIG_fail; + (void)self; + if ((nobjs < 40) || (nobjs > 40)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -16213,10 +15725,10 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO >>> type(A.shape) */ - if ( PyObject_HasAttrString(obj1, "indptr")) { - PyObject* sparray =obj1; + if ( PyObject_HasAttrString(swig_obj[1], "indptr")) { + PyObject* sparray =swig_obj[1]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj1; + sparray = swig_obj[1]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -16275,7 +15787,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -16293,7 +15805,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -16310,7 +15822,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array4 = obj_to_array_no_conversion(obj3, NPY_FLOAT); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -16326,194 +15838,192 @@ SWIGINTERN PyObject *_wrap_fistaFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO /*@SWIG@*/ } { - array5 = obj_to_array_no_conversion(obj4, NPY_INT); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_INT); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((int *)array_data(array5),(int)array_size(array5,0)); } - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fistaFlat" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fistaFlat" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_float(obj7, &val8); + ecode8 = SWIG_AsVal_float(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fistaFlat" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); - ecode9 = SWIG_AsVal_bool(obj8, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fistaFlat" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); - ecode10 = SWIG_AsVal_float(obj9, &val10); + ecode10 = SWIG_AsVal_float(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fistaFlat" "', argument " "10"" of type '" "float""'"); } arg10 = static_cast< float >(val10); - ecode11 = SWIG_AsVal_float(obj10, &val11); + ecode11 = SWIG_AsVal_float(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fistaFlat" "', argument " "11"" of type '" "float""'"); } arg11 = static_cast< float >(val11); - ecode12 = SWIG_AsVal_float(obj11, &val12); + ecode12 = SWIG_AsVal_float(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fistaFlat" "', argument " "12"" of type '" "float""'"); } arg12 = static_cast< float >(val12); - ecode13 = SWIG_AsVal_float(obj12, &val13); + ecode13 = SWIG_AsVal_float(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fistaFlat" "', argument " "13"" of type '" "float""'"); } arg13 = static_cast< float >(val13); - ecode14 = SWIG_AsVal_float(obj13, &val14); + ecode14 = SWIG_AsVal_float(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fistaFlat" "', argument " "14"" of type '" "float""'"); } arg14 = static_cast< float >(val14); - ecode15 = SWIG_AsVal_float(obj14, &val15); + ecode15 = SWIG_AsVal_float(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fistaFlat" "', argument " "15"" of type '" "float""'"); } arg15 = static_cast< float >(val15); - ecode16 = SWIG_AsVal_float(obj15, &val16); + ecode16 = SWIG_AsVal_float(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fistaFlat" "', argument " "16"" of type '" "float""'"); } arg16 = static_cast< float >(val16); - ecode17 = SWIG_AsVal_float(obj16, &val17); + ecode17 = SWIG_AsVal_float(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "fistaFlat" "', argument " "17"" of type '" "float""'"); } arg17 = static_cast< float >(val17); - ecode18 = SWIG_AsVal_float(obj17, &val18); + ecode18 = SWIG_AsVal_float(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "fistaFlat" "', argument " "18"" of type '" "float""'"); } arg18 = static_cast< float >(val18); - ecode19 = SWIG_AsVal_int(obj18, &val19); + ecode19 = SWIG_AsVal_int(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "fistaFlat" "', argument " "19"" of type '" "int""'"); } arg19 = static_cast< int >(val19); - ecode20 = SWIG_AsVal_int(obj19, &val20); + ecode20 = SWIG_AsVal_int(swig_obj[19], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "fistaFlat" "', argument " "20"" of type '" "int""'"); } arg20 = static_cast< int >(val20); - ecode21 = SWIG_AsVal_bool(obj20, &val21); + ecode21 = SWIG_AsVal_bool(swig_obj[20], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "fistaFlat" "', argument " "21"" of type '" "bool""'"); } arg21 = static_cast< bool >(val21); - ecode22 = SWIG_AsVal_bool(obj21, &val22); + ecode22 = SWIG_AsVal_bool(swig_obj[21], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "fistaFlat" "', argument " "22"" of type '" "bool""'"); } arg22 = static_cast< bool >(val22); - ecode23 = SWIG_AsVal_bool(obj22, &val23); + ecode23 = SWIG_AsVal_bool(swig_obj[22], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "fistaFlat" "', argument " "23"" of type '" "bool""'"); } arg23 = static_cast< bool >(val23); - ecode24 = SWIG_AsVal_bool(obj23, &val24); + ecode24 = SWIG_AsVal_bool(swig_obj[23], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "fistaFlat" "', argument " "24"" of type '" "bool""'"); } arg24 = static_cast< bool >(val24); - ecode25 = SWIG_AsVal_bool(obj24, &val25); + ecode25 = SWIG_AsVal_bool(swig_obj[24], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "fistaFlat" "', argument " "25"" of type '" "bool""'"); } arg25 = static_cast< bool >(val25); - res26 = SWIG_AsCharPtrAndSize(obj25, &buf26, NULL, &alloc26); + res26 = SWIG_AsCharPtrAndSize(swig_obj[25], &buf26, NULL, &alloc26); if (!SWIG_IsOK(res26)) { SWIG_exception_fail(SWIG_ArgError(res26), "in method '" "fistaFlat" "', argument " "26"" of type '" "char *""'"); } arg26 = reinterpret_cast< char * >(buf26); - res27 = SWIG_AsCharPtrAndSize(obj26, &buf27, NULL, &alloc27); + res27 = SWIG_AsCharPtrAndSize(swig_obj[26], &buf27, NULL, &alloc27); if (!SWIG_IsOK(res27)) { SWIG_exception_fail(SWIG_ArgError(res27), "in method '" "fistaFlat" "', argument " "27"" of type '" "char *""'"); } arg27 = reinterpret_cast< char * >(buf27); - ecode28 = SWIG_AsVal_bool(obj27, &val28); + ecode28 = SWIG_AsVal_bool(swig_obj[27], &val28); if (!SWIG_IsOK(ecode28)) { SWIG_exception_fail(SWIG_ArgError(ecode28), "in method '" "fistaFlat" "', argument " "28"" of type '" "bool""'"); } arg28 = static_cast< bool >(val28); - ecode29 = SWIG_AsVal_bool(obj28, &val29); + ecode29 = SWIG_AsVal_bool(swig_obj[28], &val29); if (!SWIG_IsOK(ecode29)) { SWIG_exception_fail(SWIG_ArgError(ecode29), "in method '" "fistaFlat" "', argument " "29"" of type '" "bool""'"); } arg29 = static_cast< bool >(val29); - ecode30 = SWIG_AsVal_bool(obj29, &val30); + ecode30 = SWIG_AsVal_bool(swig_obj[29], &val30); if (!SWIG_IsOK(ecode30)) { SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "fistaFlat" "', argument " "30"" of type '" "bool""'"); } arg30 = static_cast< bool >(val30); - ecode31 = SWIG_AsVal_bool(obj30, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[30], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "fistaFlat" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_bool(obj31, &val32); + ecode32 = SWIG_AsVal_bool(swig_obj[31], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "fistaFlat" "', argument " "32"" of type '" "bool""'"); } arg32 = static_cast< bool >(val32); - ecode33 = SWIG_AsVal_bool(obj32, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[32], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "fistaFlat" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - res34 = SWIG_AsCharPtrAndSize(obj33, &buf34, NULL, &alloc34); + res34 = SWIG_AsCharPtrAndSize(swig_obj[33], &buf34, NULL, &alloc34); if (!SWIG_IsOK(res34)) { SWIG_exception_fail(SWIG_ArgError(res34), "in method '" "fistaFlat" "', argument " "34"" of type '" "char *""'"); } arg34 = reinterpret_cast< char * >(buf34); - ecode35 = SWIG_AsVal_bool(obj34, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[34], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "fistaFlat" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); { - array36 = obj_to_array_no_conversion(obj35, NPY_FLOAT); + array36 = obj_to_array_no_conversion(swig_obj[35], NPY_FLOAT); if (!array36 || !require_dimensions(array36,1) || !require_contiguous(array36) || !require_native(array36)) SWIG_fail; arg36 = new Vector ((float *)array_data(array36),(int)array_size(array36,0)); } - ecode37 = SWIG_AsVal_int(obj36, &val37); + ecode37 = SWIG_AsVal_int(swig_obj[36], &val37); if (!SWIG_IsOK(ecode37)) { SWIG_exception_fail(SWIG_ArgError(ecode37), "in method '" "fistaFlat" "', argument " "37"" of type '" "int""'"); } arg37 = static_cast< int >(val37); - ecode38 = SWIG_AsVal_bool(obj37, &val38); + ecode38 = SWIG_AsVal_bool(swig_obj[37], &val38); if (!SWIG_IsOK(ecode38)) { SWIG_exception_fail(SWIG_ArgError(ecode38), "in method '" "fistaFlat" "', argument " "38"" of type '" "bool""'"); } arg38 = static_cast< bool >(val38); - ecode39 = SWIG_AsVal_bool(obj38, &val39); + ecode39 = SWIG_AsVal_bool(swig_obj[38], &val39); if (!SWIG_IsOK(ecode39)) { SWIG_exception_fail(SWIG_ArgError(ecode39), "in method '" "fistaFlat" "', argument " "39"" of type '" "bool""'"); } arg39 = static_cast< bool >(val39); - ecode40 = SWIG_AsVal_int(obj39, &val40); + ecode40 = SWIG_AsVal_int(swig_obj[39], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "fistaFlat" "', argument " "40"" of type '" "int""'"); } arg40 = static_cast< int >(val40); try { result = (Matrix< float > *)_fistaFlat< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -16585,15 +16095,11 @@ SWIGINTERN PyObject *_wrap_fistaFlat(PyObject *self, PyObject *args) { PyObject *argv[41] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 40) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "fistaFlat", 0, 40, argv))) SWIG_fail; + --argc; if (argc == 40) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -16797,7 +16303,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_fistaFlat__SWIG_1(self, args); + return _wrap_fistaFlat__SWIG_1(self, argc, argv); } } } @@ -16840,7 +16346,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat(PyObject *self, PyObject *args) { } } if (argc == 40) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -17044,7 +16550,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_fistaFlat__SWIG_0(self, args); + return _wrap_fistaFlat__SWIG_0(self, argc, argv); } } } @@ -17088,7 +16594,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'fistaFlat'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fistaFlat'.\n" " Possible C/C++ prototypes are:\n" " _fistaFlat< double >(Matrix< double > *,AbstractMatrixB< double > *,Matrix< double > *,Matrix< double > *,Vector< int > *,int,int,double,bool,double,double,double,double,double,double,double,double,double,int,int,bool,bool,bool,bool,bool,char *,char *,bool,bool,bool,bool,bool,bool,char *,bool,Vector< double > *,int,bool,bool,int)\n" " _fistaFlat< float >(Matrix< float > *,AbstractMatrixB< float > *,Matrix< float > *,Matrix< float > *,Vector< int > *,int,int,float,bool,float,float,float,float,float,float,float,float,float,int,int,bool,bool,bool,bool,bool,char *,char *,bool,bool,bool,bool,bool,bool,char *,bool,Vector< float > *,int,bool,bool,int)\n"); @@ -17096,7 +16602,7 @@ SWIGINTERN PyObject *_wrap_fistaFlat(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; AbstractMatrixB< double > *arg2 = (AbstractMatrixB< double > *) 0 ; @@ -17220,55 +16726,13 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO int ecode42 = 0 ; int val43 ; int ecode43 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; - PyObject * obj40 = 0 ; - PyObject * obj41 = 0 ; - PyObject * obj42 = 0 ; Matrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:fistaTree",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39,&obj40,&obj41,&obj42)) SWIG_fail; + (void)self; + if ((nobjs < 43) || (nobjs > 43)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -17302,10 +16766,10 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO >>> type(A.shape) */ - if ( PyObject_HasAttrString(obj1, "indptr")) { - PyObject* sparray =obj1; + if ( PyObject_HasAttrString(swig_obj[1], "indptr")) { + PyObject* sparray =swig_obj[1]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj1; + sparray = swig_obj[1]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -17364,7 +16828,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -17382,7 +16846,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -17399,7 +16863,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array4 = obj_to_array_no_conversion(obj3, NPY_DOUBLE); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -17415,7 +16879,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO /*@SWIG@*/ } { - array5 = obj_to_array_no_conversion(obj4, NPY_DOUBLE); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_DOUBLE); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((double *)array_data(array5),(int)array_size(array5,0)); } @@ -17439,7 +16903,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray6 = obj5; + sparray6 = swig_obj[5]; if ( !( PyObject_HasAttrString(sparray6, "indptr") && PyObject_HasAttrString(sparray6, "indices") && PyObject_HasAttrString(sparray6, "data") && @@ -17498,199 +16962,197 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } { - array7 = obj_to_array_no_conversion(obj6, NPY_INT); + array7 = obj_to_array_no_conversion(swig_obj[6], NPY_INT); if (!array7 || !require_dimensions(array7,1) || !require_contiguous(array7) || !require_native(array7)) SWIG_fail; arg7 = new Vector ((int *)array_data(array7),(int)array_size(array7,0)); } { - array8 = obj_to_array_no_conversion(obj7, NPY_INT); + array8 = obj_to_array_no_conversion(swig_obj[7], NPY_INT); if (!array8 || !require_dimensions(array8,1) || !require_contiguous(array8) || !require_native(array8)) SWIG_fail; arg8 = new Vector ((int *)array_data(array8),(int)array_size(array8,0)); } - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fistaTree" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_int(obj9, &val10); + ecode10 = SWIG_AsVal_int(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fistaTree" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); - ecode11 = SWIG_AsVal_double(obj10, &val11); + ecode11 = SWIG_AsVal_double(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fistaTree" "', argument " "11"" of type '" "double""'"); } arg11 = static_cast< double >(val11); - ecode12 = SWIG_AsVal_bool(obj11, &val12); + ecode12 = SWIG_AsVal_bool(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fistaTree" "', argument " "12"" of type '" "bool""'"); } arg12 = static_cast< bool >(val12); - ecode13 = SWIG_AsVal_double(obj12, &val13); + ecode13 = SWIG_AsVal_double(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fistaTree" "', argument " "13"" of type '" "double""'"); } arg13 = static_cast< double >(val13); - ecode14 = SWIG_AsVal_double(obj13, &val14); + ecode14 = SWIG_AsVal_double(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fistaTree" "', argument " "14"" of type '" "double""'"); } arg14 = static_cast< double >(val14); - ecode15 = SWIG_AsVal_double(obj14, &val15); + ecode15 = SWIG_AsVal_double(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fistaTree" "', argument " "15"" of type '" "double""'"); } arg15 = static_cast< double >(val15); - ecode16 = SWIG_AsVal_double(obj15, &val16); + ecode16 = SWIG_AsVal_double(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fistaTree" "', argument " "16"" of type '" "double""'"); } arg16 = static_cast< double >(val16); - ecode17 = SWIG_AsVal_double(obj16, &val17); + ecode17 = SWIG_AsVal_double(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "fistaTree" "', argument " "17"" of type '" "double""'"); } arg17 = static_cast< double >(val17); - ecode18 = SWIG_AsVal_double(obj17, &val18); + ecode18 = SWIG_AsVal_double(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "fistaTree" "', argument " "18"" of type '" "double""'"); } arg18 = static_cast< double >(val18); - ecode19 = SWIG_AsVal_double(obj18, &val19); + ecode19 = SWIG_AsVal_double(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "fistaTree" "', argument " "19"" of type '" "double""'"); } arg19 = static_cast< double >(val19); - ecode20 = SWIG_AsVal_double(obj19, &val20); + ecode20 = SWIG_AsVal_double(swig_obj[19], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "fistaTree" "', argument " "20"" of type '" "double""'"); } arg20 = static_cast< double >(val20); - ecode21 = SWIG_AsVal_double(obj20, &val21); + ecode21 = SWIG_AsVal_double(swig_obj[20], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "fistaTree" "', argument " "21"" of type '" "double""'"); } arg21 = static_cast< double >(val21); - ecode22 = SWIG_AsVal_int(obj21, &val22); + ecode22 = SWIG_AsVal_int(swig_obj[21], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "fistaTree" "', argument " "22"" of type '" "int""'"); } arg22 = static_cast< int >(val22); - ecode23 = SWIG_AsVal_int(obj22, &val23); + ecode23 = SWIG_AsVal_int(swig_obj[22], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "fistaTree" "', argument " "23"" of type '" "int""'"); } arg23 = static_cast< int >(val23); - ecode24 = SWIG_AsVal_bool(obj23, &val24); + ecode24 = SWIG_AsVal_bool(swig_obj[23], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "fistaTree" "', argument " "24"" of type '" "bool""'"); } arg24 = static_cast< bool >(val24); - ecode25 = SWIG_AsVal_bool(obj24, &val25); + ecode25 = SWIG_AsVal_bool(swig_obj[24], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "fistaTree" "', argument " "25"" of type '" "bool""'"); } arg25 = static_cast< bool >(val25); - ecode26 = SWIG_AsVal_bool(obj25, &val26); + ecode26 = SWIG_AsVal_bool(swig_obj[25], &val26); if (!SWIG_IsOK(ecode26)) { SWIG_exception_fail(SWIG_ArgError(ecode26), "in method '" "fistaTree" "', argument " "26"" of type '" "bool""'"); } arg26 = static_cast< bool >(val26); - ecode27 = SWIG_AsVal_bool(obj26, &val27); + ecode27 = SWIG_AsVal_bool(swig_obj[26], &val27); if (!SWIG_IsOK(ecode27)) { SWIG_exception_fail(SWIG_ArgError(ecode27), "in method '" "fistaTree" "', argument " "27"" of type '" "bool""'"); } arg27 = static_cast< bool >(val27); - ecode28 = SWIG_AsVal_bool(obj27, &val28); + ecode28 = SWIG_AsVal_bool(swig_obj[27], &val28); if (!SWIG_IsOK(ecode28)) { SWIG_exception_fail(SWIG_ArgError(ecode28), "in method '" "fistaTree" "', argument " "28"" of type '" "bool""'"); } arg28 = static_cast< bool >(val28); - res29 = SWIG_AsCharPtrAndSize(obj28, &buf29, NULL, &alloc29); + res29 = SWIG_AsCharPtrAndSize(swig_obj[28], &buf29, NULL, &alloc29); if (!SWIG_IsOK(res29)) { SWIG_exception_fail(SWIG_ArgError(res29), "in method '" "fistaTree" "', argument " "29"" of type '" "char *""'"); } arg29 = reinterpret_cast< char * >(buf29); - res30 = SWIG_AsCharPtrAndSize(obj29, &buf30, NULL, &alloc30); + res30 = SWIG_AsCharPtrAndSize(swig_obj[29], &buf30, NULL, &alloc30); if (!SWIG_IsOK(res30)) { SWIG_exception_fail(SWIG_ArgError(res30), "in method '" "fistaTree" "', argument " "30"" of type '" "char *""'"); } arg30 = reinterpret_cast< char * >(buf30); - ecode31 = SWIG_AsVal_bool(obj30, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[30], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "fistaTree" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_bool(obj31, &val32); + ecode32 = SWIG_AsVal_bool(swig_obj[31], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "fistaTree" "', argument " "32"" of type '" "bool""'"); } arg32 = static_cast< bool >(val32); - ecode33 = SWIG_AsVal_bool(obj32, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[32], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "fistaTree" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - ecode34 = SWIG_AsVal_bool(obj33, &val34); + ecode34 = SWIG_AsVal_bool(swig_obj[33], &val34); if (!SWIG_IsOK(ecode34)) { SWIG_exception_fail(SWIG_ArgError(ecode34), "in method '" "fistaTree" "', argument " "34"" of type '" "bool""'"); } arg34 = static_cast< bool >(val34); - ecode35 = SWIG_AsVal_bool(obj34, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[34], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "fistaTree" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); - ecode36 = SWIG_AsVal_bool(obj35, &val36); + ecode36 = SWIG_AsVal_bool(swig_obj[35], &val36); if (!SWIG_IsOK(ecode36)) { SWIG_exception_fail(SWIG_ArgError(ecode36), "in method '" "fistaTree" "', argument " "36"" of type '" "bool""'"); } arg36 = static_cast< bool >(val36); - res37 = SWIG_AsCharPtrAndSize(obj36, &buf37, NULL, &alloc37); + res37 = SWIG_AsCharPtrAndSize(swig_obj[36], &buf37, NULL, &alloc37); if (!SWIG_IsOK(res37)) { SWIG_exception_fail(SWIG_ArgError(res37), "in method '" "fistaTree" "', argument " "37"" of type '" "char *""'"); } arg37 = reinterpret_cast< char * >(buf37); - ecode38 = SWIG_AsVal_bool(obj37, &val38); + ecode38 = SWIG_AsVal_bool(swig_obj[37], &val38); if (!SWIG_IsOK(ecode38)) { SWIG_exception_fail(SWIG_ArgError(ecode38), "in method '" "fistaTree" "', argument " "38"" of type '" "bool""'"); } arg38 = static_cast< bool >(val38); { - array39 = obj_to_array_no_conversion(obj38, NPY_DOUBLE); + array39 = obj_to_array_no_conversion(swig_obj[38], NPY_DOUBLE); if (!array39 || !require_dimensions(array39,1) || !require_contiguous(array39) || !require_native(array39)) SWIG_fail; arg39 = new Vector ((double *)array_data(array39),(int)array_size(array39,0)); } - ecode40 = SWIG_AsVal_int(obj39, &val40); + ecode40 = SWIG_AsVal_int(swig_obj[39], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "fistaTree" "', argument " "40"" of type '" "int""'"); } arg40 = static_cast< int >(val40); - ecode41 = SWIG_AsVal_bool(obj40, &val41); + ecode41 = SWIG_AsVal_bool(swig_obj[40], &val41); if (!SWIG_IsOK(ecode41)) { SWIG_exception_fail(SWIG_ArgError(ecode41), "in method '" "fistaTree" "', argument " "41"" of type '" "bool""'"); } arg41 = static_cast< bool >(val41); - ecode42 = SWIG_AsVal_bool(obj41, &val42); + ecode42 = SWIG_AsVal_bool(swig_obj[41], &val42); if (!SWIG_IsOK(ecode42)) { SWIG_exception_fail(SWIG_ArgError(ecode42), "in method '" "fistaTree" "', argument " "42"" of type '" "bool""'"); } arg42 = static_cast< bool >(val42); - ecode43 = SWIG_AsVal_int(obj42, &val43); + ecode43 = SWIG_AsVal_int(swig_obj[42], &val43); if (!SWIG_IsOK(ecode43)) { SWIG_exception_fail(SWIG_ArgError(ecode43), "in method '" "fistaTree" "', argument " "43"" of type '" "int""'"); } arg43 = static_cast< int >(val43); try { result = (Matrix< double > *)_fistaTree< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40,arg41,arg42,arg43); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -17775,7 +17237,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO } -SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; AbstractMatrixB< float > *arg2 = (AbstractMatrixB< float > *) 0 ; @@ -17899,55 +17361,13 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO int ecode42 = 0 ; int val43 ; int ecode43 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; - PyObject * obj40 = 0 ; - PyObject * obj41 = 0 ; - PyObject * obj42 = 0 ; Matrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:fistaTree",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39,&obj40,&obj41,&obj42)) SWIG_fail; + (void)self; + if ((nobjs < 43) || (nobjs > 43)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -17981,10 +17401,10 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO >>> type(A.shape) */ - if ( PyObject_HasAttrString(obj1, "indptr")) { - PyObject* sparray =obj1; + if ( PyObject_HasAttrString(swig_obj[1], "indptr")) { + PyObject* sparray =swig_obj[1]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj1; + sparray = swig_obj[1]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -18043,7 +17463,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -18061,7 +17481,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -18078,7 +17498,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array4 = obj_to_array_no_conversion(obj3, NPY_FLOAT); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -18094,7 +17514,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO /*@SWIG@*/ } { - array5 = obj_to_array_no_conversion(obj4, NPY_FLOAT); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_FLOAT); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((float *)array_data(array5),(int)array_size(array5,0)); } @@ -18118,7 +17538,7 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray6 = obj5; + sparray6 = swig_obj[5]; if ( !( PyObject_HasAttrString(sparray6, "indptr") && PyObject_HasAttrString(sparray6, "indices") && PyObject_HasAttrString(sparray6, "data") && @@ -18177,199 +17597,197 @@ SWIGINTERN PyObject *_wrap_fistaTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO } { - array7 = obj_to_array_no_conversion(obj6, NPY_INT); + array7 = obj_to_array_no_conversion(swig_obj[6], NPY_INT); if (!array7 || !require_dimensions(array7,1) || !require_contiguous(array7) || !require_native(array7)) SWIG_fail; arg7 = new Vector ((int *)array_data(array7),(int)array_size(array7,0)); } { - array8 = obj_to_array_no_conversion(obj7, NPY_INT); + array8 = obj_to_array_no_conversion(swig_obj[7], NPY_INT); if (!array8 || !require_dimensions(array8,1) || !require_contiguous(array8) || !require_native(array8)) SWIG_fail; arg8 = new Vector ((int *)array_data(array8),(int)array_size(array8,0)); } - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fistaTree" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_int(obj9, &val10); + ecode10 = SWIG_AsVal_int(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fistaTree" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); - ecode11 = SWIG_AsVal_float(obj10, &val11); + ecode11 = SWIG_AsVal_float(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fistaTree" "', argument " "11"" of type '" "float""'"); } arg11 = static_cast< float >(val11); - ecode12 = SWIG_AsVal_bool(obj11, &val12); + ecode12 = SWIG_AsVal_bool(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fistaTree" "', argument " "12"" of type '" "bool""'"); } arg12 = static_cast< bool >(val12); - ecode13 = SWIG_AsVal_float(obj12, &val13); + ecode13 = SWIG_AsVal_float(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fistaTree" "', argument " "13"" of type '" "float""'"); } arg13 = static_cast< float >(val13); - ecode14 = SWIG_AsVal_float(obj13, &val14); + ecode14 = SWIG_AsVal_float(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fistaTree" "', argument " "14"" of type '" "float""'"); } arg14 = static_cast< float >(val14); - ecode15 = SWIG_AsVal_float(obj14, &val15); + ecode15 = SWIG_AsVal_float(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fistaTree" "', argument " "15"" of type '" "float""'"); } arg15 = static_cast< float >(val15); - ecode16 = SWIG_AsVal_float(obj15, &val16); + ecode16 = SWIG_AsVal_float(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fistaTree" "', argument " "16"" of type '" "float""'"); } arg16 = static_cast< float >(val16); - ecode17 = SWIG_AsVal_float(obj16, &val17); + ecode17 = SWIG_AsVal_float(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "fistaTree" "', argument " "17"" of type '" "float""'"); } arg17 = static_cast< float >(val17); - ecode18 = SWIG_AsVal_float(obj17, &val18); + ecode18 = SWIG_AsVal_float(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "fistaTree" "', argument " "18"" of type '" "float""'"); } arg18 = static_cast< float >(val18); - ecode19 = SWIG_AsVal_float(obj18, &val19); + ecode19 = SWIG_AsVal_float(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "fistaTree" "', argument " "19"" of type '" "float""'"); } arg19 = static_cast< float >(val19); - ecode20 = SWIG_AsVal_float(obj19, &val20); + ecode20 = SWIG_AsVal_float(swig_obj[19], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "fistaTree" "', argument " "20"" of type '" "float""'"); } arg20 = static_cast< float >(val20); - ecode21 = SWIG_AsVal_float(obj20, &val21); + ecode21 = SWIG_AsVal_float(swig_obj[20], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "fistaTree" "', argument " "21"" of type '" "float""'"); } arg21 = static_cast< float >(val21); - ecode22 = SWIG_AsVal_int(obj21, &val22); + ecode22 = SWIG_AsVal_int(swig_obj[21], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "fistaTree" "', argument " "22"" of type '" "int""'"); } arg22 = static_cast< int >(val22); - ecode23 = SWIG_AsVal_int(obj22, &val23); + ecode23 = SWIG_AsVal_int(swig_obj[22], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "fistaTree" "', argument " "23"" of type '" "int""'"); } arg23 = static_cast< int >(val23); - ecode24 = SWIG_AsVal_bool(obj23, &val24); + ecode24 = SWIG_AsVal_bool(swig_obj[23], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "fistaTree" "', argument " "24"" of type '" "bool""'"); } arg24 = static_cast< bool >(val24); - ecode25 = SWIG_AsVal_bool(obj24, &val25); + ecode25 = SWIG_AsVal_bool(swig_obj[24], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "fistaTree" "', argument " "25"" of type '" "bool""'"); } arg25 = static_cast< bool >(val25); - ecode26 = SWIG_AsVal_bool(obj25, &val26); + ecode26 = SWIG_AsVal_bool(swig_obj[25], &val26); if (!SWIG_IsOK(ecode26)) { SWIG_exception_fail(SWIG_ArgError(ecode26), "in method '" "fistaTree" "', argument " "26"" of type '" "bool""'"); } arg26 = static_cast< bool >(val26); - ecode27 = SWIG_AsVal_bool(obj26, &val27); + ecode27 = SWIG_AsVal_bool(swig_obj[26], &val27); if (!SWIG_IsOK(ecode27)) { SWIG_exception_fail(SWIG_ArgError(ecode27), "in method '" "fistaTree" "', argument " "27"" of type '" "bool""'"); } arg27 = static_cast< bool >(val27); - ecode28 = SWIG_AsVal_bool(obj27, &val28); + ecode28 = SWIG_AsVal_bool(swig_obj[27], &val28); if (!SWIG_IsOK(ecode28)) { SWIG_exception_fail(SWIG_ArgError(ecode28), "in method '" "fistaTree" "', argument " "28"" of type '" "bool""'"); } arg28 = static_cast< bool >(val28); - res29 = SWIG_AsCharPtrAndSize(obj28, &buf29, NULL, &alloc29); + res29 = SWIG_AsCharPtrAndSize(swig_obj[28], &buf29, NULL, &alloc29); if (!SWIG_IsOK(res29)) { SWIG_exception_fail(SWIG_ArgError(res29), "in method '" "fistaTree" "', argument " "29"" of type '" "char *""'"); } arg29 = reinterpret_cast< char * >(buf29); - res30 = SWIG_AsCharPtrAndSize(obj29, &buf30, NULL, &alloc30); + res30 = SWIG_AsCharPtrAndSize(swig_obj[29], &buf30, NULL, &alloc30); if (!SWIG_IsOK(res30)) { SWIG_exception_fail(SWIG_ArgError(res30), "in method '" "fistaTree" "', argument " "30"" of type '" "char *""'"); } arg30 = reinterpret_cast< char * >(buf30); - ecode31 = SWIG_AsVal_bool(obj30, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[30], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "fistaTree" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_bool(obj31, &val32); + ecode32 = SWIG_AsVal_bool(swig_obj[31], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "fistaTree" "', argument " "32"" of type '" "bool""'"); } arg32 = static_cast< bool >(val32); - ecode33 = SWIG_AsVal_bool(obj32, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[32], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "fistaTree" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - ecode34 = SWIG_AsVal_bool(obj33, &val34); + ecode34 = SWIG_AsVal_bool(swig_obj[33], &val34); if (!SWIG_IsOK(ecode34)) { SWIG_exception_fail(SWIG_ArgError(ecode34), "in method '" "fistaTree" "', argument " "34"" of type '" "bool""'"); } arg34 = static_cast< bool >(val34); - ecode35 = SWIG_AsVal_bool(obj34, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[34], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "fistaTree" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); - ecode36 = SWIG_AsVal_bool(obj35, &val36); + ecode36 = SWIG_AsVal_bool(swig_obj[35], &val36); if (!SWIG_IsOK(ecode36)) { SWIG_exception_fail(SWIG_ArgError(ecode36), "in method '" "fistaTree" "', argument " "36"" of type '" "bool""'"); } arg36 = static_cast< bool >(val36); - res37 = SWIG_AsCharPtrAndSize(obj36, &buf37, NULL, &alloc37); + res37 = SWIG_AsCharPtrAndSize(swig_obj[36], &buf37, NULL, &alloc37); if (!SWIG_IsOK(res37)) { SWIG_exception_fail(SWIG_ArgError(res37), "in method '" "fistaTree" "', argument " "37"" of type '" "char *""'"); } arg37 = reinterpret_cast< char * >(buf37); - ecode38 = SWIG_AsVal_bool(obj37, &val38); + ecode38 = SWIG_AsVal_bool(swig_obj[37], &val38); if (!SWIG_IsOK(ecode38)) { SWIG_exception_fail(SWIG_ArgError(ecode38), "in method '" "fistaTree" "', argument " "38"" of type '" "bool""'"); } arg38 = static_cast< bool >(val38); { - array39 = obj_to_array_no_conversion(obj38, NPY_FLOAT); + array39 = obj_to_array_no_conversion(swig_obj[38], NPY_FLOAT); if (!array39 || !require_dimensions(array39,1) || !require_contiguous(array39) || !require_native(array39)) SWIG_fail; arg39 = new Vector ((float *)array_data(array39),(int)array_size(array39,0)); } - ecode40 = SWIG_AsVal_int(obj39, &val40); + ecode40 = SWIG_AsVal_int(swig_obj[39], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "fistaTree" "', argument " "40"" of type '" "int""'"); } arg40 = static_cast< int >(val40); - ecode41 = SWIG_AsVal_bool(obj40, &val41); + ecode41 = SWIG_AsVal_bool(swig_obj[40], &val41); if (!SWIG_IsOK(ecode41)) { SWIG_exception_fail(SWIG_ArgError(ecode41), "in method '" "fistaTree" "', argument " "41"" of type '" "bool""'"); } arg41 = static_cast< bool >(val41); - ecode42 = SWIG_AsVal_bool(obj41, &val42); + ecode42 = SWIG_AsVal_bool(swig_obj[41], &val42); if (!SWIG_IsOK(ecode42)) { SWIG_exception_fail(SWIG_ArgError(ecode42), "in method '" "fistaTree" "', argument " "42"" of type '" "bool""'"); } arg42 = static_cast< bool >(val42); - ecode43 = SWIG_AsVal_int(obj42, &val43); + ecode43 = SWIG_AsVal_int(swig_obj[42], &val43); if (!SWIG_IsOK(ecode43)) { SWIG_exception_fail(SWIG_ArgError(ecode43), "in method '" "fistaTree" "', argument " "43"" of type '" "int""'"); } arg43 = static_cast< int >(val43); try { result = (Matrix< float > *)_fistaTree< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40,arg41,arg42,arg43); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -18459,15 +17877,11 @@ SWIGINTERN PyObject *_wrap_fistaTree(PyObject *self, PyObject *args) { PyObject *argv[44] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 43) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "fistaTree", 0, 43, argv))) SWIG_fail; + --argc; if (argc == 43) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -18692,7 +18106,7 @@ SWIGINTERN PyObject *_wrap_fistaTree(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_fistaTree__SWIG_1(self, args); + return _wrap_fistaTree__SWIG_1(self, argc, argv); } } } @@ -18738,7 +18152,7 @@ SWIGINTERN PyObject *_wrap_fistaTree(PyObject *self, PyObject *args) { } } if (argc == 43) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -18963,7 +18377,7 @@ SWIGINTERN PyObject *_wrap_fistaTree(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_fistaTree__SWIG_0(self, args); + return _wrap_fistaTree__SWIG_0(self, argc, argv); } } } @@ -19010,7 +18424,7 @@ SWIGINTERN PyObject *_wrap_fistaTree(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'fistaTree'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fistaTree'.\n" " Possible C/C++ prototypes are:\n" " _fistaTree< double >(Matrix< double > *,AbstractMatrixB< double > *,Matrix< double > *,Matrix< double > *,Vector< double > *,SpMatrix< bool > *,Vector< int > *,Vector< int > *,int,int,double,bool,double,double,double,double,double,double,double,double,double,int,int,bool,bool,bool,bool,bool,char *,char *,bool,bool,bool,bool,bool,bool,char *,bool,Vector< double > *,int,bool,bool,int)\n" " _fistaTree< float >(Matrix< float > *,AbstractMatrixB< float > *,Matrix< float > *,Matrix< float > *,Vector< float > *,SpMatrix< bool > *,Vector< int > *,Vector< int > *,int,int,float,bool,float,float,float,float,float,float,float,float,float,int,int,bool,bool,bool,bool,bool,char *,char *,bool,bool,bool,bool,bool,bool,char *,bool,Vector< float > *,int,bool,bool,int)\n"); @@ -19018,7 +18432,7 @@ SWIGINTERN PyObject *_wrap_fistaTree(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; AbstractMatrixB< double > *arg2 = (AbstractMatrixB< double > *) 0 ; @@ -19140,54 +18554,13 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py int ecode41 = 0 ; int val42 ; int ecode42 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; - PyObject * obj40 = 0 ; - PyObject * obj41 = 0 ; Matrix< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:fistaGraph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39,&obj40,&obj41)) SWIG_fail; + (void)self; + if ((nobjs < 42) || (nobjs > 42)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -19221,10 +18594,10 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py >>> type(A.shape) */ - if ( PyObject_HasAttrString(obj1, "indptr")) { - PyObject* sparray =obj1; + if ( PyObject_HasAttrString(swig_obj[1], "indptr")) { + PyObject* sparray =swig_obj[1]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj1; + sparray = swig_obj[1]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -19283,7 +18656,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -19301,7 +18674,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -19318,7 +18691,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array4 = obj_to_array_no_conversion(obj3, NPY_DOUBLE); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -19334,7 +18707,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } { - array5 = obj_to_array_no_conversion(obj4, NPY_DOUBLE); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_DOUBLE); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((double *)array_data(array5),(int)array_size(array5,0)); } @@ -19358,7 +18731,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray6 = obj5; + sparray6 = swig_obj[5]; if ( !( PyObject_HasAttrString(sparray6, "indptr") && PyObject_HasAttrString(sparray6, "indices") && PyObject_HasAttrString(sparray6, "data") && @@ -19436,7 +18809,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray7 = obj6; + sparray7 = swig_obj[6]; if ( !( PyObject_HasAttrString(sparray7, "indptr") && PyObject_HasAttrString(sparray7, "indices") && PyObject_HasAttrString(sparray7, "data") && @@ -19494,190 +18867,188 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } - ecode8 = SWIG_AsVal_int(obj7, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fistaGraph" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fistaGraph" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_double(obj9, &val10); + ecode10 = SWIG_AsVal_double(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fistaGraph" "', argument " "10"" of type '" "double""'"); } arg10 = static_cast< double >(val10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fistaGraph" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_double(obj11, &val12); + ecode12 = SWIG_AsVal_double(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fistaGraph" "', argument " "12"" of type '" "double""'"); } arg12 = static_cast< double >(val12); - ecode13 = SWIG_AsVal_double(obj12, &val13); + ecode13 = SWIG_AsVal_double(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fistaGraph" "', argument " "13"" of type '" "double""'"); } arg13 = static_cast< double >(val13); - ecode14 = SWIG_AsVal_double(obj13, &val14); + ecode14 = SWIG_AsVal_double(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fistaGraph" "', argument " "14"" of type '" "double""'"); } arg14 = static_cast< double >(val14); - ecode15 = SWIG_AsVal_double(obj14, &val15); + ecode15 = SWIG_AsVal_double(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fistaGraph" "', argument " "15"" of type '" "double""'"); } arg15 = static_cast< double >(val15); - ecode16 = SWIG_AsVal_double(obj15, &val16); + ecode16 = SWIG_AsVal_double(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fistaGraph" "', argument " "16"" of type '" "double""'"); } arg16 = static_cast< double >(val16); - ecode17 = SWIG_AsVal_double(obj16, &val17); + ecode17 = SWIG_AsVal_double(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "fistaGraph" "', argument " "17"" of type '" "double""'"); } arg17 = static_cast< double >(val17); - ecode18 = SWIG_AsVal_double(obj17, &val18); + ecode18 = SWIG_AsVal_double(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "fistaGraph" "', argument " "18"" of type '" "double""'"); } arg18 = static_cast< double >(val18); - ecode19 = SWIG_AsVal_double(obj18, &val19); + ecode19 = SWIG_AsVal_double(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "fistaGraph" "', argument " "19"" of type '" "double""'"); } arg19 = static_cast< double >(val19); - ecode20 = SWIG_AsVal_double(obj19, &val20); + ecode20 = SWIG_AsVal_double(swig_obj[19], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "fistaGraph" "', argument " "20"" of type '" "double""'"); } arg20 = static_cast< double >(val20); - ecode21 = SWIG_AsVal_int(obj20, &val21); + ecode21 = SWIG_AsVal_int(swig_obj[20], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "fistaGraph" "', argument " "21"" of type '" "int""'"); } arg21 = static_cast< int >(val21); - ecode22 = SWIG_AsVal_int(obj21, &val22); + ecode22 = SWIG_AsVal_int(swig_obj[21], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "fistaGraph" "', argument " "22"" of type '" "int""'"); } arg22 = static_cast< int >(val22); - ecode23 = SWIG_AsVal_bool(obj22, &val23); + ecode23 = SWIG_AsVal_bool(swig_obj[22], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "fistaGraph" "', argument " "23"" of type '" "bool""'"); } arg23 = static_cast< bool >(val23); - ecode24 = SWIG_AsVal_bool(obj23, &val24); + ecode24 = SWIG_AsVal_bool(swig_obj[23], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "fistaGraph" "', argument " "24"" of type '" "bool""'"); } arg24 = static_cast< bool >(val24); - ecode25 = SWIG_AsVal_bool(obj24, &val25); + ecode25 = SWIG_AsVal_bool(swig_obj[24], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "fistaGraph" "', argument " "25"" of type '" "bool""'"); } arg25 = static_cast< bool >(val25); - ecode26 = SWIG_AsVal_bool(obj25, &val26); + ecode26 = SWIG_AsVal_bool(swig_obj[25], &val26); if (!SWIG_IsOK(ecode26)) { SWIG_exception_fail(SWIG_ArgError(ecode26), "in method '" "fistaGraph" "', argument " "26"" of type '" "bool""'"); } arg26 = static_cast< bool >(val26); - ecode27 = SWIG_AsVal_bool(obj26, &val27); + ecode27 = SWIG_AsVal_bool(swig_obj[26], &val27); if (!SWIG_IsOK(ecode27)) { SWIG_exception_fail(SWIG_ArgError(ecode27), "in method '" "fistaGraph" "', argument " "27"" of type '" "bool""'"); } arg27 = static_cast< bool >(val27); - res28 = SWIG_AsCharPtrAndSize(obj27, &buf28, NULL, &alloc28); + res28 = SWIG_AsCharPtrAndSize(swig_obj[27], &buf28, NULL, &alloc28); if (!SWIG_IsOK(res28)) { SWIG_exception_fail(SWIG_ArgError(res28), "in method '" "fistaGraph" "', argument " "28"" of type '" "char *""'"); } arg28 = reinterpret_cast< char * >(buf28); - res29 = SWIG_AsCharPtrAndSize(obj28, &buf29, NULL, &alloc29); + res29 = SWIG_AsCharPtrAndSize(swig_obj[28], &buf29, NULL, &alloc29); if (!SWIG_IsOK(res29)) { SWIG_exception_fail(SWIG_ArgError(res29), "in method '" "fistaGraph" "', argument " "29"" of type '" "char *""'"); } arg29 = reinterpret_cast< char * >(buf29); - ecode30 = SWIG_AsVal_bool(obj29, &val30); + ecode30 = SWIG_AsVal_bool(swig_obj[29], &val30); if (!SWIG_IsOK(ecode30)) { SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "fistaGraph" "', argument " "30"" of type '" "bool""'"); } arg30 = static_cast< bool >(val30); - ecode31 = SWIG_AsVal_bool(obj30, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[30], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "fistaGraph" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_bool(obj31, &val32); + ecode32 = SWIG_AsVal_bool(swig_obj[31], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "fistaGraph" "', argument " "32"" of type '" "bool""'"); } arg32 = static_cast< bool >(val32); - ecode33 = SWIG_AsVal_bool(obj32, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[32], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "fistaGraph" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - ecode34 = SWIG_AsVal_bool(obj33, &val34); + ecode34 = SWIG_AsVal_bool(swig_obj[33], &val34); if (!SWIG_IsOK(ecode34)) { SWIG_exception_fail(SWIG_ArgError(ecode34), "in method '" "fistaGraph" "', argument " "34"" of type '" "bool""'"); } arg34 = static_cast< bool >(val34); - ecode35 = SWIG_AsVal_bool(obj34, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[34], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "fistaGraph" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); - res36 = SWIG_AsCharPtrAndSize(obj35, &buf36, NULL, &alloc36); + res36 = SWIG_AsCharPtrAndSize(swig_obj[35], &buf36, NULL, &alloc36); if (!SWIG_IsOK(res36)) { SWIG_exception_fail(SWIG_ArgError(res36), "in method '" "fistaGraph" "', argument " "36"" of type '" "char *""'"); } arg36 = reinterpret_cast< char * >(buf36); - ecode37 = SWIG_AsVal_bool(obj36, &val37); + ecode37 = SWIG_AsVal_bool(swig_obj[36], &val37); if (!SWIG_IsOK(ecode37)) { SWIG_exception_fail(SWIG_ArgError(ecode37), "in method '" "fistaGraph" "', argument " "37"" of type '" "bool""'"); } arg37 = static_cast< bool >(val37); { - array38 = obj_to_array_no_conversion(obj37, NPY_DOUBLE); + array38 = obj_to_array_no_conversion(swig_obj[37], NPY_DOUBLE); if (!array38 || !require_dimensions(array38,1) || !require_contiguous(array38) || !require_native(array38)) SWIG_fail; arg38 = new Vector ((double *)array_data(array38),(int)array_size(array38,0)); } - ecode39 = SWIG_AsVal_int(obj38, &val39); + ecode39 = SWIG_AsVal_int(swig_obj[38], &val39); if (!SWIG_IsOK(ecode39)) { SWIG_exception_fail(SWIG_ArgError(ecode39), "in method '" "fistaGraph" "', argument " "39"" of type '" "int""'"); } arg39 = static_cast< int >(val39); - ecode40 = SWIG_AsVal_bool(obj39, &val40); + ecode40 = SWIG_AsVal_bool(swig_obj[39], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "fistaGraph" "', argument " "40"" of type '" "bool""'"); } arg40 = static_cast< bool >(val40); - ecode41 = SWIG_AsVal_bool(obj40, &val41); + ecode41 = SWIG_AsVal_bool(swig_obj[40], &val41); if (!SWIG_IsOK(ecode41)) { SWIG_exception_fail(SWIG_ArgError(ecode41), "in method '" "fistaGraph" "', argument " "41"" of type '" "bool""'"); } arg41 = static_cast< bool >(val41); - ecode42 = SWIG_AsVal_int(obj41, &val42); + ecode42 = SWIG_AsVal_int(swig_obj[41], &val42); if (!SWIG_IsOK(ecode42)) { SWIG_exception_fail(SWIG_ArgError(ecode42), "in method '" "fistaGraph" "', argument " "42"" of type '" "int""'"); } arg42 = static_cast< int >(val42); try { result = (Matrix< double > *)_fistaGraph< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40,arg41,arg42); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -19756,7 +19127,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py } -SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; AbstractMatrixB< float > *arg2 = (AbstractMatrixB< float > *) 0 ; @@ -19878,54 +19249,13 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py int ecode41 = 0 ; int val42 ; int ecode42 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; - PyObject * obj19 = 0 ; - PyObject * obj20 = 0 ; - PyObject * obj21 = 0 ; - PyObject * obj22 = 0 ; - PyObject * obj23 = 0 ; - PyObject * obj24 = 0 ; - PyObject * obj25 = 0 ; - PyObject * obj26 = 0 ; - PyObject * obj27 = 0 ; - PyObject * obj28 = 0 ; - PyObject * obj29 = 0 ; - PyObject * obj30 = 0 ; - PyObject * obj31 = 0 ; - PyObject * obj32 = 0 ; - PyObject * obj33 = 0 ; - PyObject * obj34 = 0 ; - PyObject * obj35 = 0 ; - PyObject * obj36 = 0 ; - PyObject * obj37 = 0 ; - PyObject * obj38 = 0 ; - PyObject * obj39 = 0 ; - PyObject * obj40 = 0 ; - PyObject * obj41 = 0 ; Matrix< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:fistaGraph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18,&obj19,&obj20,&obj21,&obj22,&obj23,&obj24,&obj25,&obj26,&obj27,&obj28,&obj29,&obj30,&obj31,&obj32,&obj33,&obj34,&obj35,&obj36,&obj37,&obj38,&obj39,&obj40,&obj41)) SWIG_fail; + (void)self; + if ((nobjs < 42) || (nobjs > 42)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -19959,10 +19289,10 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py >>> type(A.shape) */ - if ( PyObject_HasAttrString(obj1, "indptr")) { - PyObject* sparray =obj1; + if ( PyObject_HasAttrString(swig_obj[1], "indptr")) { + PyObject* sparray =swig_obj[1]; /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray = obj1; + sparray = swig_obj[1]; if ( !( PyObject_HasAttrString(sparray, "indptr") && PyObject_HasAttrString(sparray, "indices") && PyObject_HasAttrString(sparray, "data") && @@ -20021,7 +19351,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py } else { PyArrayObject* array = NULL; /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -20039,7 +19369,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -20056,7 +19386,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array4 = obj_to_array_no_conversion(obj3, NPY_FLOAT); + array4 = obj_to_array_no_conversion(swig_obj[3], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -20072,7 +19402,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } { - array5 = obj_to_array_no_conversion(obj4, NPY_FLOAT); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_FLOAT); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((float *)array_data(array5),(int)array_size(array5,0)); } @@ -20096,7 +19426,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray6 = obj5; + sparray6 = swig_obj[5]; if ( !( PyObject_HasAttrString(sparray6, "indptr") && PyObject_HasAttrString(sparray6, "indices") && PyObject_HasAttrString(sparray6, "data") && @@ -20174,7 +19504,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray7 = obj6; + sparray7 = swig_obj[6]; if ( !( PyObject_HasAttrString(sparray7, "indptr") && PyObject_HasAttrString(sparray7, "indices") && PyObject_HasAttrString(sparray7, "data") && @@ -20232,190 +19562,188 @@ SWIGINTERN PyObject *_wrap_fistaGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py /*@SWIG@*/ } - ecode8 = SWIG_AsVal_int(obj7, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fistaGraph" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fistaGraph" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); - ecode10 = SWIG_AsVal_float(obj9, &val10); + ecode10 = SWIG_AsVal_float(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fistaGraph" "', argument " "10"" of type '" "float""'"); } arg10 = static_cast< float >(val10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fistaGraph" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_float(obj11, &val12); + ecode12 = SWIG_AsVal_float(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fistaGraph" "', argument " "12"" of type '" "float""'"); } arg12 = static_cast< float >(val12); - ecode13 = SWIG_AsVal_float(obj12, &val13); + ecode13 = SWIG_AsVal_float(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fistaGraph" "', argument " "13"" of type '" "float""'"); } arg13 = static_cast< float >(val13); - ecode14 = SWIG_AsVal_float(obj13, &val14); + ecode14 = SWIG_AsVal_float(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fistaGraph" "', argument " "14"" of type '" "float""'"); } arg14 = static_cast< float >(val14); - ecode15 = SWIG_AsVal_float(obj14, &val15); + ecode15 = SWIG_AsVal_float(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fistaGraph" "', argument " "15"" of type '" "float""'"); } arg15 = static_cast< float >(val15); - ecode16 = SWIG_AsVal_float(obj15, &val16); + ecode16 = SWIG_AsVal_float(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fistaGraph" "', argument " "16"" of type '" "float""'"); } arg16 = static_cast< float >(val16); - ecode17 = SWIG_AsVal_float(obj16, &val17); + ecode17 = SWIG_AsVal_float(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "fistaGraph" "', argument " "17"" of type '" "float""'"); } arg17 = static_cast< float >(val17); - ecode18 = SWIG_AsVal_float(obj17, &val18); + ecode18 = SWIG_AsVal_float(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "fistaGraph" "', argument " "18"" of type '" "float""'"); } arg18 = static_cast< float >(val18); - ecode19 = SWIG_AsVal_float(obj18, &val19); + ecode19 = SWIG_AsVal_float(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "fistaGraph" "', argument " "19"" of type '" "float""'"); } arg19 = static_cast< float >(val19); - ecode20 = SWIG_AsVal_float(obj19, &val20); + ecode20 = SWIG_AsVal_float(swig_obj[19], &val20); if (!SWIG_IsOK(ecode20)) { SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "fistaGraph" "', argument " "20"" of type '" "float""'"); } arg20 = static_cast< float >(val20); - ecode21 = SWIG_AsVal_int(obj20, &val21); + ecode21 = SWIG_AsVal_int(swig_obj[20], &val21); if (!SWIG_IsOK(ecode21)) { SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "fistaGraph" "', argument " "21"" of type '" "int""'"); } arg21 = static_cast< int >(val21); - ecode22 = SWIG_AsVal_int(obj21, &val22); + ecode22 = SWIG_AsVal_int(swig_obj[21], &val22); if (!SWIG_IsOK(ecode22)) { SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "fistaGraph" "', argument " "22"" of type '" "int""'"); } arg22 = static_cast< int >(val22); - ecode23 = SWIG_AsVal_bool(obj22, &val23); + ecode23 = SWIG_AsVal_bool(swig_obj[22], &val23); if (!SWIG_IsOK(ecode23)) { SWIG_exception_fail(SWIG_ArgError(ecode23), "in method '" "fistaGraph" "', argument " "23"" of type '" "bool""'"); } arg23 = static_cast< bool >(val23); - ecode24 = SWIG_AsVal_bool(obj23, &val24); + ecode24 = SWIG_AsVal_bool(swig_obj[23], &val24); if (!SWIG_IsOK(ecode24)) { SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "fistaGraph" "', argument " "24"" of type '" "bool""'"); } arg24 = static_cast< bool >(val24); - ecode25 = SWIG_AsVal_bool(obj24, &val25); + ecode25 = SWIG_AsVal_bool(swig_obj[24], &val25); if (!SWIG_IsOK(ecode25)) { SWIG_exception_fail(SWIG_ArgError(ecode25), "in method '" "fistaGraph" "', argument " "25"" of type '" "bool""'"); } arg25 = static_cast< bool >(val25); - ecode26 = SWIG_AsVal_bool(obj25, &val26); + ecode26 = SWIG_AsVal_bool(swig_obj[25], &val26); if (!SWIG_IsOK(ecode26)) { SWIG_exception_fail(SWIG_ArgError(ecode26), "in method '" "fistaGraph" "', argument " "26"" of type '" "bool""'"); } arg26 = static_cast< bool >(val26); - ecode27 = SWIG_AsVal_bool(obj26, &val27); + ecode27 = SWIG_AsVal_bool(swig_obj[26], &val27); if (!SWIG_IsOK(ecode27)) { SWIG_exception_fail(SWIG_ArgError(ecode27), "in method '" "fistaGraph" "', argument " "27"" of type '" "bool""'"); } arg27 = static_cast< bool >(val27); - res28 = SWIG_AsCharPtrAndSize(obj27, &buf28, NULL, &alloc28); + res28 = SWIG_AsCharPtrAndSize(swig_obj[27], &buf28, NULL, &alloc28); if (!SWIG_IsOK(res28)) { SWIG_exception_fail(SWIG_ArgError(res28), "in method '" "fistaGraph" "', argument " "28"" of type '" "char *""'"); } arg28 = reinterpret_cast< char * >(buf28); - res29 = SWIG_AsCharPtrAndSize(obj28, &buf29, NULL, &alloc29); + res29 = SWIG_AsCharPtrAndSize(swig_obj[28], &buf29, NULL, &alloc29); if (!SWIG_IsOK(res29)) { SWIG_exception_fail(SWIG_ArgError(res29), "in method '" "fistaGraph" "', argument " "29"" of type '" "char *""'"); } arg29 = reinterpret_cast< char * >(buf29); - ecode30 = SWIG_AsVal_bool(obj29, &val30); + ecode30 = SWIG_AsVal_bool(swig_obj[29], &val30); if (!SWIG_IsOK(ecode30)) { SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "fistaGraph" "', argument " "30"" of type '" "bool""'"); } arg30 = static_cast< bool >(val30); - ecode31 = SWIG_AsVal_bool(obj30, &val31); + ecode31 = SWIG_AsVal_bool(swig_obj[30], &val31); if (!SWIG_IsOK(ecode31)) { SWIG_exception_fail(SWIG_ArgError(ecode31), "in method '" "fistaGraph" "', argument " "31"" of type '" "bool""'"); } arg31 = static_cast< bool >(val31); - ecode32 = SWIG_AsVal_bool(obj31, &val32); + ecode32 = SWIG_AsVal_bool(swig_obj[31], &val32); if (!SWIG_IsOK(ecode32)) { SWIG_exception_fail(SWIG_ArgError(ecode32), "in method '" "fistaGraph" "', argument " "32"" of type '" "bool""'"); } arg32 = static_cast< bool >(val32); - ecode33 = SWIG_AsVal_bool(obj32, &val33); + ecode33 = SWIG_AsVal_bool(swig_obj[32], &val33); if (!SWIG_IsOK(ecode33)) { SWIG_exception_fail(SWIG_ArgError(ecode33), "in method '" "fistaGraph" "', argument " "33"" of type '" "bool""'"); } arg33 = static_cast< bool >(val33); - ecode34 = SWIG_AsVal_bool(obj33, &val34); + ecode34 = SWIG_AsVal_bool(swig_obj[33], &val34); if (!SWIG_IsOK(ecode34)) { SWIG_exception_fail(SWIG_ArgError(ecode34), "in method '" "fistaGraph" "', argument " "34"" of type '" "bool""'"); } arg34 = static_cast< bool >(val34); - ecode35 = SWIG_AsVal_bool(obj34, &val35); + ecode35 = SWIG_AsVal_bool(swig_obj[34], &val35); if (!SWIG_IsOK(ecode35)) { SWIG_exception_fail(SWIG_ArgError(ecode35), "in method '" "fistaGraph" "', argument " "35"" of type '" "bool""'"); } arg35 = static_cast< bool >(val35); - res36 = SWIG_AsCharPtrAndSize(obj35, &buf36, NULL, &alloc36); + res36 = SWIG_AsCharPtrAndSize(swig_obj[35], &buf36, NULL, &alloc36); if (!SWIG_IsOK(res36)) { SWIG_exception_fail(SWIG_ArgError(res36), "in method '" "fistaGraph" "', argument " "36"" of type '" "char *""'"); } arg36 = reinterpret_cast< char * >(buf36); - ecode37 = SWIG_AsVal_bool(obj36, &val37); + ecode37 = SWIG_AsVal_bool(swig_obj[36], &val37); if (!SWIG_IsOK(ecode37)) { SWIG_exception_fail(SWIG_ArgError(ecode37), "in method '" "fistaGraph" "', argument " "37"" of type '" "bool""'"); } arg37 = static_cast< bool >(val37); { - array38 = obj_to_array_no_conversion(obj37, NPY_FLOAT); + array38 = obj_to_array_no_conversion(swig_obj[37], NPY_FLOAT); if (!array38 || !require_dimensions(array38,1) || !require_contiguous(array38) || !require_native(array38)) SWIG_fail; arg38 = new Vector ((float *)array_data(array38),(int)array_size(array38,0)); } - ecode39 = SWIG_AsVal_int(obj38, &val39); + ecode39 = SWIG_AsVal_int(swig_obj[38], &val39); if (!SWIG_IsOK(ecode39)) { SWIG_exception_fail(SWIG_ArgError(ecode39), "in method '" "fistaGraph" "', argument " "39"" of type '" "int""'"); } arg39 = static_cast< int >(val39); - ecode40 = SWIG_AsVal_bool(obj39, &val40); + ecode40 = SWIG_AsVal_bool(swig_obj[39], &val40); if (!SWIG_IsOK(ecode40)) { SWIG_exception_fail(SWIG_ArgError(ecode40), "in method '" "fistaGraph" "', argument " "40"" of type '" "bool""'"); } arg40 = static_cast< bool >(val40); - ecode41 = SWIG_AsVal_bool(obj40, &val41); + ecode41 = SWIG_AsVal_bool(swig_obj[40], &val41); if (!SWIG_IsOK(ecode41)) { SWIG_exception_fail(SWIG_ArgError(ecode41), "in method '" "fistaGraph" "', argument " "41"" of type '" "bool""'"); } arg41 = static_cast< bool >(val41); - ecode42 = SWIG_AsVal_int(obj41, &val42); + ecode42 = SWIG_AsVal_int(swig_obj[41], &val42); if (!SWIG_IsOK(ecode42)) { SWIG_exception_fail(SWIG_ArgError(ecode42), "in method '" "fistaGraph" "', argument " "42"" of type '" "int""'"); } arg42 = static_cast< int >(val42); try { result = (Matrix< float > *)_fistaGraph< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36,arg37,arg38,arg39,arg40,arg41,arg42); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp m = result->m(); npy_intp n = result->n(); @@ -20499,15 +19827,11 @@ SWIGINTERN PyObject *_wrap_fistaGraph(PyObject *self, PyObject *args) { PyObject *argv[43] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 42) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "fistaGraph", 0, 42, argv))) SWIG_fail; + --argc; if (argc == 42) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -20733,7 +20057,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_fistaGraph__SWIG_1(self, args); + return _wrap_fistaGraph__SWIG_1(self, argc, argv); } } } @@ -20778,7 +20102,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph(PyObject *self, PyObject *args) { } } if (argc == 42) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -21004,7 +20328,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_fistaGraph__SWIG_0(self, args); + return _wrap_fistaGraph__SWIG_0(self, argc, argv); } } } @@ -21050,7 +20374,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'fistaGraph'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fistaGraph'.\n" " Possible C/C++ prototypes are:\n" " _fistaGraph< double >(Matrix< double > *,AbstractMatrixB< double > *,Matrix< double > *,Matrix< double > *,Vector< double > *,SpMatrix< bool > *,SpMatrix< bool > *,int,int,double,bool,double,double,double,double,double,double,double,double,double,int,int,bool,bool,bool,bool,bool,char *,char *,bool,bool,bool,bool,bool,bool,char *,bool,Vector< double > *,int,bool,bool,int)\n" " _fistaGraph< float >(Matrix< float > *,AbstractMatrixB< float > *,Matrix< float > *,Matrix< float > *,Vector< float > *,SpMatrix< bool > *,SpMatrix< bool > *,int,int,float,bool,float,float,float,float,float,float,float,float,float,int,int,bool,bool,bool,bool,bool,char *,char *,bool,bool,bool,bool,bool,bool,char *,bool,Vector< float > *,int,bool,bool,int)\n"); @@ -21058,7 +20382,7 @@ SWIGINTERN PyObject *_wrap_fistaGraph(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -21106,28 +20430,13 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int ecode15 = 0 ; bool val16 ; int ecode16 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; Vector< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOO:proximalFlat",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15)) SWIG_fail; + (void)self; + if ((nobjs < 16) || (nobjs > 16)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -21144,7 +20453,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -21160,84 +20469,82 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_INT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_INT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((int *)array_data(array3),(int)array_size(array3,0)); } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "proximalFlat" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "proximalFlat" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "proximalFlat" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "proximalFlat" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); - ecode8 = SWIG_AsVal_bool(obj7, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "proximalFlat" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); - ecode9 = SWIG_AsVal_bool(obj8, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "proximalFlat" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); - res10 = SWIG_AsCharPtrAndSize(obj9, &buf10, NULL, &alloc10); + res10 = SWIG_AsCharPtrAndSize(swig_obj[9], &buf10, NULL, &alloc10); if (!SWIG_IsOK(res10)) { SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "proximalFlat" "', argument " "10"" of type '" "char *""'"); } arg10 = reinterpret_cast< char * >(buf10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "proximalFlat" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_bool(obj11, &val12); + ecode12 = SWIG_AsVal_bool(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "proximalFlat" "', argument " "12"" of type '" "bool""'"); } arg12 = static_cast< bool >(val12); - ecode13 = SWIG_AsVal_bool(obj12, &val13); + ecode13 = SWIG_AsVal_bool(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "proximalFlat" "', argument " "13"" of type '" "bool""'"); } arg13 = static_cast< bool >(val13); - ecode14 = SWIG_AsVal_bool(obj13, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "proximalFlat" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_int(obj14, &val15); + ecode15 = SWIG_AsVal_int(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "proximalFlat" "', argument " "15"" of type '" "int""'"); } arg15 = static_cast< int >(val15); - ecode16 = SWIG_AsVal_bool(obj15, &val16); + ecode16 = SWIG_AsVal_bool(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "proximalFlat" "', argument " "16"" of type '" "bool""'"); } arg16 = static_cast< bool >(val16); try { result = (Vector< double > *)_proximalFlat< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -21277,7 +20584,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -21325,28 +20632,13 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int ecode15 = 0 ; bool val16 ; int ecode16 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; Vector< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOO:proximalFlat",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15)) SWIG_fail; + (void)self; + if ((nobjs < 16) || (nobjs > 16)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -21363,7 +20655,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -21379,84 +20671,82 @@ SWIGINTERN PyObject *_wrap_proximalFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_INT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_INT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((int *)array_data(array3),(int)array_size(array3,0)); } - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "proximalFlat" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_float(obj4, &val5); + ecode5 = SWIG_AsVal_float(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "proximalFlat" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); - ecode6 = SWIG_AsVal_float(obj5, &val6); + ecode6 = SWIG_AsVal_float(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "proximalFlat" "', argument " "6"" of type '" "float""'"); } arg6 = static_cast< float >(val6); - ecode7 = SWIG_AsVal_float(obj6, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "proximalFlat" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); - ecode8 = SWIG_AsVal_bool(obj7, &val8); + ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "proximalFlat" "', argument " "8"" of type '" "bool""'"); } arg8 = static_cast< bool >(val8); - ecode9 = SWIG_AsVal_bool(obj8, &val9); + ecode9 = SWIG_AsVal_bool(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "proximalFlat" "', argument " "9"" of type '" "bool""'"); } arg9 = static_cast< bool >(val9); - res10 = SWIG_AsCharPtrAndSize(obj9, &buf10, NULL, &alloc10); + res10 = SWIG_AsCharPtrAndSize(swig_obj[9], &buf10, NULL, &alloc10); if (!SWIG_IsOK(res10)) { SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "proximalFlat" "', argument " "10"" of type '" "char *""'"); } arg10 = reinterpret_cast< char * >(buf10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "proximalFlat" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_bool(obj11, &val12); + ecode12 = SWIG_AsVal_bool(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "proximalFlat" "', argument " "12"" of type '" "bool""'"); } arg12 = static_cast< bool >(val12); - ecode13 = SWIG_AsVal_bool(obj12, &val13); + ecode13 = SWIG_AsVal_bool(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "proximalFlat" "', argument " "13"" of type '" "bool""'"); } arg13 = static_cast< bool >(val13); - ecode14 = SWIG_AsVal_bool(obj13, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "proximalFlat" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_int(obj14, &val15); + ecode15 = SWIG_AsVal_int(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "proximalFlat" "', argument " "15"" of type '" "int""'"); } arg15 = static_cast< int >(val15); - ecode16 = SWIG_AsVal_bool(obj15, &val16); + ecode16 = SWIG_AsVal_bool(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "proximalFlat" "', argument " "16"" of type '" "bool""'"); } arg16 = static_cast< bool >(val16); try { result = (Vector< float > *)_proximalFlat< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -21501,15 +20791,11 @@ SWIGINTERN PyObject *_wrap_proximalFlat(PyObject *self, PyObject *args) { PyObject *argv[17] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 16) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "proximalFlat", 0, 16, argv))) SWIG_fail; + --argc; if (argc == 16) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -21588,7 +20874,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_proximalFlat__SWIG_1(self, args); + return _wrap_proximalFlat__SWIG_1(self, argc, argv); } } } @@ -21607,7 +20893,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat(PyObject *self, PyObject *args) { } } if (argc == 16) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -21686,7 +20972,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_proximalFlat__SWIG_0(self, args); + return _wrap_proximalFlat__SWIG_0(self, argc, argv); } } } @@ -21706,7 +20992,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'proximalFlat'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'proximalFlat'.\n" " Possible C/C++ prototypes are:\n" " _proximalFlat< double >(Matrix< double > *,Matrix< double > *,Vector< int > *,int,double,double,double,bool,bool,char *,bool,bool,bool,bool,int,bool)\n" " _proximalFlat< float >(Matrix< float > *,Matrix< float > *,Vector< int > *,int,float,float,float,bool,bool,char *,bool,bool,bool,bool,int,bool)\n"); @@ -21714,7 +21000,7 @@ SWIGINTERN PyObject *_wrap_proximalFlat(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -21768,31 +21054,13 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int ecode18 = 0 ; bool val19 ; int ecode19 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; Vector< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOO:proximalTree",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18)) SWIG_fail; + (void)self; + if ((nobjs < 19) || (nobjs > 19)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -21809,7 +21077,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -21825,7 +21093,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((double *)array_data(array3),(int)array_size(array3,0)); } @@ -21849,7 +21117,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray4 = obj3; + sparray4 = swig_obj[3]; if ( !( PyObject_HasAttrString(sparray4, "indptr") && PyObject_HasAttrString(sparray4, "indices") && PyObject_HasAttrString(sparray4, "data") && @@ -21908,89 +21176,87 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { - array5 = obj_to_array_no_conversion(obj4, NPY_INT); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_INT); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((int *)array_data(array5),(int)array_size(array5,0)); } { - array6 = obj_to_array_no_conversion(obj5, NPY_INT); + array6 = obj_to_array_no_conversion(swig_obj[5], NPY_INT); if (!array6 || !require_dimensions(array6,1) || !require_contiguous(array6) || !require_native(array6)) SWIG_fail; arg6 = new Vector ((int *)array_data(array6),(int)array_size(array6,0)); } - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "proximalTree" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "proximalTree" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); - ecode9 = SWIG_AsVal_double(obj8, &val9); + ecode9 = SWIG_AsVal_double(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "proximalTree" "', argument " "9"" of type '" "double""'"); } arg9 = static_cast< double >(val9); - ecode10 = SWIG_AsVal_double(obj9, &val10); + ecode10 = SWIG_AsVal_double(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "proximalTree" "', argument " "10"" of type '" "double""'"); } arg10 = static_cast< double >(val10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "proximalTree" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_bool(obj11, &val12); + ecode12 = SWIG_AsVal_bool(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "proximalTree" "', argument " "12"" of type '" "bool""'"); } arg12 = static_cast< bool >(val12); - res13 = SWIG_AsCharPtrAndSize(obj12, &buf13, NULL, &alloc13); + res13 = SWIG_AsCharPtrAndSize(swig_obj[12], &buf13, NULL, &alloc13); if (!SWIG_IsOK(res13)) { SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "proximalTree" "', argument " "13"" of type '" "char *""'"); } arg13 = reinterpret_cast< char * >(buf13); - ecode14 = SWIG_AsVal_bool(obj13, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "proximalTree" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_bool(obj14, &val15); + ecode15 = SWIG_AsVal_bool(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "proximalTree" "', argument " "15"" of type '" "bool""'"); } arg15 = static_cast< bool >(val15); - ecode16 = SWIG_AsVal_bool(obj15, &val16); + ecode16 = SWIG_AsVal_bool(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "proximalTree" "', argument " "16"" of type '" "bool""'"); } arg16 = static_cast< bool >(val16); - ecode17 = SWIG_AsVal_bool(obj16, &val17); + ecode17 = SWIG_AsVal_bool(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "proximalTree" "', argument " "17"" of type '" "bool""'"); } arg17 = static_cast< bool >(val17); - ecode18 = SWIG_AsVal_int(obj17, &val18); + ecode18 = SWIG_AsVal_int(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "proximalTree" "', argument " "18"" of type '" "int""'"); } arg18 = static_cast< int >(val18); - ecode19 = SWIG_AsVal_bool(obj18, &val19); + ecode19 = SWIG_AsVal_bool(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "proximalTree" "', argument " "19"" of type '" "bool""'"); } arg19 = static_cast< bool >(val19); try { result = (Vector< double > *)_proximalTree< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -22048,7 +21314,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -22102,31 +21368,13 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int ecode18 = 0 ; bool val19 ; int ecode19 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; - PyObject * obj18 = 0 ; Vector< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOOO:proximalTree",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17,&obj18)) SWIG_fail; + (void)self; + if ((nobjs < 19) || (nobjs > 19)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -22143,7 +21391,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -22159,7 +21407,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((float *)array_data(array3),(int)array_size(array3,0)); } @@ -22183,7 +21431,7 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray4 = obj3; + sparray4 = swig_obj[3]; if ( !( PyObject_HasAttrString(sparray4, "indptr") && PyObject_HasAttrString(sparray4, "indices") && PyObject_HasAttrString(sparray4, "data") && @@ -22242,89 +21490,87 @@ SWIGINTERN PyObject *_wrap_proximalTree__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { - array5 = obj_to_array_no_conversion(obj4, NPY_INT); + array5 = obj_to_array_no_conversion(swig_obj[4], NPY_INT); if (!array5 || !require_dimensions(array5,1) || !require_contiguous(array5) || !require_native(array5)) SWIG_fail; arg5 = new Vector ((int *)array_data(array5),(int)array_size(array5,0)); } { - array6 = obj_to_array_no_conversion(obj5, NPY_INT); + array6 = obj_to_array_no_conversion(swig_obj[5], NPY_INT); if (!array6 || !require_dimensions(array6,1) || !require_contiguous(array6) || !require_native(array6)) SWIG_fail; arg6 = new Vector ((int *)array_data(array6),(int)array_size(array6,0)); } - ecode7 = SWIG_AsVal_int(obj6, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "proximalTree" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_float(obj7, &val8); + ecode8 = SWIG_AsVal_float(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "proximalTree" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); - ecode9 = SWIG_AsVal_float(obj8, &val9); + ecode9 = SWIG_AsVal_float(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "proximalTree" "', argument " "9"" of type '" "float""'"); } arg9 = static_cast< float >(val9); - ecode10 = SWIG_AsVal_float(obj9, &val10); + ecode10 = SWIG_AsVal_float(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "proximalTree" "', argument " "10"" of type '" "float""'"); } arg10 = static_cast< float >(val10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "proximalTree" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - ecode12 = SWIG_AsVal_bool(obj11, &val12); + ecode12 = SWIG_AsVal_bool(swig_obj[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "proximalTree" "', argument " "12"" of type '" "bool""'"); } arg12 = static_cast< bool >(val12); - res13 = SWIG_AsCharPtrAndSize(obj12, &buf13, NULL, &alloc13); + res13 = SWIG_AsCharPtrAndSize(swig_obj[12], &buf13, NULL, &alloc13); if (!SWIG_IsOK(res13)) { SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "proximalTree" "', argument " "13"" of type '" "char *""'"); } arg13 = reinterpret_cast< char * >(buf13); - ecode14 = SWIG_AsVal_bool(obj13, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "proximalTree" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_bool(obj14, &val15); + ecode15 = SWIG_AsVal_bool(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "proximalTree" "', argument " "15"" of type '" "bool""'"); } arg15 = static_cast< bool >(val15); - ecode16 = SWIG_AsVal_bool(obj15, &val16); + ecode16 = SWIG_AsVal_bool(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "proximalTree" "', argument " "16"" of type '" "bool""'"); } arg16 = static_cast< bool >(val16); - ecode17 = SWIG_AsVal_bool(obj16, &val17); + ecode17 = SWIG_AsVal_bool(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "proximalTree" "', argument " "17"" of type '" "bool""'"); } arg17 = static_cast< bool >(val17); - ecode18 = SWIG_AsVal_int(obj17, &val18); + ecode18 = SWIG_AsVal_int(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "proximalTree" "', argument " "18"" of type '" "int""'"); } arg18 = static_cast< int >(val18); - ecode19 = SWIG_AsVal_bool(obj18, &val19); + ecode19 = SWIG_AsVal_bool(swig_obj[18], &val19); if (!SWIG_IsOK(ecode19)) { SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "proximalTree" "', argument " "19"" of type '" "bool""'"); } arg19 = static_cast< bool >(val19); try { result = (Vector< float > *)_proximalTree< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -22387,15 +21633,11 @@ SWIGINTERN PyObject *_wrap_proximalTree(PyObject *self, PyObject *args) { PyObject *argv[20] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 19) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "proximalTree", 0, 19, argv))) SWIG_fail; + --argc; if (argc == 19) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -22495,7 +21737,7 @@ SWIGINTERN PyObject *_wrap_proximalTree(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_proximalTree__SWIG_1(self, args); + return _wrap_proximalTree__SWIG_1(self, argc, argv); } } } @@ -22517,7 +21759,7 @@ SWIGINTERN PyObject *_wrap_proximalTree(PyObject *self, PyObject *args) { } } if (argc == 19) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -22617,7 +21859,7 @@ SWIGINTERN PyObject *_wrap_proximalTree(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_proximalTree__SWIG_0(self, args); + return _wrap_proximalTree__SWIG_0(self, argc, argv); } } } @@ -22640,7 +21882,7 @@ SWIGINTERN PyObject *_wrap_proximalTree(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'proximalTree'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'proximalTree'.\n" " Possible C/C++ prototypes are:\n" " _proximalTree< double >(Matrix< double > *,Matrix< double > *,Vector< double > *,SpMatrix< bool > *,Vector< int > *,Vector< int > *,int,double,double,double,bool,bool,char *,bool,bool,bool,bool,int,bool)\n" " _proximalTree< float >(Matrix< float > *,Matrix< float > *,Vector< float > *,SpMatrix< bool > *,Vector< int > *,Vector< int > *,int,float,float,float,bool,bool,char *,bool,bool,bool,bool,int,bool)\n"); @@ -22648,7 +21890,7 @@ SWIGINTERN PyObject *_wrap_proximalTree(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -22700,30 +21942,13 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int ecode17 = 0 ; bool val18 ; int ecode18 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; Vector< double > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOO:proximalGraph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17)) SWIG_fail; + (void)self; + if ((nobjs < 18) || (nobjs > 18)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -22740,7 +21965,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -22756,7 +21981,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_DOUBLE); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((double *)array_data(array3),(int)array_size(array3,0)); } @@ -22780,7 +22005,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray4 = obj3; + sparray4 = swig_obj[3]; if ( !( PyObject_HasAttrString(sparray4, "indptr") && PyObject_HasAttrString(sparray4, "indices") && PyObject_HasAttrString(sparray4, "data") && @@ -22858,7 +22083,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray5 = obj4; + sparray5 = swig_obj[4]; if ( !( PyObject_HasAttrString(sparray5, "indptr") && PyObject_HasAttrString(sparray5, "indices") && PyObject_HasAttrString(sparray5, "data") && @@ -22916,80 +22141,78 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "proximalGraph" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "proximalGraph" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "proximalGraph" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); - ecode9 = SWIG_AsVal_double(obj8, &val9); + ecode9 = SWIG_AsVal_double(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "proximalGraph" "', argument " "9"" of type '" "double""'"); } arg9 = static_cast< double >(val9); - ecode10 = SWIG_AsVal_bool(obj9, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "proximalGraph" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "proximalGraph" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - res12 = SWIG_AsCharPtrAndSize(obj11, &buf12, NULL, &alloc12); + res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12); if (!SWIG_IsOK(res12)) { SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "proximalGraph" "', argument " "12"" of type '" "char *""'"); } arg12 = reinterpret_cast< char * >(buf12); - ecode13 = SWIG_AsVal_bool(obj12, &val13); + ecode13 = SWIG_AsVal_bool(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "proximalGraph" "', argument " "13"" of type '" "bool""'"); } arg13 = static_cast< bool >(val13); - ecode14 = SWIG_AsVal_bool(obj13, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "proximalGraph" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_bool(obj14, &val15); + ecode15 = SWIG_AsVal_bool(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "proximalGraph" "', argument " "15"" of type '" "bool""'"); } arg15 = static_cast< bool >(val15); - ecode16 = SWIG_AsVal_bool(obj15, &val16); + ecode16 = SWIG_AsVal_bool(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "proximalGraph" "', argument " "16"" of type '" "bool""'"); } arg16 = static_cast< bool >(val16); - ecode17 = SWIG_AsVal_int(obj16, &val17); + ecode17 = SWIG_AsVal_int(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "proximalGraph" "', argument " "17"" of type '" "int""'"); } arg17 = static_cast< int >(val17); - ecode18 = SWIG_AsVal_bool(obj17, &val18); + ecode18 = SWIG_AsVal_bool(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "proximalGraph" "', argument " "18"" of type '" "bool""'"); } arg18 = static_cast< bool >(val18); try { result = (Vector< double > *)_proximalGraph< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -23041,7 +22264,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -23093,30 +22316,13 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int ecode17 = 0 ; bool val18 ; int ecode18 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - PyObject * obj12 = 0 ; - PyObject * obj13 = 0 ; - PyObject * obj14 = 0 ; - PyObject * obj15 = 0 ; - PyObject * obj16 = 0 ; - PyObject * obj17 = 0 ; Vector< float > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOOOO:proximalGraph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15,&obj16,&obj17)) SWIG_fail; + (void)self; + if ((nobjs < 18) || (nobjs > 18)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -23133,7 +22339,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -23149,7 +22355,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } { - array3 = obj_to_array_no_conversion(obj2, NPY_FLOAT); + array3 = obj_to_array_no_conversion(swig_obj[2], NPY_FLOAT); if (!array3 || !require_dimensions(array3,1) || !require_contiguous(array3) || !require_native(array3)) SWIG_fail; arg3 = new Vector ((float *)array_data(array3),(int)array_size(array3,0)); } @@ -23173,7 +22379,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray4 = obj3; + sparray4 = swig_obj[3]; if ( !( PyObject_HasAttrString(sparray4, "indptr") && PyObject_HasAttrString(sparray4, "indices") && PyObject_HasAttrString(sparray4, "data") && @@ -23251,7 +22457,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), */ /*@SWIG:py_typemaps.i,183,map_sparse@*/ - sparray5 = obj4; + sparray5 = swig_obj[4]; if ( !( PyObject_HasAttrString(sparray5, "indptr") && PyObject_HasAttrString(sparray5, "indices") && PyObject_HasAttrString(sparray5, "data") && @@ -23309,80 +22515,78 @@ SWIGINTERN PyObject *_wrap_proximalGraph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), /*@SWIG@*/ } - ecode6 = SWIG_AsVal_int(obj5, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "proximalGraph" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_float(obj6, &val7); + ecode7 = SWIG_AsVal_float(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "proximalGraph" "', argument " "7"" of type '" "float""'"); } arg7 = static_cast< float >(val7); - ecode8 = SWIG_AsVal_float(obj7, &val8); + ecode8 = SWIG_AsVal_float(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "proximalGraph" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); - ecode9 = SWIG_AsVal_float(obj8, &val9); + ecode9 = SWIG_AsVal_float(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "proximalGraph" "', argument " "9"" of type '" "float""'"); } arg9 = static_cast< float >(val9); - ecode10 = SWIG_AsVal_bool(obj9, &val10); + ecode10 = SWIG_AsVal_bool(swig_obj[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "proximalGraph" "', argument " "10"" of type '" "bool""'"); } arg10 = static_cast< bool >(val10); - ecode11 = SWIG_AsVal_bool(obj10, &val11); + ecode11 = SWIG_AsVal_bool(swig_obj[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "proximalGraph" "', argument " "11"" of type '" "bool""'"); } arg11 = static_cast< bool >(val11); - res12 = SWIG_AsCharPtrAndSize(obj11, &buf12, NULL, &alloc12); + res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12); if (!SWIG_IsOK(res12)) { SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "proximalGraph" "', argument " "12"" of type '" "char *""'"); } arg12 = reinterpret_cast< char * >(buf12); - ecode13 = SWIG_AsVal_bool(obj12, &val13); + ecode13 = SWIG_AsVal_bool(swig_obj[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "proximalGraph" "', argument " "13"" of type '" "bool""'"); } arg13 = static_cast< bool >(val13); - ecode14 = SWIG_AsVal_bool(obj13, &val14); + ecode14 = SWIG_AsVal_bool(swig_obj[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "proximalGraph" "', argument " "14"" of type '" "bool""'"); } arg14 = static_cast< bool >(val14); - ecode15 = SWIG_AsVal_bool(obj14, &val15); + ecode15 = SWIG_AsVal_bool(swig_obj[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "proximalGraph" "', argument " "15"" of type '" "bool""'"); } arg15 = static_cast< bool >(val15); - ecode16 = SWIG_AsVal_bool(obj15, &val16); + ecode16 = SWIG_AsVal_bool(swig_obj[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "proximalGraph" "', argument " "16"" of type '" "bool""'"); } arg16 = static_cast< bool >(val16); - ecode17 = SWIG_AsVal_int(obj16, &val17); + ecode17 = SWIG_AsVal_int(swig_obj[16], &val17); if (!SWIG_IsOK(ecode17)) { SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "proximalGraph" "', argument " "17"" of type '" "int""'"); } arg17 = static_cast< int >(val17); - ecode18 = SWIG_AsVal_bool(obj17, &val18); + ecode18 = SWIG_AsVal_bool(swig_obj[17], &val18); if (!SWIG_IsOK(ecode18)) { SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "proximalGraph" "', argument " "18"" of type '" "bool""'"); } arg18 = static_cast< bool >(val18); try { result = (Vector< float > *)_proximalGraph< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -23439,15 +22643,11 @@ SWIGINTERN PyObject *_wrap_proximalGraph(PyObject *self, PyObject *args) { PyObject *argv[19] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 18) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "proximalGraph", 0, 18, argv))) SWIG_fail; + --argc; if (argc == 18) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -23548,7 +22748,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_proximalGraph__SWIG_1(self, args); + return _wrap_proximalGraph__SWIG_1(self, argc, argv); } } } @@ -23569,7 +22769,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph(PyObject *self, PyObject *args) { } } if (argc == 18) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -23670,7 +22870,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_proximalGraph__SWIG_0(self, args); + return _wrap_proximalGraph__SWIG_0(self, argc, argv); } } } @@ -23692,7 +22892,7 @@ SWIGINTERN PyObject *_wrap_proximalGraph(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'proximalGraph'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'proximalGraph'.\n" " Possible C/C++ prototypes are:\n" " _proximalGraph< double >(Matrix< double > *,Matrix< double > *,Vector< double > *,SpMatrix< bool > *,SpMatrix< bool > *,int,double,double,double,bool,bool,char *,bool,bool,bool,bool,int,bool)\n" " _proximalGraph< float >(Matrix< float > *,Matrix< float > *,Vector< float > *,SpMatrix< bool > *,SpMatrix< bool > *,int,float,float,float,bool,bool,char *,bool,bool,bool,bool,int,bool)\n"); @@ -23700,18 +22900,20 @@ SWIGINTERN PyObject *_wrap_proximalGraph(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_simpleGroupTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_simpleGroupTree(PyObject *self, PyObject *args) { PyObject *resultobj = 0; int *arg1 = (int *) 0 ; int arg2 ; PyArrayObject *array1 = NULL ; int i1 = 1 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; std::vector< StructNodeElem< double > * > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:simpleGroupTree",&obj0)) SWIG_fail; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; { - array1 = obj_to_array_no_conversion(obj0, NPY_INT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_INT); if (!array1 || !require_dimensions(array1,1) || !require_contiguous(array1) || !require_native(array1)) SWIG_fail; arg1 = (int*) array_data(array1); @@ -23720,13 +22922,11 @@ SWIGINTERN PyObject *_wrap_simpleGroupTree(PyObject *SWIGUNUSEDPARM(self), PyObj } try { result = (std::vector< StructNodeElem< double > * > *)_simpleGroupTree< double >(arg1,arg2); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { //int n = result->size(); PyObject* node_list = PyList_New(0); @@ -23760,30 +22960,30 @@ SWIGINTERN PyObject *_wrap_simpleGroupTree(PyObject *SWIGUNUSEDPARM(self), PyObj } -SWIGINTERN PyObject *_wrap_readGroupStruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_readGroupStruct(PyObject *self, PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; std::vector< StructNodeElem< double > * > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:readGroupStruct",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "readGroupStruct" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (std::vector< StructNodeElem< double > * > *)_readGroupStruct< double >((char const *)arg1); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { //int n = result->size(); PyObject* node_list = PyList_New(0); @@ -23819,30 +23019,30 @@ SWIGINTERN PyObject *_wrap_readGroupStruct(PyObject *SWIGUNUSEDPARM(self), PyObj } -SWIGINTERN PyObject *_wrap_groupStructOfString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_groupStructOfString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; std::vector< StructNodeElem< double > * > *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:groupStructOfString",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "groupStructOfString" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (std::vector< StructNodeElem< double > * > *)_groupStructOfString< double >((char const *)arg1); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { //int n = result->size(); PyObject* node_list = PyList_New(0); @@ -23878,14 +23078,13 @@ SWIGINTERN PyObject *_wrap_groupStructOfString(PyObject *SWIGUNUSEDPARM(self), P } -SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< StructNodeElem< double > * > *arg1 = (std::vector< StructNodeElem< double > * > *) 0 ; SpMatrix< bool > **arg2 = (SpMatrix< bool > **) 0 ; SpMatrix< bool > **arg3 = (SpMatrix< bool > **) 0 ; SpMatrix< bool > *data_temp2 ; SpMatrix< bool > *data_temp3 ; - PyObject * obj0 = 0 ; Vector< double > *result = 0 ; { @@ -23894,9 +23093,10 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(s { arg3 = &data_temp3; } - if (!PyArg_ParseTuple(args,(char *)"O:graphOfGroupStruct",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { - PyObject* pytree = obj0; + PyObject* pytree = swig_obj[0]; if(!PyList_Check(pytree)) { SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"arg 1 must be a list");SWIG_fail; } @@ -23923,13 +23123,11 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(s } try { result = (Vector< double > *)_graphOfGroupStruct< double >(arg1,arg2,arg3); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -24043,14 +23241,13 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(s } -SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< StructNodeElem< float > * > *arg1 = (std::vector< StructNodeElem< float > * > *) 0 ; SpMatrix< bool > **arg2 = (SpMatrix< bool > **) 0 ; SpMatrix< bool > **arg3 = (SpMatrix< bool > **) 0 ; SpMatrix< bool > *data_temp2 ; SpMatrix< bool > *data_temp3 ; - PyObject * obj0 = 0 ; Vector< float > *result = 0 ; { @@ -24059,9 +23256,10 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(s { arg3 = &data_temp3; } - if (!PyArg_ParseTuple(args,(char *)"O:graphOfGroupStruct",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { - PyObject* pytree = obj0; + PyObject* pytree = swig_obj[0]; if(!PyList_Check(pytree)) { SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"arg 1 must be a list");SWIG_fail; } @@ -24088,13 +23286,11 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(s } try { result = (Vector< float > *)_graphOfGroupStruct< float >(arg1,arg2,arg3); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - { npy_intp n = result->n(); npy_intp dims[1] = { @@ -24213,36 +23409,32 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct(PyObject *self, PyObject *args) { PyObject *argv[2] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "graphOfGroupStruct", 0, 1, argv))) SWIG_fail; + --argc; if (argc == 1) { - int _v; + int _v = 0; { _v = PyList_Check(argv[0]); } if (_v) { - return _wrap_graphOfGroupStruct__SWIG_0(self, args); + return _wrap_graphOfGroupStruct__SWIG_0(self, argc, argv); } } if (argc == 1) { - int _v; + int _v = 0; { _v = PyList_Check(argv[0]); } if (_v) { - return _wrap_graphOfGroupStruct__SWIG_1(self, args); + return _wrap_graphOfGroupStruct__SWIG_1(self, argc, argv); } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'graphOfGroupStruct'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'graphOfGroupStruct'.\n" " Possible C/C++ prototypes are:\n" " _graphOfGroupStruct< double >(std::vector< StructNodeElem< double > * > *,SpMatrix< bool > **,SpMatrix< bool > **)\n" " _graphOfGroupStruct< float >(std::vector< StructNodeElem< float > * > *,SpMatrix< bool > **,SpMatrix< bool > **)\n"); @@ -24250,7 +23442,7 @@ SWIGINTERN PyObject *_wrap_graphOfGroupStruct(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< StructNodeElem< double > * > *arg1 = (std::vector< StructNodeElem< double > * > *) 0 ; int **arg2 = (int **) 0 ; @@ -24265,7 +23457,6 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(se SpMatrix< bool > *data_temp5 ; Vector< int > *data_temp6 ; Vector< int > *data_temp7 ; - PyObject * obj0 = 0 ; int result; { @@ -24287,9 +23478,10 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(se //# argout in arg7 = &data_temp7; } - if (!PyArg_ParseTuple(args,(char *)"O:treeOfGroupStruct",&obj0)) SWIG_fail; + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { - PyObject* pytree = obj0; + PyObject* pytree = swig_obj[0]; if(!PyList_Check(pytree)) { SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"arg 1 must be a list");SWIG_fail; } @@ -24316,13 +23508,11 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(se } try { result = (int)_treeOfGroupStruct< double >(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); { npy_intp dims[1] = { @@ -24427,7 +23617,7 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_0(PyObject *SWIGUNUSEDPARM(se } -SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< StructNodeElem< float > * > *arg1 = (std::vector< StructNodeElem< float > * > *) 0 ; int **arg2 = (int **) 0 ; @@ -24443,8 +23633,6 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(se SpMatrix< bool > *data_temp5 ; Vector< int > *data_temp6 ; Vector< int > *data_temp7 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; int result; { @@ -24462,9 +23650,10 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(se //# argout in arg7 = &data_temp7; } - if (!PyArg_ParseTuple(args,(char *)"OO:treeOfGroupStruct",&obj0,&obj1)) SWIG_fail; + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; { - PyObject* pytree = obj0; + PyObject* pytree = swig_obj[0]; if(!PyList_Check(pytree)) { SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"arg 1 must be a list");SWIG_fail; } @@ -24489,20 +23678,18 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct__SWIG_1(PyObject *SWIGUNUSEDPARM(se } } - res4 = SWIG_ConvertPtr(obj1, &argp4,SWIGTYPE_p_p_VectorT_float_t, 0 | 0 ); + res4 = SWIG_ConvertPtr(swig_obj[1], &argp4,SWIGTYPE_p_p_VectorT_float_t, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "treeOfGroupStruct" "', argument " "4"" of type '" "Vector< float > **""'"); } arg4 = reinterpret_cast< Vector< float > ** >(argp4); try { result = (int)_treeOfGroupStruct< float >(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); { npy_intp dims[1] = { @@ -24599,25 +23786,21 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct(PyObject *self, PyObject *args) { PyObject *argv[3] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "treeOfGroupStruct", 0, 2, argv))) SWIG_fail; + --argc; if (argc == 1) { - int _v; + int _v = 0; { _v = PyList_Check(argv[0]); } if (_v) { - return _wrap_treeOfGroupStruct__SWIG_0(self, args); + return _wrap_treeOfGroupStruct__SWIG_0(self, argc, argv); } } if (argc == 2) { - int _v; + int _v = 0; { _v = PyList_Check(argv[0]); @@ -24627,13 +23810,13 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct(PyObject *self, PyObject *args) { int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_VectorT_float_t, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_treeOfGroupStruct__SWIG_1(self, args); + return _wrap_treeOfGroupStruct__SWIG_1(self, argc, argv); } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'treeOfGroupStruct'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'treeOfGroupStruct'.\n" " Possible C/C++ prototypes are:\n" " _treeOfGroupStruct< double >(std::vector< StructNodeElem< double > * > *,int **,int *,Vector< double > **,SpMatrix< bool > **,Vector< int > **,Vector< int > **)\n" " _treeOfGroupStruct< float >(std::vector< StructNodeElem< float > * > *,int **,int *,Vector< float > **,SpMatrix< bool > **,Vector< int > **,Vector< int > **)\n"); @@ -24641,7 +23824,7 @@ SWIGINTERN PyObject *_wrap_treeOfGroupStruct(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< double > *arg1 = (Matrix< double > *) 0 ; Matrix< double > *arg2 = (Matrix< double > *) 0 ; @@ -24656,16 +23839,12 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_0(PyObject *SWIGUNUSEDPARM(self) int ecode4 = 0 ; bool val5 ; int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:im2col_sliding",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + (void)self; + if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_DOUBLE); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -24682,7 +23861,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_0(PyObject *SWIGUNUSEDPARM(self) } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_DOUBLE); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -24697,30 +23876,28 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_0(PyObject *SWIGUNUSEDPARM(self) /*@SWIG@*/ } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "im2col_sliding" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "im2col_sliding" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_bool(obj4, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "im2col_sliding" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); try { _im2col_sliding< double >(arg1,arg2,arg3,arg4,arg5); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -24740,7 +23917,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_0(PyObject *SWIGUNUSEDPARM(self) } -SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Matrix< float > *arg1 = (Matrix< float > *) 0 ; Matrix< float > *arg2 = (Matrix< float > *) 0 ; @@ -24755,16 +23932,12 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_1(PyObject *SWIGUNUSEDPARM(self) int ecode4 = 0 ; bool val5 ; int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:im2col_sliding",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + (void)self; + if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array1 = obj_to_array_no_conversion(obj0, NPY_FLOAT); + array1 = obj_to_array_no_conversion(swig_obj[0], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -24781,7 +23954,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_1(PyObject *SWIGUNUSEDPARM(self) } { /*@SWIG:py_typemaps.i,86,map_matrix@*/ - array2 = obj_to_array_no_conversion(obj1, NPY_FLOAT); + array2 = obj_to_array_no_conversion(swig_obj[1], NPY_FLOAT); /* !!!!! WARNING! bug (?) : the variable name choosen above must not appear in the string, otherwise swig will not correctly generate @@ -24796,30 +23969,28 @@ SWIGINTERN PyObject *_wrap_im2col_sliding__SWIG_1(PyObject *SWIGUNUSEDPARM(self) /*@SWIG@*/ } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "im2col_sliding" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "im2col_sliding" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_bool(obj4, &val5); + ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "im2col_sliding" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); try { _im2col_sliding< float >(arg1,arg2,arg3,arg4,arg5); - } - catch(char const *_e) { + } catch(char const *_e) { PyErr_SetString(PyExc_RuntimeError, _e); SWIG_fail; } - resultobj = SWIG_Py_Void(); { delete arg1; @@ -24844,15 +24015,11 @@ SWIGINTERN PyObject *_wrap_im2col_sliding(PyObject *self, PyObject *args) { PyObject *argv[6] = { 0 }; - Py_ssize_t ii; - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } + if (!(argc = SWIG_Python_UnpackTuple(args, "im2col_sliding", 0, 5, argv))) SWIG_fail; + --argc; if (argc == 5) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_DOUBLE); @@ -24878,7 +24045,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_im2col_sliding__SWIG_0(self, args); + return _wrap_im2col_sliding__SWIG_0(self, argc, argv); } } } @@ -24886,7 +24053,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding(PyObject *self, PyObject *args) { } } if (argc == 5) { - int _v; + int _v = 0; { _v = is_array(argv[0]) && (array_numdims(argv[0]) == 2) && PyArray_EquivTypenums(array_type(argv[0]),NPY_FLOAT); @@ -24912,7 +24079,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_im2col_sliding__SWIG_1(self, args); + return _wrap_im2col_sliding__SWIG_1(self, argc, argv); } } } @@ -24921,7 +24088,7 @@ SWIGINTERN PyObject *_wrap_im2col_sliding(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'im2col_sliding'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'im2col_sliding'.\n" " Possible C/C++ prototypes are:\n" " _im2col_sliding< double >(Matrix< double > *,Matrix< double > *,int,int,bool)\n" " _im2col_sliding< float >(Matrix< float > *,Matrix< float > *,int,int,bool)\n"); @@ -24930,146 +24097,134 @@ SWIGINTERN PyObject *_wrap_im2col_sliding(PyObject *self, PyObject *args) { static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"m_ones", _wrap_m_ones, METH_VARARGS, NULL}, - { (char *)"skip_space", _wrap_skip_space, METH_VARARGS, NULL}, - { (char *)"parse_line", _wrap_parse_line, METH_VARARGS, NULL}, - { (char *)"intlist", _wrap_intlist, METH_VARARGS, NULL}, - { (char *)"sort", _wrap_sort, METH_VARARGS, (char *)"\n" + { "m_ones", _wrap_m_ones, METH_O, NULL}, + { "skip_space", _wrap_skip_space, METH_O, NULL}, + { "parse_line", _wrap_parse_line, METH_VARARGS, NULL}, + { "intlist", _wrap_intlist, METH_O, NULL}, + { "sort", _wrap_sort, METH_VARARGS, "\n" "sort(Vector< double > * v, bool mode)\n" "sort(Vector< float > * v, bool mode)\n" ""}, - { (char *)"mult", _wrap_mult, METH_VARARGS, (char *)"\n" + { "mult", _wrap_mult, METH_VARARGS, "\n" "mult(Matrix< double > * X, Matrix< double > * Y, Matrix< double > * XY, bool const transX, bool const transY, double const a, double const b)\n" "mult(Matrix< float > * X, Matrix< float > * Y, Matrix< float > * XY, bool const transX, bool const transY, float const a, float const b)\n" ""}, - { (char *)"AAt", _wrap_AAt, METH_VARARGS, (char *)"\n" + { "AAt", _wrap_AAt, METH_VARARGS, "\n" "AAt(SpMatrix< double > * A, Matrix< double > * B)\n" "AAt(SpMatrix< float > * A, Matrix< float > * B)\n" ""}, - { (char *)"XAt", _wrap_XAt, METH_VARARGS, (char *)"\n" + { "XAt", _wrap_XAt, METH_VARARGS, "\n" "XAt(SpMatrix< double > * A, Matrix< double > * X, Matrix< double > * XAt)\n" "XAt(SpMatrix< float > * A, Matrix< float > * X, Matrix< float > * XAt)\n" ""}, - { (char *)"applyBayerPattern", _wrap_applyBayerPattern, METH_VARARGS, (char *)"\n" + { "applyBayerPattern", _wrap_applyBayerPattern, METH_VARARGS, "\n" "applyBayerPattern(Vector< double > * v, int offset)\n" "applyBayerPattern(Vector< float > * v, int offset)\n" ""}, - { (char *)"conjugateGradient", _wrap_conjugateGradient, METH_VARARGS, (char *)"\n" + { "conjugateGradient", _wrap_conjugateGradient, METH_VARARGS, "\n" "conjugateGradient(Matrix< double > * A, Vector< double > * b, Vector< double > * x, double const tol, int const itermax)\n" "conjugateGradient(Matrix< float > * A, Vector< float > * b, Vector< float > * x, float const tol, int const itermax)\n" ""}, - { (char *)"invSym", _wrap_invSym, METH_VARARGS, (char *)"\n" + { "invSym", _wrap_invSym, METH_VARARGS, "\n" "invSym(Matrix< double > * A)\n" "invSym(Matrix< float > * A)\n" ""}, - { (char *)"normalize", _wrap_normalize, METH_VARARGS, (char *)"\n" + { "normalize", _wrap_normalize, METH_VARARGS, "\n" "normalize(Matrix< double > * A)\n" "normalize(Matrix< float > * A)\n" ""}, - { (char *)"L1COEFFS_swigconstant", L1COEFFS_swigconstant, METH_VARARGS, NULL}, - { (char *)"L2ERROR_swigconstant", L2ERROR_swigconstant, METH_VARARGS, NULL}, - { (char *)"PENALTY_swigconstant", PENALTY_swigconstant, METH_VARARGS, NULL}, - { (char *)"SPARSITY_swigconstant", SPARSITY_swigconstant, METH_VARARGS, NULL}, - { (char *)"L2ERROR2_swigconstant", L2ERROR2_swigconstant, METH_VARARGS, NULL}, - { (char *)"PENALTY2_swigconstant", PENALTY2_swigconstant, METH_VARARGS, NULL}, - { (char *)"FISTAMODE_swigconstant", FISTAMODE_swigconstant, METH_VARARGS, NULL}, - { (char *)"sparseProject", _wrap_sparseProject, METH_VARARGS, (char *)"\n" + { "sparseProject", _wrap_sparseProject, METH_VARARGS, "\n" "sparseProject(Matrix< double > * U, Matrix< double > * V, double const thrs, int const mode, double const lambda1, double const lambda2, double const lambda3, bool const pos, int const numThreads)\n" "sparseProject(Matrix< float > * U, Matrix< float > * V, float const thrs, int const mode, float const lambda1, float const lambda2, float const lambda3, bool const pos, int const numThreads)\n" ""}, - { (char *)"lassoD", _wrap_lassoD, METH_VARARGS, (char *)"\n" + { "lassoD", _wrap_lassoD, METH_VARARGS, "\n" "lassoD(Matrix< double > * X, Matrix< double > * D, bool return_reg_path, int L, double const constraint, double const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< double >\n" "lassoD(Matrix< float > * X, Matrix< float > * D, bool return_reg_path, int L, float const constraint, float const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< float > *\n" ""}, - { (char *)"lassoQq", _wrap_lassoQq, METH_VARARGS, (char *)"\n" + { "lassoQq", _wrap_lassoQq, METH_VARARGS, "\n" "lassoQq(Matrix< double > * X, Matrix< double > * Q, Matrix< double > * q, bool return_reg_path, int L, double const constraint, double const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< double >\n" "lassoQq(Matrix< float > * X, Matrix< float > * Q, Matrix< float > * q, bool return_reg_path, int L, float const constraint, float const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< float > *\n" ""}, - { (char *)"lassoMask", _wrap_lassoMask, METH_VARARGS, (char *)"\n" + { "lassoMask", _wrap_lassoMask, METH_VARARGS, "\n" "lassoMask(Matrix< double > * X, Matrix< double > * D, Matrix< bool > * B, int L, double const constraint, double const lambda2, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< double >\n" "lassoMask(Matrix< float > * X, Matrix< float > * D, Matrix< bool > * B, int L, float const constraint, float const lambda2, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< float > *\n" ""}, - { (char *)"lassoWeighted", _wrap_lassoWeighted, METH_VARARGS, (char *)"\n" + { "lassoWeighted", _wrap_lassoWeighted, METH_VARARGS, "\n" "lassoWeighted(Matrix< double > * X, Matrix< double > * D, Matrix< double > * W, int L, double const constraint, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< double >\n" "lassoWeighted(Matrix< float > * X, Matrix< float > * D, Matrix< float > * W, int L, float const constraint, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< float > *\n" ""}, - { (char *)"omp", _wrap_omp, METH_VARARGS, (char *)"\n" + { "omp", _wrap_omp, METH_VARARGS, "\n" "omp(Matrix< double > * X, Matrix< double > * D, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< double > * eps, bool given_Lambda, Vector< double > * Lambda, int const numThreads) -> SpMatrix< double >\n" "omp(Matrix< float > * X, Matrix< float > * D, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< float > * eps, bool given_Lambda, Vector< float > * Lambda, int const numThreads) -> SpMatrix< float > *\n" ""}, - { (char *)"ompMask", _wrap_ompMask, METH_VARARGS, (char *)"\n" + { "ompMask", _wrap_ompMask, METH_VARARGS, "\n" "ompMask(Matrix< double > * X, Matrix< double > * D, Matrix< bool > * B, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< double > * eps, bool given_Lambda, Vector< double > * Lambda, int const numThreads) -> SpMatrix< double >\n" "ompMask(Matrix< float > * X, Matrix< float > * D, Matrix< bool > * B, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< float > * eps, bool given_Lambda, Vector< float > * Lambda, int const numThreads) -> SpMatrix< float > *\n" ""}, - { (char *)"somp", _wrap_somp, METH_VARARGS, (char *)"\n" + { "somp", _wrap_somp, METH_VARARGS, "\n" "somp(Matrix< double > * X, Matrix< double > * D, Vector< int > * groups, int LL, double eps, int numThreads) -> SpMatrix< double >\n" "somp(Matrix< float > * X, Matrix< float > * D, Vector< int > * groups, int LL, float eps, int numThreads) -> SpMatrix< float > *\n" ""}, - { (char *)"cd", _wrap_cd, METH_VARARGS, (char *)"\n" + { "cd", _wrap_cd, METH_VARARGS, "\n" "cd(Matrix< double > * X, Matrix< double > * D, SpMatrix< double > * alpha, double lambda1, constraint_type mode, int itermax, double tol, int numThreads) -> SpMatrix< double >\n" "cd(Matrix< float > * X, Matrix< float > * D, SpMatrix< float > * alpha, float lambda1, constraint_type mode, int itermax, float tol, int numThreads) -> SpMatrix< float > *\n" ""}, - { (char *)"l1L2BCD", _wrap_l1L2BCD, METH_VARARGS, (char *)"\n" + { "l1L2BCD", _wrap_l1L2BCD, METH_VARARGS, "\n" "l1L2BCD(Matrix< double > * X, Matrix< double > * D, Matrix< double > * alpha0, Vector< int > * groups, double lambda1, constraint_type mode, int itermax, double tol, int numThreads)\n" "l1L2BCD(Matrix< float > * X, Matrix< float > * D, Matrix< float > * alpha0, Vector< int > * groups, float lambda1, constraint_type mode, int itermax, float tol, int numThreads)\n" ""}, - { (char *)"L2_swigconstant", L2_swigconstant, METH_VARARGS, NULL}, - { (char *)"L1L2_swigconstant", L1L2_swigconstant, METH_VARARGS, NULL}, - { (char *)"L1L2FL_swigconstant", L1L2FL_swigconstant, METH_VARARGS, NULL}, - { (char *)"L1L2MU_swigconstant", L1L2MU_swigconstant, METH_VARARGS, NULL}, - { (char *)"alltrainDL", _wrap_alltrainDL, METH_VARARGS, (char *)"\n" + { "alltrainDL", _wrap_alltrainDL, METH_VARARGS, "\n" "alltrainDL(Data< double > * X, bool in_memory, bool return_model, Matrix< double > * m_A, Matrix< double > * m_B, int m_iter, Matrix< double > * D1, Vector< double > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, double tol, bool fixed_step, bool ista, int batch_size, int K, double lambda1, double lambda2, double lambda3, int iter, double t0, constraint_type mode, char * name_regul, bool posAlpha, bool posD, bool expand, constraint_type_D modeD, bool whiten, bool clean, bool verbose, double gamma1, double gamma2, double rho, int iter_updateD, bool stochastic, int modeParam, bool batch, bool log, char * logName) -> Matrix< double >\n" "alltrainDL(Data< float > * X, bool in_memory, bool return_model, Matrix< float > * m_A, Matrix< float > * m_B, int m_iter, Matrix< float > * D1, Vector< float > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, float tol, bool fixed_step, bool ista, int batch_size, int K, double lambda1, double lambda2, double lambda3, int iter, double t0, constraint_type mode, char * name_regul, bool posAlpha, bool posD, bool expand, constraint_type_D modeD, bool whiten, bool clean, bool verbose, double gamma1, double gamma2, float rho, int iter_updateD, bool stochastic, int modeParam, bool batch, bool log, char * logName) -> Matrix< float > *\n" ""}, - { (char *)"archetypalAnalysis", _wrap_archetypalAnalysis, METH_VARARGS, (char *)"\n" + { "archetypalAnalysis", _wrap_archetypalAnalysis, METH_VARARGS, "\n" "archetypalAnalysis(Matrix< double > * X, int p, bool robust, double epsilon, bool computeXtX, int stepsFISTA, int stepsAS, bool randominit, int numThreads) -> Matrix< double >\n" "archetypalAnalysis(Matrix< float > * X, int p, bool robust, float epsilon, bool computeXtX, int stepsFISTA, int stepsAS, bool randominit, int numThreads) -> Matrix< float > *\n" ""}, - { (char *)"archetypalAnalysisInit", _wrap_archetypalAnalysisInit, METH_VARARGS, (char *)"\n" + { "archetypalAnalysisInit", _wrap_archetypalAnalysisInit, METH_VARARGS, "\n" "archetypalAnalysisInit(Matrix< double > * X, Matrix< double > * Z0, bool robust, double epsilon, bool computeXtX, int stepsFISTA, int stepsAS, int numThreads) -> Matrix< double >\n" "archetypalAnalysisInit(Matrix< float > * X, Matrix< float > * Z0, bool robust, float epsilon, bool computeXtX, int stepsFISTA, int stepsAS, int numThreads) -> Matrix< float > *\n" ""}, - { (char *)"decompSimplex", _wrap_decompSimplex, METH_VARARGS, (char *)"\n" + { "decompSimplex", _wrap_decompSimplex, METH_VARARGS, "\n" "decompSimplex(Matrix< double > * X, Matrix< double > * Z, bool computeXtX, int numThreads) -> SpMatrix< double >\n" "decompSimplex(Matrix< float > * X, Matrix< float > * Z, bool computeXtX, int numThreads) -> SpMatrix< float > *\n" ""}, - { (char *)"fistaFlat", _wrap_fistaFlat, METH_VARARGS, (char *)"\n" + { "fistaFlat", _wrap_fistaFlat, METH_VARARGS, "\n" "fistaFlat(Matrix< double > * X, AbstractMatrixB< double > * D, Matrix< double > * alpha0, Matrix< double > * alpha, Vector< int > * groups, int num_threads, int max_it, double L0, bool fixed_step, double gamma, double _lambda, double delta, double lambda2, double lambda3, double a, double b, double c, double tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< double > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< double >\n" "fistaFlat(Matrix< float > * X, AbstractMatrixB< float > * D, Matrix< float > * alpha0, Matrix< float > * alpha, Vector< int > * groups, int num_threads, int max_it, float L0, bool fixed_step, float gamma, float _lambda, float delta, float lambda2, float lambda3, float a, float b, float c, float tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< float > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< float > *\n" ""}, - { (char *)"fistaTree", _wrap_fistaTree, METH_VARARGS, (char *)"\n" + { "fistaTree", _wrap_fistaTree, METH_VARARGS, "\n" "fistaTree(Matrix< double > * X, AbstractMatrixB< double > * D, Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, int max_it, double L0, bool fixed_step, double gamma, double _lambda, double delta, double lambda2, double lambda3, double a, double b, double c, double tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< double > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< double >\n" "fistaTree(Matrix< float > * X, AbstractMatrixB< float > * D, Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, int max_it, float L0, bool fixed_step, float gamma, float _lambda, float delta, float lambda2, float lambda3, float a, float b, float c, float tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< float > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< float > *\n" ""}, - { (char *)"fistaGraph", _wrap_fistaGraph, METH_VARARGS, (char *)"\n" + { "fistaGraph", _wrap_fistaGraph, METH_VARARGS, "\n" "fistaGraph(Matrix< double > * X, AbstractMatrixB< double > * D, Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, int max_it, double L0, bool fixed_step, double gamma, double _lambda, double delta, double lambda2, double lambda3, double a, double b, double c, double tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< double > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< double >\n" "fistaGraph(Matrix< float > * X, AbstractMatrixB< float > * D, Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, int max_it, float L0, bool fixed_step, float gamma, float _lambda, float delta, float lambda2, float lambda3, float a, float b, float c, float tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< float > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< float > *\n" ""}, - { (char *)"proximalFlat", _wrap_proximalFlat, METH_VARARGS, (char *)"\n" + { "proximalFlat", _wrap_proximalFlat, METH_VARARGS, "\n" "proximalFlat(Matrix< double > * alpha0, Matrix< double > * alpha, Vector< int > * groups, int num_threads, double lambda1, double lambda2, double lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< double >\n" "proximalFlat(Matrix< float > * alpha0, Matrix< float > * alpha, Vector< int > * groups, int num_threads, float lambda1, float lambda2, float lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< float > *\n" ""}, - { (char *)"proximalTree", _wrap_proximalTree, METH_VARARGS, (char *)"\n" + { "proximalTree", _wrap_proximalTree, METH_VARARGS, "\n" "proximalTree(Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, double lambda1, double lambda2, double lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< double >\n" "proximalTree(Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, float lambda1, float lambda2, float lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< float > *\n" ""}, - { (char *)"proximalGraph", _wrap_proximalGraph, METH_VARARGS, (char *)"\n" + { "proximalGraph", _wrap_proximalGraph, METH_VARARGS, "\n" "proximalGraph(Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, double lambda1, double lambda2, double lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< double >\n" "proximalGraph(Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, float lambda1, float lambda2, float lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< float > *\n" ""}, - { (char *)"simpleGroupTree", _wrap_simpleGroupTree, METH_VARARGS, (char *)"simpleGroupTree(int * degr) -> std::vector< StructNodeElem< double > * > *"}, - { (char *)"readGroupStruct", _wrap_readGroupStruct, METH_VARARGS, (char *)"readGroupStruct(char const * file) -> std::vector< StructNodeElem< double > * > *"}, - { (char *)"groupStructOfString", _wrap_groupStructOfString, METH_VARARGS, (char *)"groupStructOfString(char const * data) -> std::vector< StructNodeElem< double > * > *"}, - { (char *)"graphOfGroupStruct", _wrap_graphOfGroupStruct, METH_VARARGS, (char *)"\n" + { "simpleGroupTree", _wrap_simpleGroupTree, METH_O, "simpleGroupTree(int * degr) -> std::vector< StructNodeElem< double > * > *"}, + { "readGroupStruct", _wrap_readGroupStruct, METH_O, "readGroupStruct(char const * file) -> std::vector< StructNodeElem< double > * > *"}, + { "groupStructOfString", _wrap_groupStructOfString, METH_O, "groupStructOfString(char const * data) -> std::vector< StructNodeElem< double > * > *"}, + { "graphOfGroupStruct", _wrap_graphOfGroupStruct, METH_VARARGS, "\n" "graphOfGroupStruct(std::vector< StructNodeElem< double > * > * gstruct) -> Vector< double >\n" "graphOfGroupStruct(std::vector< StructNodeElem< float > * > * gstruct) -> Vector< float > *\n" ""}, - { (char *)"treeOfGroupStruct", _wrap_treeOfGroupStruct, METH_VARARGS, (char *)"\n" + { "treeOfGroupStruct", _wrap_treeOfGroupStruct, METH_VARARGS, "\n" "treeOfGroupStruct(std::vector< StructNodeElem< double > * > * gstruct) -> int\n" "treeOfGroupStruct(std::vector< StructNodeElem< float > * > * gstruct, Vector< float > ** peta_g) -> int\n" ""}, - { (char *)"im2col_sliding", _wrap_im2col_sliding, METH_VARARGS, (char *)"\n" + { "im2col_sliding", _wrap_im2col_sliding, METH_VARARGS, "\n" "im2col_sliding(Matrix< double > * A, Matrix< double > * B, int m, int n, bool RGB)\n" "im2col_sliding(Matrix< float > * A, Matrix< float > * B, int m, int n, bool RGB)\n" ""}, @@ -25188,9 +24343,12 @@ extern "C" { #define SWIGRUNTIME_DEBUG #endif +#ifndef SWIG_INIT_CLIENT_DATA_TYPE +#define SWIG_INIT_CLIENT_DATA_TYPE void * +#endif SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { +SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) { size_t i; swig_module_info *module_head, *iter; int init; @@ -25236,7 +24394,7 @@ SWIG_InitializeModule(void *clientdata) { /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; @@ -25244,7 +24402,7 @@ SWIG_InitializeModule(void *clientdata) { swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ @@ -25319,7 +24477,7 @@ SWIG_InitializeModule(void *clientdata) { for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; @@ -25373,236 +24531,6 @@ SWIG_PropagateClientData(void) { extern "C" { #endif - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ @@ -25631,15 +24559,12 @@ extern "C" { } } - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ + /* ----------------------------------------------------------------------------- + * Patch %callback methods' docstrings to hold the callback ptrs + * -----------------------------------------------------------------------------*/ SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { + SWIG_Python_FixMethods(PyMethodDef *methods, const swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; @@ -25647,7 +24572,7 @@ extern "C" { c = strstr(c, "swig_ptr: "); if (c) { int j; - swig_const_info *ci = 0; + const swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, @@ -25666,9 +24591,9 @@ extern "C" { char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); + memcpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); + memcpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; @@ -25683,6 +24608,9 @@ extern "C" { } #endif + + + /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ @@ -25698,20 +24626,12 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d, *md; + PyObject *m, *d, *md, *globals; + #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, + SWIG_name, NULL, -1, SwigMethods, @@ -25730,19 +24650,19 @@ SWIG_init(void) { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own + SwigPyObject_own, + SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; - PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; + PyTypeObject *swigpyobject; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; @@ -25757,14 +24677,19 @@ SWIG_init(void) { (void)static_getset; (void)self; - /* metatype is used to implement static member variables. */ - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); - assert(metatype_args); - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); assert(metatype); - Py_DECREF(metatype_args); - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; - assert(PyType_Ready(metatype) >= 0); +#endif + + (void)globals; + + /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ + SWIG_This(); + SWIG_Python_TypeCache(); + SwigPyPacked_type(); +#ifndef SWIGPYTHON_BUILTIN + SwigPyObject_type(); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ @@ -25773,7 +24698,7 @@ SWIG_init(void) { #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else - m = Py_InitModule((char *) SWIG_name, SwigMethods); + m = Py_InitModule(SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); @@ -25782,13 +24707,15 @@ SWIG_init(void) { SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; @@ -25822,6 +24749,17 @@ SWIG_init(void) { import_array(); + SWIG_Python_SetConstant(d, "L1COEFFS",SWIG_From_int(static_cast< int >(L1COEFFS))); + SWIG_Python_SetConstant(d, "L2ERROR",SWIG_From_int(static_cast< int >(L2ERROR))); + SWIG_Python_SetConstant(d, "PENALTY",SWIG_From_int(static_cast< int >(PENALTY))); + SWIG_Python_SetConstant(d, "SPARSITY",SWIG_From_int(static_cast< int >(SPARSITY))); + SWIG_Python_SetConstant(d, "L2ERROR2",SWIG_From_int(static_cast< int >(L2ERROR2))); + SWIG_Python_SetConstant(d, "PENALTY2",SWIG_From_int(static_cast< int >(PENALTY2))); + SWIG_Python_SetConstant(d, "FISTAMODE",SWIG_From_int(static_cast< int >(FISTAMODE))); + SWIG_Python_SetConstant(d, "L2",SWIG_From_int(static_cast< int >(L2))); + SWIG_Python_SetConstant(d, "L1L2",SWIG_From_int(static_cast< int >(L1L2))); + SWIG_Python_SetConstant(d, "L1L2FL",SWIG_From_int(static_cast< int >(L1L2FL))); + SWIG_Python_SetConstant(d, "L1L2MU",SWIG_From_int(static_cast< int >(L1L2MU))); #if PY_VERSION_HEX >= 0x03000000 return m; #else diff --git a/spams_wrap/spams_wrap.py b/spams_wrap/spams_wrap.py index 64a2743..118ce96 100644 --- a/spams_wrap/spams_wrap.py +++ b/spams_wrap/spams_wrap.py @@ -1,425 +1,319 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.8 +# This file was automatically generated by SWIG (https://www.swig.org). +# Version 4.2.0 # -# Do not make changes to this file unless you know what you are doing--modify +# Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. - """ This module gives access to some functions of the spams C++ library. The functions defined here should not be called directly. Use of spams functions should only be done through module spams. """ - -from sys import version_info -if version_info >= (2, 6, 0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module( - '_spams_wrap', [dirname(__file__)]) - except ImportError: - import _spams_wrap - return _spams_wrap - if fp is not None: - try: - _mod = imp.load_module( - '_spams_wrap', fp, pathname, description) - finally: - fp.close() - return _mod - _spams_wrap = swig_import_helper() - del swig_import_helper +from sys import version_info as _swig_python_version_info +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _spams_wrap else: import _spams_wrap -del version_info -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. - - -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if (name == "thisown"): - return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) - if (not static): - if _newclass: - object.__setattr__(self, name, value) - else: - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - - -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -def _swig_getattr_nondynamic(self, class_type, name, static=1): - if (name == "thisown"): - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - if (not static): - return object.__getattr__(self, name) - else: - raise AttributeError(name) - - -def _swig_getattr(self, class_type, name): - return _swig_getattr_nondynamic(self, class_type, name, 0) +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() - except Exception: + except __builtin__.Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) -try: - _object = object - _newclass = 1 -except AttributeError: - class _object: - pass - _newclass = 0 +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "this": + set(self, name, value) + elif name == "thisown": + self.this.own(value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr -def m_ones(nb): - return _spams_wrap.m_ones(nb) +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr -m_ones = _spams_wrap.m_ones +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper -def skip_space(s): - return _spams_wrap.skip_space(s) +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) -skip_space = _spams_wrap.skip_space +def m_ones(nb): + return _spams_wrap.m_ones(nb) + +def skip_space(s): + return _spams_wrap.skip_space(s) def parse_line(s, vresult): return _spams_wrap.parse_line(s, vresult) - -parse_line = _spams_wrap.parse_line - - def intlist(s): return _spams_wrap.intlist(s) - -intlist = _spams_wrap.intlist - - def sort(*args): - """ + r""" sort(Vector< double > * v, bool mode) sort(Vector< float > * v, bool mode) """ return _spams_wrap.sort(*args) - def mult(*args): - """ + r""" mult(Matrix< double > * X, Matrix< double > * Y, Matrix< double > * XY, bool const transX, bool const transY, double const a, double const b) mult(Matrix< float > * X, Matrix< float > * Y, Matrix< float > * XY, bool const transX, bool const transY, float const a, float const b) """ return _spams_wrap.mult(*args) - def AAt(*args): - """ + r""" AAt(SpMatrix< double > * A, Matrix< double > * B) AAt(SpMatrix< float > * A, Matrix< float > * B) """ return _spams_wrap.AAt(*args) - def XAt(*args): - """ + r""" XAt(SpMatrix< double > * A, Matrix< double > * X, Matrix< double > * XAt) XAt(SpMatrix< float > * A, Matrix< float > * X, Matrix< float > * XAt) """ return _spams_wrap.XAt(*args) - def applyBayerPattern(*args): - """ + r""" applyBayerPattern(Vector< double > * v, int offset) applyBayerPattern(Vector< float > * v, int offset) """ return _spams_wrap.applyBayerPattern(*args) - def conjugateGradient(*args): - """ + r""" conjugateGradient(Matrix< double > * A, Vector< double > * b, Vector< double > * x, double const tol, int const itermax) conjugateGradient(Matrix< float > * A, Vector< float > * b, Vector< float > * x, float const tol, int const itermax) """ return _spams_wrap.conjugateGradient(*args) - def invSym(*args): - """ + r""" invSym(Matrix< double > * A) invSym(Matrix< float > * A) """ return _spams_wrap.invSym(*args) - def normalize(*args): - """ + r""" normalize(Matrix< double > * A) normalize(Matrix< float > * A) """ return _spams_wrap.normalize(*args) - - -_spams_wrap.L1COEFFS_swigconstant(_spams_wrap) L1COEFFS = _spams_wrap.L1COEFFS - -_spams_wrap.L2ERROR_swigconstant(_spams_wrap) L2ERROR = _spams_wrap.L2ERROR - -_spams_wrap.PENALTY_swigconstant(_spams_wrap) PENALTY = _spams_wrap.PENALTY - -_spams_wrap.SPARSITY_swigconstant(_spams_wrap) SPARSITY = _spams_wrap.SPARSITY - -_spams_wrap.L2ERROR2_swigconstant(_spams_wrap) L2ERROR2 = _spams_wrap.L2ERROR2 - -_spams_wrap.PENALTY2_swigconstant(_spams_wrap) PENALTY2 = _spams_wrap.PENALTY2 - -_spams_wrap.FISTAMODE_swigconstant(_spams_wrap) FISTAMODE = _spams_wrap.FISTAMODE - def sparseProject(*args): - """ + r""" sparseProject(Matrix< double > * U, Matrix< double > * V, double const thrs, int const mode, double const lambda1, double const lambda2, double const lambda3, bool const pos, int const numThreads) sparseProject(Matrix< float > * U, Matrix< float > * V, float const thrs, int const mode, float const lambda1, float const lambda2, float const lambda3, bool const pos, int const numThreads) """ return _spams_wrap.sparseProject(*args) - def lassoD(*args): - """ + r""" lassoD(Matrix< double > * X, Matrix< double > * D, bool return_reg_path, int L, double const constraint, double const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< double > lassoD(Matrix< float > * X, Matrix< float > * D, bool return_reg_path, int L, float const constraint, float const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< float > * """ return _spams_wrap.lassoD(*args) - def lassoQq(*args): - """ + r""" lassoQq(Matrix< double > * X, Matrix< double > * Q, Matrix< double > * q, bool return_reg_path, int L, double const constraint, double const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< double > lassoQq(Matrix< float > * X, Matrix< float > * Q, Matrix< float > * q, bool return_reg_path, int L, float const constraint, float const lambda2, constraint_type mode, bool const pos, bool const ols, int const numThreads, int max_length_path, bool const verbose, bool cholevsky) -> SpMatrix< float > * """ return _spams_wrap.lassoQq(*args) - def lassoMask(*args): - """ + r""" lassoMask(Matrix< double > * X, Matrix< double > * D, Matrix< bool > * B, int L, double const constraint, double const lambda2, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< double > lassoMask(Matrix< float > * X, Matrix< float > * D, Matrix< bool > * B, int L, float const constraint, float const lambda2, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< float > * """ return _spams_wrap.lassoMask(*args) - def lassoWeighted(*args): - """ + r""" lassoWeighted(Matrix< double > * X, Matrix< double > * D, Matrix< double > * W, int L, double const constraint, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< double > lassoWeighted(Matrix< float > * X, Matrix< float > * D, Matrix< float > * W, int L, float const constraint, constraint_type mode, bool const pos, int const numThreads, bool verbose) -> SpMatrix< float > * """ return _spams_wrap.lassoWeighted(*args) - def omp(*args): - """ + r""" omp(Matrix< double > * X, Matrix< double > * D, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< double > * eps, bool given_Lambda, Vector< double > * Lambda, int const numThreads) -> SpMatrix< double > omp(Matrix< float > * X, Matrix< float > * D, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< float > * eps, bool given_Lambda, Vector< float > * Lambda, int const numThreads) -> SpMatrix< float > * """ return _spams_wrap.omp(*args) - def ompMask(*args): - """ + r""" ompMask(Matrix< double > * X, Matrix< double > * D, Matrix< bool > * B, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< double > * eps, bool given_Lambda, Vector< double > * Lambda, int const numThreads) -> SpMatrix< double > ompMask(Matrix< float > * X, Matrix< float > * D, Matrix< bool > * B, bool return_reg_path, bool given_L, Vector< int > * L, bool given_eps, Vector< float > * eps, bool given_Lambda, Vector< float > * Lambda, int const numThreads) -> SpMatrix< float > * """ return _spams_wrap.ompMask(*args) - def somp(*args): - """ + r""" somp(Matrix< double > * X, Matrix< double > * D, Vector< int > * groups, int LL, double eps, int numThreads) -> SpMatrix< double > somp(Matrix< float > * X, Matrix< float > * D, Vector< int > * groups, int LL, float eps, int numThreads) -> SpMatrix< float > * """ return _spams_wrap.somp(*args) - def cd(*args): - """ + r""" cd(Matrix< double > * X, Matrix< double > * D, SpMatrix< double > * alpha, double lambda1, constraint_type mode, int itermax, double tol, int numThreads) -> SpMatrix< double > cd(Matrix< float > * X, Matrix< float > * D, SpMatrix< float > * alpha, float lambda1, constraint_type mode, int itermax, float tol, int numThreads) -> SpMatrix< float > * """ return _spams_wrap.cd(*args) - def l1L2BCD(*args): - """ + r""" l1L2BCD(Matrix< double > * X, Matrix< double > * D, Matrix< double > * alpha0, Vector< int > * groups, double lambda1, constraint_type mode, int itermax, double tol, int numThreads) l1L2BCD(Matrix< float > * X, Matrix< float > * D, Matrix< float > * alpha0, Vector< int > * groups, float lambda1, constraint_type mode, int itermax, float tol, int numThreads) """ return _spams_wrap.l1L2BCD(*args) - - -_spams_wrap.L2_swigconstant(_spams_wrap) L2 = _spams_wrap.L2 - -_spams_wrap.L1L2_swigconstant(_spams_wrap) L1L2 = _spams_wrap.L1L2 - -_spams_wrap.L1L2FL_swigconstant(_spams_wrap) L1L2FL = _spams_wrap.L1L2FL - -_spams_wrap.L1L2MU_swigconstant(_spams_wrap) L1L2MU = _spams_wrap.L1L2MU - def alltrainDL(*args): - """ + r""" alltrainDL(Data< double > * X, bool in_memory, bool return_model, Matrix< double > * m_A, Matrix< double > * m_B, int m_iter, Matrix< double > * D1, Vector< double > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, double tol, bool fixed_step, bool ista, int batch_size, int K, double lambda1, double lambda2, double lambda3, int iter, double t0, constraint_type mode, char * name_regul, bool posAlpha, bool posD, bool expand, constraint_type_D modeD, bool whiten, bool clean, bool verbose, double gamma1, double gamma2, double rho, int iter_updateD, bool stochastic, int modeParam, bool batch, bool log, char * logName) -> Matrix< double > alltrainDL(Data< float > * X, bool in_memory, bool return_model, Matrix< float > * m_A, Matrix< float > * m_B, int m_iter, Matrix< float > * D1, Vector< float > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, float tol, bool fixed_step, bool ista, int batch_size, int K, double lambda1, double lambda2, double lambda3, int iter, double t0, constraint_type mode, char * name_regul, bool posAlpha, bool posD, bool expand, constraint_type_D modeD, bool whiten, bool clean, bool verbose, double gamma1, double gamma2, float rho, int iter_updateD, bool stochastic, int modeParam, bool batch, bool log, char * logName) -> Matrix< float > * """ return _spams_wrap.alltrainDL(*args) - def archetypalAnalysis(*args): - """ + r""" archetypalAnalysis(Matrix< double > * X, int p, bool robust, double epsilon, bool computeXtX, int stepsFISTA, int stepsAS, bool randominit, int numThreads) -> Matrix< double > archetypalAnalysis(Matrix< float > * X, int p, bool robust, float epsilon, bool computeXtX, int stepsFISTA, int stepsAS, bool randominit, int numThreads) -> Matrix< float > * """ return _spams_wrap.archetypalAnalysis(*args) - def archetypalAnalysisInit(*args): - """ + r""" archetypalAnalysisInit(Matrix< double > * X, Matrix< double > * Z0, bool robust, double epsilon, bool computeXtX, int stepsFISTA, int stepsAS, int numThreads) -> Matrix< double > archetypalAnalysisInit(Matrix< float > * X, Matrix< float > * Z0, bool robust, float epsilon, bool computeXtX, int stepsFISTA, int stepsAS, int numThreads) -> Matrix< float > * """ return _spams_wrap.archetypalAnalysisInit(*args) - def decompSimplex(*args): - """ + r""" decompSimplex(Matrix< double > * X, Matrix< double > * Z, bool computeXtX, int numThreads) -> SpMatrix< double > decompSimplex(Matrix< float > * X, Matrix< float > * Z, bool computeXtX, int numThreads) -> SpMatrix< float > * """ return _spams_wrap.decompSimplex(*args) - def fistaFlat(*args): - """ + r""" fistaFlat(Matrix< double > * X, AbstractMatrixB< double > * D, Matrix< double > * alpha0, Matrix< double > * alpha, Vector< int > * groups, int num_threads, int max_it, double L0, bool fixed_step, double gamma, double _lambda, double delta, double lambda2, double lambda3, double a, double b, double c, double tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< double > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< double > fistaFlat(Matrix< float > * X, AbstractMatrixB< float > * D, Matrix< float > * alpha0, Matrix< float > * alpha, Vector< int > * groups, int num_threads, int max_it, float L0, bool fixed_step, float gamma, float _lambda, float delta, float lambda2, float lambda3, float a, float b, float c, float tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< float > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< float > * """ return _spams_wrap.fistaFlat(*args) - def fistaTree(*args): - """ + r""" fistaTree(Matrix< double > * X, AbstractMatrixB< double > * D, Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, int max_it, double L0, bool fixed_step, double gamma, double _lambda, double delta, double lambda2, double lambda3, double a, double b, double c, double tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< double > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< double > fistaTree(Matrix< float > * X, AbstractMatrixB< float > * D, Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, int max_it, float L0, bool fixed_step, float gamma, float _lambda, float delta, float lambda2, float lambda3, float a, float b, float c, float tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< float > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< float > * """ return _spams_wrap.fistaTree(*args) - def fistaGraph(*args): - """ + r""" fistaGraph(Matrix< double > * X, AbstractMatrixB< double > * D, Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, int max_it, double L0, bool fixed_step, double gamma, double _lambda, double delta, double lambda2, double lambda3, double a, double b, double c, double tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< double > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< double > fistaGraph(Matrix< float > * X, AbstractMatrixB< float > * D, Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, int max_it, float L0, bool fixed_step, float gamma, float _lambda, float delta, float lambda2, float lambda3, float a, float b, float c, float tol, int it0, int max_iter_backtracking, bool compute_gram, bool lin_admm, bool admm, bool intercept, bool resetflow, char * name_regul, char * name_loss, bool verbose, bool pos, bool clever, bool log, bool ista, bool subgrad, char * logName, bool is_inner_weights, Vector< float > * inner_weights, int size_group, bool sqrt_step, bool transpose, int linesearch_mode) -> Matrix< float > * """ return _spams_wrap.fistaGraph(*args) - def proximalFlat(*args): - """ + r""" proximalFlat(Matrix< double > * alpha0, Matrix< double > * alpha, Vector< int > * groups, int num_threads, double lambda1, double lambda2, double lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< double > proximalFlat(Matrix< float > * alpha0, Matrix< float > * alpha, Vector< int > * groups, int num_threads, float lambda1, float lambda2, float lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< float > * """ return _spams_wrap.proximalFlat(*args) - def proximalTree(*args): - """ + r""" proximalTree(Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, double lambda1, double lambda2, double lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< double > proximalTree(Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, Vector< int > * own_variables, Vector< int > * N_own_variables, int num_threads, float lambda1, float lambda2, float lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< float > * """ return _spams_wrap.proximalTree(*args) - def proximalGraph(*args): - """ + r""" proximalGraph(Matrix< double > * alpha0, Matrix< double > * alpha, Vector< double > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, double lambda1, double lambda2, double lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< double > proximalGraph(Matrix< float > * alpha0, Matrix< float > * alpha, Vector< float > * eta_g, SpMatrix< bool > * groups, SpMatrix< bool > * groups_var, int num_threads, float lambda1, float lambda2, float lambda3, bool intercept, bool resetflow, char * name_regul, bool verbose, bool pos, bool clever, bool eval, int size_group, bool transpose) -> Vector< float > * """ return _spams_wrap.proximalGraph(*args) - def simpleGroupTree(degr): - """simpleGroupTree(int * degr) -> std::vector< StructNodeElem< double > * > *""" + r"""simpleGroupTree(int * degr) -> std::vector< StructNodeElem< double > * > *""" return _spams_wrap.simpleGroupTree(degr) - def readGroupStruct(file): - """readGroupStruct(char const * file) -> std::vector< StructNodeElem< double > * > *""" + r"""readGroupStruct(char const * file) -> std::vector< StructNodeElem< double > * > *""" return _spams_wrap.readGroupStruct(file) - def groupStructOfString(data): - """groupStructOfString(char const * data) -> std::vector< StructNodeElem< double > * > *""" + r"""groupStructOfString(char const * data) -> std::vector< StructNodeElem< double > * > *""" return _spams_wrap.groupStructOfString(data) - def graphOfGroupStruct(*args): - """ + r""" graphOfGroupStruct(std::vector< StructNodeElem< double > * > * gstruct) -> Vector< double > graphOfGroupStruct(std::vector< StructNodeElem< float > * > * gstruct) -> Vector< float > * """ return _spams_wrap.graphOfGroupStruct(*args) - def treeOfGroupStruct(*args): - """ + r""" treeOfGroupStruct(std::vector< StructNodeElem< double > * > * gstruct) -> int treeOfGroupStruct(std::vector< StructNodeElem< float > * > * gstruct, Vector< float > ** peta_g) -> int """ return _spams_wrap.treeOfGroupStruct(*args) - def im2col_sliding(*args): - """ + r""" im2col_sliding(Matrix< double > * A, Matrix< double > * B, int m, int n, bool RGB) im2col_sliding(Matrix< float > * A, Matrix< float > * B, int m, int n, bool RGB) """ return _spams_wrap.im2col_sliding(*args) -# This file is compatible with both classic and new-style classes. +