/* Generated by Cython 0.28.5 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "metaphor.monal.driver._driver",
        "sources": [
            "metaphor/monal/driver/_driver.py"
        ]
    },
    "module_name": "metaphor.monal.driver._driver"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_28_5"
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0; // PyThread_create_key reports success always
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif // TSS (Thread Specific Storage) API
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
  #define PyObject_Unicode             PyObject_Str
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__metaphor__monal__driver___driver
#define __PYX_HAVE_API__metaphor__monal__driver___driver
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "metaphor/monal/driver/_driver.py",
};

/*--- Type declarations ---*/
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults2;
typedef struct __pyx_defaults2 __pyx_defaults2;
struct __pyx_defaults3;
typedef struct __pyx_defaults3 __pyx_defaults3;
struct __pyx_defaults4;
typedef struct __pyx_defaults4 __pyx_defaults4;
struct __pyx_defaults5;
typedef struct __pyx_defaults5 __pyx_defaults5;
struct __pyx_defaults6;
typedef struct __pyx_defaults6 __pyx_defaults6;
struct __pyx_defaults7;
typedef struct __pyx_defaults7 __pyx_defaults7;
struct __pyx_defaults8;
typedef struct __pyx_defaults8 __pyx_defaults8;
struct __pyx_defaults9;
typedef struct __pyx_defaults9 __pyx_defaults9;
struct __pyx_defaults10;
typedef struct __pyx_defaults10 __pyx_defaults10;
struct __pyx_defaults11;
typedef struct __pyx_defaults11 __pyx_defaults11;
struct __pyx_defaults {
  PyObject *__pyx_arg_keep0;
};
struct __pyx_defaults1 {
  PyObject *__pyx_arg_method;
};
struct __pyx_defaults2 {
  PyObject *__pyx_arg_savingformat;
};
struct __pyx_defaults3 {
  PyObject *__pyx_arg_savingformat;
};
struct __pyx_defaults4 {
  PyObject *__pyx_arg_computelevel;
};
struct __pyx_defaults5 {
  PyObject *__pyx_arg_computelevel;
};
struct __pyx_defaults6 {
  PyObject *__pyx_arg_computelevel;
};
struct __pyx_defaults7 {
  PyObject *__pyx_arg_criterion;
};
struct __pyx_defaults8 {
  PyObject *__pyx_arg_style;
};
struct __pyx_defaults9 {
  PyObject *__pyx_arg_style;
};
struct __pyx_defaults10 {
  PyObject *__pyx_arg_savingformat;
};
struct __pyx_defaults11 {
  PyObject *__pyx_arg_savingformat;
};

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
    PyObject_RichCompare(op1, op2, Py_EQ)
    #endif

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_TrueDivideObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'metaphor.monal.driver._driver' */
#define __Pyx_MODULE_NAME "metaphor.monal.driver._driver"
extern int __pyx_module_is_main_metaphor__monal__driver___driver;
int __pyx_module_is_main_metaphor__monal__driver___driver = 0;

/* Implementation of 'metaphor.monal.driver._driver' */
static PyObject *__pyx_builtin_RuntimeWarning;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_min;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_0[] = "#{0}\n";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_N[] = "N_{}";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_q[] = "q";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_CC[] = "CC";
static const char __pyx_k_CG[] = "CG";
static const char __pyx_k_LM[] = "LM";
static const char __pyx_k_Nf[] = "Nf";
static const char __pyx_k_Ng[] = "Ng";
static const char __pyx_k_Pi[] = "Pi";
static const char __pyx_k__2[] = "";
static const char __pyx_k__6[] = ",";
static const char __pyx_k__9[] = ";";
static const char __pyx_k_ff[] = "ff";
static const char __pyx_k_hh[] = "hh";
static const char __pyx_k_i1[] = "i1";
static const char __pyx_k_i2[] = "i2";
static const char __pyx_k_ic[] = "ic";
static const char __pyx_k_il[] = "il";
static const char __pyx_k_ls[] = "ls";
static const char __pyx_k_mu[] = "mu";
static const char __pyx_k_nd[] = "nd";
static const char __pyx_k_ni[] = "ni";
static const char __pyx_k_nm[] = "nm";
static const char __pyx_k_nn[] = "nn";
static const char __pyx_k_no[] = "no";
static const char __pyx_k_ns[] = "ns";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_rr[] = "rr";
static const char __pyx_k_sp[] = "sp";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_tb[] = "tb";
static const char __pyx_k_tf[] = "tf";
static const char __pyx_k_tg[] = "tg";
static const char __pyx_k_ww[] = "ww";
static const char __pyx_k_0_1[] = "{0}=\"{1}\"";
static const char __pyx_k_0_2[] = "{0}";
static const char __pyx_k_0_c[] = "{0}.c";
static const char __pyx_k_CIm[] = "CIm";
static const char __pyx_k_CIp[] = "CIp";
static const char __pyx_k_N_2[] = "N";
static const char __pyx_k_NaN[] = "NaN";
static const char __pyx_k_PY2[] = "PY2";
static const char __pyx_k_SPX[] = "SPX";
static const char __pyx_k__15[] = "#";
static const char __pyx_k__20[] = "=";
static const char __pyx_k__42[] = "{}\n";
static const char __pyx_k_acc[] = "acc";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_cov[] = "cov";
static const char __pyx_k_cst[] = "cst";
static const char __pyx_k_csv[] = "csv";
static const char __pyx_k_cur[] = "cur";
static const char __pyx_k_dat[] = "dat";
static const char __pyx_k_del[] = "__del__";
static const char __pyx_k_dim[] = "dim";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_dot[] = "dot";
static const char __pyx_k_env[] = "env";
static const char __pyx_k_err[] = "err";
static const char __pyx_k_fct[] = "fct";
static const char __pyx_k_fix[] = "fix";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_ier[] = "ier";
static const char __pyx_k_ind[] = "ind";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_kwd[] = "kwd";
static const char __pyx_k_lev[] = "lev";
static const char __pyx_k_lib[] = "lib";
static const char __pyx_k_lst[] = "lst";
static const char __pyx_k_m_d[] = "m%d_";
static const char __pyx_k_mat[] = "mat";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_mem[] = "mem";
static const char __pyx_k_met[] = "_met";
static const char __pyx_k_min[] = "min";
static const char __pyx_k_mtb[] = "mtb";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_rnd[] = "rnd";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_std[] = "std";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_tab[] = "_tab";
static const char __pyx_k_use[] = "use";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_vec[] = "vec";
static const char __pyx_k_xml[] = "xml";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_BFGS[] = "BFGS";
static const char __pyx_k_Bopt[] = "Bopt";
static const char __pyx_k_Dfun[] = "Dfun";
static const char __pyx_k_TANH[] = "TANH";
static const char __pyx_k__148[] = "\t";
static const char __pyx_k__150[] = "\n";
static const char __pyx_k__155[] = "*";
static const char __pyx_k__173[] = "_";
static const char __pyx_k_algo[] = "algo";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_attr[] = "attr";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_back[] = "back";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_best[] = "best";
static const char __pyx_k_bias[] = "bias";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_cond[] = "cond";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_cost[] = "cost";
static const char __pyx_k_curw[] = "curw";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_disp[] = "disp";
static const char __pyx_k_doit[] = "doit";
static const char __pyx_k_done[] = "done";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_fill[] = "fill";
static const char __pyx_k_find[] = "find";
static const char __pyx_k_flat[] = "flat";
static const char __pyx_k_fmin[] = "fmin";
static const char __pyx_k_fopt[] = "fopt";
static const char __pyx_k_fsum[] = "fsum";
static const char __pyx_k_full[] = "full";
static const char __pyx_k_fvec[] = "fvec";
static const char __pyx_k_gopt[] = "gopt";
static const char __pyx_k_grad[] = "grad";
static const char __pyx_k_hasw[] = "hasw";
static const char __pyx_k_imax[] = "imax";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_kwds[] = "kwds";
static const char __pyx_k_levs[] = "levs";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_llst[] = "llst";
static const char __pyx_k_load[] = "load";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mark[] = "mark";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_maxi[] = "_maxi";
static const char __pyx_k_mean[] = "mean";
static const char __pyx_k_memw[] = "memw";
static const char __pyx_k_mesg[] = "mesg";
static const char __pyx_k_mess[] = "mess";
static const char __pyx_k_mini[] = "_mini";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_mu_2[] = "_mu";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_ndim[] = "ndim";
static const char __pyx_k_nfev[] = "nfev";
static const char __pyx_k_nntb[] = "nntb";
static const char __pyx_k_node[] = "node";
static const char __pyx_k_norm[] = "norm";
static const char __pyx_k_ones[] = "ones";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_outs[] = "outs";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_popt[] = "popt";
static const char __pyx_k_rank[] = "_rank";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_res0[] = "res0";
static const char __pyx_k_res2[] = "res2";
static const char __pyx_k_root[] = "root";
static const char __pyx_k_seed[] = "seed";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_sing[] = "sing";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_sqrt[] = "sqrt";
static const char __pyx_k_stds[] = "stds";
static const char __pyx_k_test[] = "test";
static const char __pyx_k_text[] = "text";
static const char __pyx_k_util[] = "util";
static const char __pyx_k_0_1_2[] = " {0}=\"{1}\"";
static const char __pyx_k_LM_NT[] = "LM_NT";
static const char __pyx_k_MODEL[] = "MODEL";
static const char __pyx_k_Model[] = "Model";
static const char __pyx_k_ORDER[] = "ORDER";
static const char __pyx_k_Sigma[] = "Sigma";
static const char __pyx_k_appli[] = "appli";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_bests[] = "bests";
static const char __pyx_k_bias0[] = "bias0";
static const char __pyx_k_chdir[] = "chdir";
static const char __pyx_k_class[] = "class";
static const char __pyx_k_clist[] = "clist";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_cost2[] = "cost2";
static const char __pyx_k_costD[] = "costD";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_cumul[] = "cumul";
static const char __pyx_k_debug[] = "debug";
static const char __pyx_k_decal[] = "decal";
static const char __pyx_k_delta[] = "delta";
static const char __pyx_k_doSum[] = "doSum";
static const char __pyx_k_doset[] = "doset";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_fcost[] = "fcost";
static const char __pyx_k_fixed[] = "fixed";
static const char __pyx_k_flist[] = "flist";
static const char __pyx_k_floor[] = "floor";
static const char __pyx_k_fname[] = "fname";
static const char __pyx_k_grads[] = "grads";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_input[] = "input";
static const char __pyx_k_isFix[] = "isFix";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_jacob[] = "jacob";
static const char __pyx_k_keep0[] = "keep0";
static const char __pyx_k_lcode[] = "lcode";
static const char __pyx_k_level[] = "level";
static const char __pyx_k_loads[] = "loads";
static const char __pyx_k_local[] = "local";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_model[] = "model";
static const char __pyx_k_nodes[] = "nodes";
static const char __pyx_k_npint[] = "npint";
static const char __pyx_k_npsum[] = "npsum";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_oname[] = "oname";
static const char __pyx_k_order[] = "order";
static const char __pyx_k_owner[] = "owner";
static const char __pyx_k_param[] = "param";
static const char __pyx_k_parse[] = "parse";
static const char __pyx_k_pname[] = "pname";
static const char __pyx_k_press[] = "press";
static const char __pyx_k_prime[] = "prime";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_quiet[] = "quiet";
static const char __pyx_k_randn[] = "randn";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_scale[] = "scale";
static const char __pyx_k_scipy[] = "scipy";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_shift[] = "shift";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_stval[] = "stval";
static const char __pyx_k_style[] = "style";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_trace[] = "trace";
static const char __pyx_k_train[] = "train";
static const char __pyx_k_utils[] = "utils";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_wname[] = "wname";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_wused[] = "wused";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_Driver[] = "Driver";
static const char __pyx_k_InNorm[] = "InNorm";
static const char __pyx_k_SF_DLL[] = "SF_DLL";
static const char __pyx_k_SF_XML[] = "SF_XML";
static const char __pyx_k_TCR_MU[] = "TCR_MU";
static const char __pyx_k_TCR_R2[] = "TCR_R2";
static const char __pyx_k_absorb[] = "absorb";
static const char __pyx_k_action[] = "action";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_argmax[] = "argmax";
static const char __pyx_k_assign[] = "assign";
static const char __pyx_k_astype[] = "astype";
static const char __pyx_k_attrib[] = "attrib";
static const char __pyx_k_chrono[] = "_chrono";
static const char __pyx_k_copyTo[] = "copyTo";
static const char __pyx_k_correl[] = "correl";
static const char __pyx_k_costNT[] = "costNT";
static const char __pyx_k_derive[] = "derive";
static const char __pyx_k_direct[] = "direct";
static const char __pyx_k_donorm[] = "donorm";
static const char __pyx_k_dosave[] = "dosave";
static const char __pyx_k_double[] = "double";
static const char __pyx_k_eigval[] = "eigval";
static const char __pyx_k_epochs[] = "epochs";
static const char __pyx_k_exists[] = "exists";
static const char __pyx_k_extfmt[] = "extfmt";
static const char __pyx_k_factor[] = "factor";
static const char __pyx_k_file_2[] = "__file__";
static const char __pyx_k_follow[] = "follow";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_fprime[] = "fprime";
static const char __pyx_k_freedm[] = "freedm";
static const char __pyx_k_getcwd[] = "getcwd";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_ignore[] = "ignore";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_indata[] = "indata";
static const char __pyx_k_indloc[] = "indloc";
static const char __pyx_k_ingrad[] = "ingrad";
static const char __pyx_k_inivec[] = "inivec";
static const char __pyx_k_inname[] = "inname";
static const char __pyx_k_innode[] = "innode";
static const char __pyx_k_innorm[] = "innorm";
static const char __pyx_k_inputs[] = "inputs";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_linear[] = "linear";
static const char __pyx_k_locrow[] = "locrow";
static const char __pyx_k_master[] = "master";
static const char __pyx_k_matlin[] = "matlin";
static const char __pyx_k_maxfev[] = "maxfev";
static const char __pyx_k_method[] = "method";
static const char __pyx_k_mode_2[] = "_mode";
static const char __pyx_k_models[] = "models";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_npcopy[] = "npcopy";
static const char __pyx_k_outlev[] = "outlev";
static const char __pyx_k_output[] = "output";
static const char __pyx_k_params[] = "params";
static const char __pyx_k_pcount[] = "pcount";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_prime2[] = "prime2";
static const char __pyx_k_rank_2[] = "rank";
static const char __pyx_k_reduce[] = "reduce";
static const char __pyx_k_resloc[] = "resloc";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_resvec[] = "resvec";
static const char __pyx_k_setter[] = "setter";
static const char __pyx_k_smiles[] = "smiles";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_startw[] = "startw";
static const char __pyx_k_stddev[] = "stddev";
static const char __pyx_k_stderr[] = "stderr";
static const char __pyx_k_style0[] = "style0";
static const char __pyx_k_subkey[] = "subkey";
static const char __pyx_k_subval[] = "subval";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_test_2[] = "__test__";
static const char __pyx_k_titles[] = "titles";
static const char __pyx_k_valloc[] = "valloc";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_vclass[] = "vclass";
static const char __pyx_k_weight[] = "weight";
static const char __pyx_k_withCI[] = "withCI";
static const char __pyx_k_0_dll_c[] = "{0}dll.c";
static const char __pyx_k_BFGS_NT[] = "BFGS_NT";
static const char __pyx_k_ID_DIFF[] = "ID_DIFF";
static const char __pyx_k_IOError[] = "IOError";
static const char __pyx_k_LS_FIXE[] = "LS_FIXE";
static const char __pyx_k_Network[] = "Network";
static const char __pyx_k_NpzFile[] = "NpzFile";
static const char __pyx_k_OKScipy[] = "OKScipy";
static const char __pyx_k_OutNorm[] = "OutNorm";
static const char __pyx_k_Polynom[] = "Polynom";
static const char __pyx_k_SF_JSON[] = "SF_JSON";
static const char __pyx_k_SaveDir[] = "SaveDir";
static const char __pyx_k_TFR_STD[] = "TFR_STD";
static const char __pyx_k_allvecs[] = "allvecs";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_baselen[] = "baselen";
static const char __pyx_k_cPickle[] = "cPickle";
static const char __pyx_k_class_2[] = "__class__";
static const char __pyx_k_classif[] = "classif";
static const char __pyx_k_count_0[] = "count={0}\n";
static const char __pyx_k_count_2[] = "count={}\n";
static const char __pyx_k_created[] = "created";
static const char __pyx_k_curdisp[] = "curdisp";
static const char __pyx_k_dataset[] = "dataset";
static const char __pyx_k_deltash[] = "deltash";
static const char __pyx_k_dirname[] = "dirname";
static const char __pyx_k_disploc[] = "disploc";
static const char __pyx_k_doprint[] = "doprint";
static const char __pyx_k_element[] = "element";
static const char __pyx_k_exports[] = "exports";
static const char __pyx_k_fillstr[] = "fillstr";
static const char __pyx_k_float64[] = "float64";
static const char __pyx_k_floatEx[] = "floatEx";
static const char __pyx_k_fmin_cg[] = "fmin_cg";
static const char __pyx_k_getCost[] = "getCost";
static const char __pyx_k_getcost[] = "getcost";
static const char __pyx_k_getdata[] = "getdata";
static const char __pyx_k_getinfo[] = "getinfo";
static const char __pyx_k_getnorm[] = "getnorm";
static const char __pyx_k_getroot[] = "getroot";
static const char __pyx_k_gradloc[] = "gradloc";
static const char __pyx_k_gradval[] = "gradval";
static const char __pyx_k_hessian[] = "_hessian";
static const char __pyx_k_inNames[] = "inNames";
static const char __pyx_k_include[] = "include";
static const char __pyx_k_ingrads[] = "ingrads";
static const char __pyx_k_leastsq[] = "leastsq";
static const char __pyx_k_libname[] = "libname";
static const char __pyx_k_maximum[] = "maximum";
static const char __pyx_k_maxiter[] = "maxiter";
static const char __pyx_k_memdisp[] = "memdisp";
static const char __pyx_k_minimum[] = "minimum";
static const char __pyx_k_nbmulti[] = "nbmulti";
static const char __pyx_k_ndarray[] = "ndarray";
static const char __pyx_k_newaxis[] = "newaxis";
static const char __pyx_k_outCost[] = "outCost";
static const char __pyx_k_outlevs[] = "outlevs";
static const char __pyx_k_outnode[] = "outnode";
static const char __pyx_k_outnorm[] = "outnorm";
static const char __pyx_k_outproc[] = "outproc";
static const char __pyx_k_outputs[] = "outputs";
static const char __pyx_k_package[] = "package";
static const char __pyx_k_pathmem[] = "pathmem";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_print_2[] = "print_";
static const char __pyx_k_putnorm[] = "putnorm";
static const char __pyx_k_reprlst[] = "reprlst";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_results[] = "results";
static const char __pyx_k_reverse[] = "reverse";
static const char __pyx_k_rootdic[] = "rootdic";
static const char __pyx_k_saveDir[] = "_saveDir";
static const char __pyx_k_saveObj[] = "saveObj";
static const char __pyx_k_savedir[] = "savedir";
static const char __pyx_k_setnorm[] = "setnorm";
static const char __pyx_k_special[] = "special";
static const char __pyx_k_squeeze[] = "squeeze";
static const char __pyx_k_st_REAL[] = "st_REAL";
static const char __pyx_k_stdtrit[] = "stdtrit";
static const char __pyx_k_student[] = "student";
static const char __pyx_k_tagname[] = "_tagname";
static const char __pyx_k_targets[] = "targets";
static const char __pyx_k_tempdir[] = "tempdir";
static const char __pyx_k_toolbox[] = "toolbox";
static const char __pyx_k_trainex[] = "trainex";
static const char __pyx_k_valelmt[] = "valelmt";
static const char __pyx_k_valueid[] = "valueid";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_version[] = "_version";
static const char __pyx_k_weights[] = "weights";
static const char __pyx_k_wformat[] = "wformat";
static const char __pyx_k_withlev[] = "withlev";
static const char __pyx_k_xmlText[] = "_xmlText";
static const char __pyx_k_0_18_15g[] = "{0:18.15g}\n";
static const char __pyx_k_DEBUGDLL[] = "DEBUGDLL";
static const char __pyx_k_KT_AFTER[] = "KT_AFTER";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_Property[] = "Property";
static const char __pyx_k_SF_ASCII[] = "SF_ASCII";
static const char __pyx_k_SF_CCODE[] = "SF_CCODE";
static const char __pyx_k_TCR_COST[] = "TCR_COST";
static const char __pyx_k_TCR_SHII[] = "TCR_SHII";
static const char __pyx_k_absolute[] = "absolute";
static const char __pyx_k_asmatrix[] = "asmatrix";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_bestList[] = "_bestList";
static const char __pyx_k_builtins[] = "__builtins__";
static const char __pyx_k_callback[] = "_callback";
static const char __pyx_k_category[] = "category";
static const char __pyx_k_chrono_2[] = "chrono";
static const char __pyx_k_codelist[] = "codelist";
static const char __pyx_k_compiler[] = "compiler";
static const char __pyx_k_const_st[] = "const_st";
static const char __pyx_k_corrcoef[] = "corrcoef";
static const char __pyx_k_deltares[] = "deltares";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_forcelib[] = "forcelib";
static const char __pyx_k_funcalls[] = "funcalls";
static const char __pyx_k_getPRESS[] = "getPRESS";
static const char __pyx_k_getPrime[] = "getPrime";
static const char __pyx_k_getnames[] = "getnames";
static const char __pyx_k_getpress[] = "getpress";
static const char __pyx_k_getprime[] = "getprime";
static const char __pyx_k_getwused[] = "getwused";
static const char __pyx_k_givetime[] = "givetime";
static const char __pyx_k_gradient[] = "gradient";
static const char __pyx_k_identity[] = "identity";
static const char __pyx_k_infodict[] = "infodict";
static const char __pyx_k_inivalue[] = "inivalue";
static const char __pyx_k_inputDim[] = "inputDim";
static const char __pyx_k_inputini[] = "inputini";
static const char __pyx_k_isLinear[] = "isLinear";
static const char __pyx_k_isStrNum[] = "isStrNum";
static const char __pyx_k_isscalar[] = "isscalar";
static const char __pyx_k_jacobian[] = "_jacobian";
static const char __pyx_k_keeptemp[] = "keeptemp";
static const char __pyx_k_leverage[] = "leverage";
static const char __pyx_k_locallst[] = "locallst";
static const char __pyx_k_mainfile[] = "mainfile";
static const char __pyx_k_maxindex[] = "maxindex";
static const char __pyx_k_metaphor[] = "metaphor";
static const char __pyx_k_normgrad[] = "normgrad";
static const char __pyx_k_normnode[] = "normnode";
static const char __pyx_k_npdouble[] = "npdouble";
static const char __pyx_k_optimize[] = "optimize";
static const char __pyx_k_original[] = "original";
static const char __pyx_k_outIndex[] = "outIndex";
static const char __pyx_k_outNames[] = "outNames";
static const char __pyx_k_outindex[] = "outindex";
static const char __pyx_k_polyType[] = "polyType";
static const char __pyx_k_polytype[] = "polytype";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_residual[] = "residual";
static const char __pyx_k_restable[] = "restable";
static const char __pyx_k_singular[] = "singular";
static const char __pyx_k_stddev_2[] = "stddev\n";
static const char __pyx_k_stdtrain[] = "_stdtrain";
static const char __pyx_k_students[] = "students";
static const char __pyx_k_stylePos[] = "stylePos";
static const char __pyx_k_tempfile[] = "tempfile";
static const char __pyx_k_transfer[] = "transfer";
static const char __pyx_k_trueName[] = "trueName";
static const char __pyx_k_vecPrime[] = "vecPrime";
static const char __pyx_k_warnflag[] = "warnflag";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_BSweights[] = "BSweights";
static const char __pyx_k_Component[] = "Component";
static const char __pyx_k_DIMENSION[] = "DIMENSION";
static const char __pyx_k_Jacobian2[] = "Jacobian2";
static const char __pyx_k_KT_BEFORE[] = "KT_BEFORE";
static const char __pyx_k_LEV_EARLY[] = "LEV_EARLY";
static const char __pyx_k_NMLstring[] = "NMLstring";
static const char __pyx_k_SF_BINARY[] = "SF_BINARY";
static const char __pyx_k_TCR_COUNT[] = "TCR_COUNT";
static const char __pyx_k_TCR_PRESS[] = "TCR_PRESS";
static const char __pyx_k_TCR_TRACE[] = "TCR_TRACE";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_activfunc[] = "activfunc";
static const char __pyx_k_baselen_2[] = "_baselen";
static const char __pyx_k_baselen_3[] = "baselen\n";
static const char __pyx_k_codeconst[] = "codeconst";
static const char __pyx_k_criterion[] = "criterion";
static const char __pyx_k_dataArray[] = "_dataArray";
static const char __pyx_k_dataCount[] = "dataCount";
static const char __pyx_k_dataWidth[] = "dataWidth";
static const char __pyx_k_dataindex[] = "dataindex";
static const char __pyx_k_datastyle[] = "datastyle";
static const char __pyx_k_dimension[] = "dimension";
static const char __pyx_k_downLinks[] = "downLinks";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_expandvec[] = "_expandvec";
static const char __pyx_k_extraVLOO[] = "_extraVLOO";
static const char __pyx_k_fmin_bfgs[] = "fmin_bfgs";
static const char __pyx_k_functools[] = "functools";
static const char __pyx_k_getparams[] = "getparams";
static const char __pyx_k_getstddev[] = "getstddev";
static const char __pyx_k_gradvalue[] = "gradvalue";
static const char __pyx_k_hessian_2[] = "hessian";
static const char __pyx_k_importXML[] = "importXML";
static const char __pyx_k_ingradval[] = "ingradval";
static const char __pyx_k_initcount[] = "initcount";
static const char __pyx_k_inputNorm[] = "inputNorm";
static const char __pyx_k_inputnorm[] = "inputnorm";
static const char __pyx_k_inputsloc[] = "inputsloc";
static const char __pyx_k_jacobians[] = "jacobians";
static const char __pyx_k_lasterror[] = "lasterror";
static const char __pyx_k_lengetter[] = "lengetter";
static const char __pyx_k_lensetter[] = "lensetter";
static const char __pyx_k_leverages[] = "_leverages";
static const char __pyx_k_maimModel[] = "maimModel";
static const char __pyx_k_mainModel[] = "mainModel";
static const char __pyx_k_maxcorrel[] = "maxcorrel";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_modelData[] = "modelData";
static const char __pyx_k_modelName[] = "modelName";
static const char __pyx_k_modelType[] = "modelType : {}";
static const char __pyx_k_modeldata[] = "modeldata";
static const char __pyx_k_modelname[] = "modelname";
static const char __pyx_k_monalfile[] = "monalfile";
static const char __pyx_k_newinputs[] = "newinputs";
static const char __pyx_k_nntoolbox[] = "nntoolbox";
static const char __pyx_k_normalize[] = "normalize";
static const char __pyx_k_normnodes[] = "normnodes";
static const char __pyx_k_nosynapse[] = "nosynapse";
static const char __pyx_k_npfloat64[] = "npfloat64";
static const char __pyx_k_optimizer[] = "_optimizer";
static const char __pyx_k_outResult[] = "outResult";
static const char __pyx_k_outnorm_2[] = "outnorm\n";
static const char __pyx_k_outputs_2[] = "_outputs";
static const char __pyx_k_paramList[] = "paramList";
static const char __pyx_k_propagate[] = "propagate";
static const char __pyx_k_readlines[] = "readlines";
static const char __pyx_k_reducevec[] = "_reducevec";
static const char __pyx_k_residuals[] = "residuals";
static const char __pyx_k_saveDir_2[] = "saveDir";
static const char __pyx_k_saveModel[] = "saveModel";
static const char __pyx_k_setaction[] = "_setaction";
static const char __pyx_k_setivalue[] = "setivalue";
static const char __pyx_k_setparams[] = "setparams";
static const char __pyx_k_setstddev[] = "setstddev";
static const char __pyx_k_signature[] = "signature";
static const char __pyx_k_student95[] = "student95";
static const char __pyx_k_text_type[] = "text_type";
static const char __pyx_k_toFullXML[] = "toFullXML";
static const char __pyx_k_trainable[] = "trainable";
static const char __pyx_k_trainbase[] = "trainbase";
static const char __pyx_k_weightloc[] = "weightloc";
static const char __pyx_k_weights_2[] = "_weights";
static const char __pyx_k_weights_3[] = "weights\n";
static const char __pyx_k_0_1_18_15g[] = "{0};{1:18.15g}\n";
static const char __pyx_k_DriverBase[] = "DriverBase";
static const char __pyx_k_ID_COMPUTE[] = "ID_COMPUTE";
static const char __pyx_k_LEV_METHOD[] = "LEV_METHOD";
static const char __pyx_k_LOOweights[] = "LOOweights";
static const char __pyx_k_MonalError[] = "MonalError";
static const char __pyx_k_Multimodel[] = "Multimodel";
static const char __pyx_k_Normalizer[] = "Normalizer";
static const char __pyx_k_OutputProc[] = "OutputProc";
static const char __pyx_k_Properties[] = "Properties";
static const char __pyx_k_PyCodeList[] = "PyCodeList";
static const char __pyx_k_RealVector[] = "RealVector";
static const char __pyx_k_SF_CPYTHON[] = "SF_CPYTHON";
static const char __pyx_k_TCR_CORREL[] = "TCR_CORREL";
static const char __pyx_k_TCR_EPOCHS[] = "TCR_EPOCHS";
static const char __pyx_k_TCR_HIDDEN[] = "TCR_HIDDEN";
static const char __pyx_k_activation[] = "activation";
static const char __pyx_k_addComment[] = "addComment";
static const char __pyx_k_appdatadir[] = "appdatadir";
static const char __pyx_k_biasBaseId[] = "biasBaseId";
static const char __pyx_k_callback_2[] = "callback";
static const char __pyx_k_checkModel[] = "checkModel";
static const char __pyx_k_codeWriter[] = "codeWriter";
static const char __pyx_k_correlflat[] = "correlflat";
static const char __pyx_k_createLink[] = "createLink";
static const char __pyx_k_curWeights[] = "curWeights";
static const char __pyx_k_curweights[] = "curweights";
static const char __pyx_k_dataformat[] = "dataformat";
static const char __pyx_k_datasource[] = "datasource";
static const char __pyx_k_dispersion[] = "dispersion";
static const char __pyx_k_extraCount[] = "extraCount : {}";
static const char __pyx_k_fromstring[] = "fromstring";
static const char __pyx_k_fullinputs[] = "fullinputs";
static const char __pyx_k_getResults[] = "getResults";
static const char __pyx_k_getTempDir[] = "getTempDir";
static const char __pyx_k_getbaselen[] = "getbaselen";
static const char __pyx_k_getfreedom[] = "getfreedom";
static const char __pyx_k_gettargets[] = "gettargets";
static const char __pyx_k_gradient_2[] = "_gradient";
static const char __pyx_k_inputArray[] = "_inputArray";
static const char __pyx_k_inputCount[] = "inputCount";
static const char __pyx_k_inputNames[] = "inputNames";
static const char __pyx_k_inputNodes[] = "inputNodes";
static const char __pyx_k_inputnames[] = "inputnames";
static const char __pyx_k_integrated[] = "integrated";
static const char __pyx_k_isParallel[] = "isParallel";
static const char __pyx_k_is_windows[] = "is_windows";
static const char __pyx_k_jacobian_2[] = "jacobian";
static const char __pyx_k_lastaction[] = "_lastaction";
static const char __pyx_k_lastoutput[] = "lastoutput";
static const char __pyx_k_layerCount[] = "layerCount";
static const char __pyx_k_linksCount[] = "linksCount";
static const char __pyx_k_meancorrel[] = "meancorrel";
static const char __pyx_k_memweights[] = "memweights";
static const char __pyx_k_modelCount[] = "modelCount";
static const char __pyx_k_modelindex[] = "modelindex";
static const char __pyx_k_moduleName[] = "moduleName";
static const char __pyx_k_modulename[] = "modulename";
static const char __pyx_k_moduletype[] = "moduletype";
static const char __pyx_k_monalconst[] = "monalconst";
static const char __pyx_k_multitrain[] = "multitrain";
static const char __pyx_k_optim_bfgs[] = "optim_bfgs";
static const char __pyx_k_outputNorm[] = "outputNorm";
static const char __pyx_k_outputnorm[] = "outputnorm";
static const char __pyx_k_outputsicm[] = "outputsicm";
static const char __pyx_k_outputsicp[] = "outputsicp";
static const char __pyx_k_paramCount[] = "paramCount";
static const char __pyx_k_paramNames[] = "paramNames";
static const char __pyx_k_parameters[] = "parameters";
static const char __pyx_k_paramnames[] = "paramnames";
static const char __pyx_k_residuals2[] = "residuals2";
static const char __pyx_k_sdataCount[] = "sdataCount";
static const char __pyx_k_setWeights[] = "setWeights";
static const char __pyx_k_setbaselen[] = "setbaselen";
static const char __pyx_k_settargets[] = "settargets";
static const char __pyx_k_sourceopen[] = "sourceopen";
static const char __pyx_k_splitModel[] = "splitModel";
static const char __pyx_k_splitlines[] = "splitlines";
static const char __pyx_k_st_WEIGHTS[] = "st_WEIGHTS";
static const char __pyx_k_st_version[] = "st_version";
static const char __pyx_k_statelayer[] = "statelayer";
static const char __pyx_k_stdtrain_2[] = "stdtrain";
static const char __pyx_k_trainstyle[] = "trainstyle";
static const char __pyx_k_transferCI[] = "transferCI";
static const char __pyx_k_transferEx[] = "transferEx";
static const char __pyx_k_util_utils[] = "util.utils";
static const char __pyx_k_0_usebase_c[] = "{0}usebase.c";
static const char __pyx_k_BSweights_2[] = "_BSweights";
static const char __pyx_k_CodeFichier[] = "CodeFichier";
static const char __pyx_k_CodeWriterC[] = "CodeWriterC";
static const char __pyx_k_DataManager[] = "DataManager";
static const char __pyx_k_Driver_cost[] = "Driver.cost";
static const char __pyx_k_INPUT_COUNT[] = "INPUT_COUNT";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_LAYER_COUNT[] = "LAYER_COUNT";
static const char __pyx_k_PyCodeList2[] = "PyCodeList2";
static const char __pyx_k_SF_DLLTRAIN[] = "SF_DLLTRAIN";
static const char __pyx_k_TSR_IN_NORM[] = "TSR_IN_NORM";
static const char __pyx_k_codeversion[] = "codeversion";
static const char __pyx_k_createModel[] = "_createModel";
static const char __pyx_k_deltasquare[] = "deltasquare";
static const char __pyx_k_determinant[] = "_determinant";
static const char __pyx_k_extraVLOO_2[] = "extraVLOO";
static const char __pyx_k_extrastddev[] = "_extrastddev";
static const char __pyx_k_fixedinputs[] = "fixedinputs";
static const char __pyx_k_forcecreate[] = "forcecreate";
static const char __pyx_k_full_output[] = "full_output";
static const char __pyx_k_getJacobian[] = "getJacobian";
static const char __pyx_k_getchildren[] = "getchildren";
static const char __pyx_k_getdirector[] = "getdirector";
static const char __pyx_k_getiterator[] = "getiterator";
static const char __pyx_k_getjacobian[] = "getjacobian";
static const char __pyx_k_getlastcost[] = "getlastcost";
static const char __pyx_k_getoutlinks[] = "getoutlinks";
static const char __pyx_k_getproperty[] = "getproperty";
static const char __pyx_k_inNormModel[] = "inNormModel";
static const char __pyx_k_includedirs[] = "includedirs";
static const char __pyx_k_ingradvalue[] = "ingradvalue";
static const char __pyx_k_initWeights[] = "initWeights";
static const char __pyx_k_initweights[] = "initweights";
static const char __pyx_k_insertLayer[] = "insertLayer";
static const char __pyx_k_isNewWeight[] = "isNewWeight";
static const char __pyx_k_jacobians_2[] = "_jacobians";
static const char __pyx_k_layerLength[] = "layerLength";
static const char __pyx_k_leverages_2[] = "leverages";
static const char __pyx_k_modelType_2[] = "modelType";
static const char __pyx_k_optimizer_2[] = "optimizer";
static const char __pyx_k_outGradient[] = "outGradient";
static const char __pyx_k_outProcList[] = "_outProcList";
static const char __pyx_k_outResult_2[] = "_outResult";
static const char __pyx_k_outputArray[] = "_outputArray";
static const char __pyx_k_outputCount[] = "outputCount";
static const char __pyx_k_outputNames[] = "outputNames";
static const char __pyx_k_outputNodes[] = "outputNodes";
static const char __pyx_k_outputnames[] = "outputnames";
static const char __pyx_k_progressive[] = "progressive";
static const char __pyx_k_setCallback[] = "setCallback";
static const char __pyx_k_setRandSeed[] = "setRandSeed";
static const char __pyx_k_setcallback[] = "setcallback";
static const char __pyx_k_setdirector[] = "setdirector";
static const char __pyx_k_setproperty[] = "setproperty";
static const char __pyx_k_specialmath[] = "specialmath";
static const char __pyx_k_st_ModelURL[] = "st_ModelURL";
static const char __pyx_k_st_normName[] = "st_normName";
static const char __pyx_k_trainable_2[] = "_trainable";
static const char __pyx_k_transferOld[] = "transferOld";
static const char __pyx_k_useOriginal[] = "useOriginal";
static const char __pyx_k_Driver___del[] = "Driver.__del__";
static const char __pyx_k_Driver_cost2[] = "Driver.cost2";
static const char __pyx_k_Driver_prime[] = "Driver.prime";
static const char __pyx_k_Driver_train[] = "Driver.train";
static const char __pyx_k_LOOweights_2[] = "_LOOweights";
static const char __pyx_k_OUTPUT_COUNT[] = "OUTPUT_COUNT";
static const char __pyx_k_PseudoMatrix[] = "PseudoMatrix";
static const char __pyx_k_TCR_MINIMIZE[] = "TCR_MINIMIZE";
static const char __pyx_k_TFR_GRADIENT[] = "TFR_GRADIENT";
static const char __pyx_k_TFR_LEVERAGE[] = "TFR_LEVERAGE";
static const char __pyx_k_TSR_OUT_NORM[] = "TSR_OUT_NORM";
static const char __pyx_k_actualepochs[] = "actualepochs";
static const char __pyx_k_allow_pickle[] = "allow_pickle";
static const char __pyx_k_backupParams[] = "_backupParams";
static const char __pyx_k_compileAsDll[] = "compileAsDll";
static const char __pyx_k_computeLevel[] = "computeLevel";
static const char __pyx_k_computelevel[] = "computelevel";
static const char __pyx_k_correlMatrix[] = "_correlMatrix";
static const char __pyx_k_costAndPrime[] = "costAndPrime";
static const char __pyx_k_costFunction[] = "costFunction";
static const char __pyx_k_costfunction[] = "_costfunction";
static const char __pyx_k_dispersion_2[] = "dispersion\n";
static const char __pyx_k_existingnode[] = "existingnode";
static const char __pyx_k_extraCount_2[] = "extraCount";
static const char __pyx_k_extraweights[] = "_extraweights";
static const char __pyx_k_getParamsStr[] = "getParamsStr";
static const char __pyx_k_getResiduals[] = "getResiduals";
static const char __pyx_k_getbiasbased[] = "getbiasbased";
static const char __pyx_k_getdebugfile[] = "getdebugfile";
static const char __pyx_k_getindexinfo[] = "getindexinfo";
static const char __pyx_k_getinputnorm[] = "getinputnorm";
static const char __pyx_k_getrealvalue[] = "getrealvalue";
static const char __pyx_k_getresiduals[] = "getresiduals";
static const char __pyx_k_gettraintype[] = "gettraintype";
static const char __pyx_k_loadFromDict[] = "loadFromDict";
static const char __pyx_k_loaddatabase[] = "loaddatabase";
static const char __pyx_k_monalVersion[] = "monalVersion";
static const char __pyx_k_monaltoolbox[] = "monaltoolbox";
static const char __pyx_k_monalversion[] = "monalversion";
static const char __pyx_k_numpy_random[] = "numpy.random";
static const char __pyx_k_originallink[] = "originallink";
static const char __pyx_k_outNormModel[] = "outNormModel";
static const char __pyx_k_outputtarget[] = "outputtarget";
static const char __pyx_k_propertyName[] = "propertyName : {}";
static const char __pyx_k_propertyname[] = "propertyname";
static const char __pyx_k_savingformat[] = "savingformat";
static const char __pyx_k_setdebugfile[] = "setdebugfile";
static const char __pyx_k_setinputnorm[] = "setinputnorm";
static const char __pyx_k_setrealvalue[] = "setrealvalue";
static const char __pyx_k_st_XMLHeader[] = "st_XMLHeader";
static const char __pyx_k_st_XMLSchema[] = "st_XMLSchema";
static const char __pyx_k_st_xmlns_xsi[] = "st_xmlns_xsi";
static const char __pyx_k_startWeights[] = "startWeights";
static const char __pyx_k_suseOriginal[] = "suseOriginal";
static const char __pyx_k_synapseCount[] = "synapseCount";
static const char __pyx_k_trainingData[] = "trainingData";
static const char __pyx_k_trueGradList[] = "trueGradList";
static const char __pyx_k_0_trainbase_c[] = "{0}trainbase.c";
static const char __pyx_k_Driver___init[] = "Driver.__init__";
static const char __pyx_k_Driver_chrono[] = "Driver.chrono";
static const char __pyx_k_Driver_costNT[] = "Driver.costNT";
static const char __pyx_k_Driver_inputs[] = "Driver.inputs";
static const char __pyx_k_Driver_prime2[] = "Driver.prime2";
static const char __pyx_k_InverseMtMdvd[] = "InverseMtMdvd";
static const char __pyx_k_Jacobian2long[] = "Jacobian2long";
static const char __pyx_k_SF_CCODEMULTI[] = "SF_CCODEMULTI";
static const char __pyx_k_SYNAPSE_COUNT[] = "SYNAPSE_COUNT";
static const char __pyx_k_TCR_DONT_CARE[] = "TCR_DONT_CARE";
static const char __pyx_k_TCR_EIGEN_MAX[] = "TCR_EIGEN_MAX";
static const char __pyx_k_TCR_EIGEN_MIN[] = "TCR_EIGEN_MIN";
static const char __pyx_k_TCR_R2_ADJUST[] = "TCR_R2_ADJUST";
static const char __pyx_k_backPropagate[] = "backPropagate";
static const char __pyx_k_classCostDict[] = "classCostDict";
static const char __pyx_k_conditionning[] = "_conditionning";
static const char __pyx_k_configuration[] = "configuration";
static const char __pyx_k_determinant_2[] = "determinant";
static const char __pyx_k_extrastddev_2[] = "extrastddev";
static const char __pyx_k_getNeuronOfId[] = "getNeuronOfId";
static const char __pyx_k_getNewWeights[] = "getNewWeights";
static const char __pyx_k_getdispersion[] = "getdispersion";
static const char __pyx_k_gettrainstyle[] = "gettrainstyle";
static const char __pyx_k_gradientInput[] = "gradientInput";
static const char __pyx_k_hasResampling[] = "hasResampling";
static const char __pyx_k_inputnamelist[] = "inputnamelist";
static const char __pyx_k_ltrainingData[] = "ltrainingData";
static const char __pyx_k_middleoutputs[] = "middleoutputs";
static const char __pyx_k_modeltemplate[] = "modeltemplate";
static const char __pyx_k_norminputgrad[] = "norminputgrad";
static const char __pyx_k_optim_leastsq[] = "optim_leastsq";
static const char __pyx_k_outProcList_2[] = "outProcList";
static const char __pyx_k_reducedinputs[] = "reducedinputs";
static const char __pyx_k_restoreParams[] = "restoreParams";
static const char __pyx_k_reverse_train[] = "reverse_train";
static const char __pyx_k_self_callback[] = "self_callback";
static const char __pyx_k_setdispersion[] = "setdispersion";
static const char __pyx_k_setidentifier[] = "setidentifier";
static const char __pyx_k_setindexvalue[] = "setindexvalue";
static const char __pyx_k_settrainstyle[] = "settrainstyle";
static const char __pyx_k_st_XMLVersion[] = "st_XMLVersion";
static const char __pyx_k_strainingData[] = "strainingData";
static const char __pyx_k_trainingStDev[] = "trainingStDev";
static const char __pyx_k_transferCIOld[] = "transferCIOld";
static const char __pyx_k_transferExtra[] = "transferExtra";
static const char __pyx_k_transferindex[] = "transferindex";
static const char __pyx_k_transferprime[] = "transferprime";
static const char __pyx_k_useLongParams[] = "useLongParams";
static const char __pyx_k_util_const_st[] = "util.const_st";
static const char __pyx_k_util_leverage[] = "util.leverage";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_Driver_getCost[] = "Driver.getCost";
static const char __pyx_k_Driver_getinfo[] = "Driver.getinfo";
static const char __pyx_k_Driver_hessian[] = "Driver.hessian";
static const char __pyx_k_Driver_outputs[] = "Driver.outputs";
static const char __pyx_k_InverseStudent[] = "InverseStudent";
static const char __pyx_k_RealByteVector[] = "RealByteVector";
static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning";
static const char __pyx_k_TCR_CORREL_MAX[] = "TCR_CORREL_MAX";
static const char __pyx_k_TCR_DELTA_RANK[] = "TCR_DELTA_RANK";
static const char __pyx_k_backupParamsNT[] = "backupParamsNT";
static const char __pyx_k_backupParams_2[] = "backupParams";
static const char __pyx_k_correlMatrix_2[] = "correlMatrix";
static const char __pyx_k_costgradientNT[] = "costgradientNT";
static const char __pyx_k_dynamiclinking[] = "dynamiclinking";
static const char __pyx_k_extraweights_2[] = "extraweights";
static const char __pyx_k_filterwarnings[] = "filterwarnings";
static const char __pyx_k_getSVDChildren[] = "getSVDChildren";
static const char __pyx_k_halfdispersion[] = "halfdispersion";
static const char __pyx_k_inputTrainCost[] = "inputTrainCost";
static const char __pyx_k_inputTrainFunc[] = "inputTrainFunc";
static const char __pyx_k_inputTrainGrad[] = "inputTrainGrad";
static const char __pyx_k_inputnormindex[] = "inputnormindex";
static const char __pyx_k_leverageUsages[] = "leverageUsages";
static const char __pyx_k_loadParameters[] = "loadParameters";
static const char __pyx_k_loadWeightsXML[] = "loadWeightsXML";
static const char __pyx_k_longParamCount[] = "longParamCount";
static const char __pyx_k_normalizeModel[] = "normalizeModel";
static const char __pyx_k_parameterNames[] = "parameterNames";
static const char __pyx_k_propertyName_2[] = "propertyName";
static const char __pyx_k_propertyName_3[] = "_propertyName";
static const char __pyx_k_residualsPrime[] = "residualsPrime";
static const char __pyx_k_saveParameters[] = "saveParameters";
static const char __pyx_k_settrainingset[] = "settrainingset";
static const char __pyx_k_sltrainingData[] = "sltrainingData";
static const char __pyx_k_st_XMLEncoding[] = "st_XMLEncoding";
static const char __pyx_k_statenodeindex[] = "statenodeindex";
static const char __pyx_k_trainingStddev[] = "trainingStddev";
static const char __pyx_k_usageleverages[] = "_usageleverages";
static const char __pyx_k_util_monalbase[] = "util.monalbase";
static const char __pyx_k_ConfidenceLevel[] = "ConfidenceLevel";
static const char __pyx_k_Driver__xmlText[] = "Driver._xmlText";
static const char __pyx_k_Driver_getPRESS[] = "Driver.getPRESS";
static const char __pyx_k_Driver_getPrime[] = "Driver.getPrime";
static const char __pyx_k_Driver_gradient[] = "Driver.gradient";
static const char __pyx_k_Driver_transfer[] = "Driver.transfer";
static const char __pyx_k_IndexValueError[] = "IndexValueError";
static const char __pyx_k_LOOweightsMulti[] = "_LOOweightsMulti";
static const char __pyx_k_PyCodeListShort[] = "PyCodeListShort";
static const char __pyx_k_TCR_CORREL_MEAN[] = "TCR_CORREL_MEAN";
static const char __pyx_k_TCR_DETERMINANT[] = "TCR_DETERMINANT";
static const char __pyx_k_UnpicklingError[] = "UnpicklingError";
static const char __pyx_k_confidenceLevel[] = "confidenceLevel";
static const char __pyx_k_confidencelevel[] = "_confidencelevel";
static const char __pyx_k_extradispersion[] = "extradispersion";
static const char __pyx_k_getfreedomindex[] = "getfreedomindex";
static const char __pyx_k_gradientCompute[] = "gradientCompute";
static const char __pyx_k_inputTrainPrime[] = "inputTrainPrime";
static const char __pyx_k_lparameterNames[] = "lparameterNames";
static const char __pyx_k_mainModelMaster[] = "mainModelMaster";
static const char __pyx_k_nntoolbox_utils[] = "nntoolbox.utils";
static const char __pyx_k_normalizeInputs[] = "normalizeInputs";
static const char __pyx_k_numpy_lib_npyio[] = "numpy.lib.npyio";
static const char __pyx_k_originalsavedir[] = "originalsavedir";
static const char __pyx_k_outputWeighting[] = "outputWeighting";
static const char __pyx_k_outputnormindex[] = "outputnormindex";
static const char __pyx_k_restoreParamsNT[] = "restoreParamsNT";
static const char __pyx_k_setPseudoMatrix[] = "setPseudoMatrix";
static const char __pyx_k_setSavingFormat[] = "setSavingFormat";
static const char __pyx_k_st_XMLSchemaLoc[] = "st_XMLSchemaLoc";
static const char __pyx_k_studentvariable[] = "_studentvariable";
static const char __pyx_k_trainingResults[] = "_trainingResults";
static const char __pyx_k_transferExtraCI[] = "transferExtraCI";
static const char __pyx_k_DriverBase_wused[] = "DriverBase.wused";
static const char __pyx_k_Driver_Jacobian2[] = "Driver.Jacobian2";
static const char __pyx_k_Driver_NMLstring[] = "Driver.NMLstring";
static const char __pyx_k_Driver_dataCount[] = "Driver.dataCount";
static const char __pyx_k_Driver_dataWidth[] = "Driver.dataWidth";
static const char __pyx_k_Driver_dimension[] = "Driver.dimension";
static const char __pyx_k_Driver_inputnorm[] = "Driver.inputnorm";
static const char __pyx_k_Driver_residuals[] = "Driver.residuals";
static const char __pyx_k_Driver_saveModel[] = "Driver.saveModel";
static const char __pyx_k_Driver_setivalue[] = "Driver.setivalue";
static const char __pyx_k_Driver_toFullXML[] = "Driver.toFullXML";
static const char __pyx_k_Driver_trainable[] = "Driver.trainable";
static const char __pyx_k_II_P_SYN_PARENTS[] = "II_P_SYN_PARENTS";
static const char __pyx_k_TCR_ZEROINCLUDED[] = "TCR_ZEROINCLUDED";
static const char __pyx_k_UnNormalizeModel[] = "_UnNormalizeModel";
static const char __pyx_k_computeTrainData[] = "computeTrainData";
static const char __pyx_k_createCodeWriter[] = "createCodeWriter";
static const char __pyx_k_dispersionMatrix[] = "_dispersionMatrix";
static const char __pyx_k_doSaveParameters[] = "doSaveParameters";
static const char __pyx_k_extradispersions[] = "_extradispersions";
static const char __pyx_k_extraweightslist[] = "extraweightslist";
static const char __pyx_k_getlastresiduals[] = "getlastresiduals";
static const char __pyx_k_halfdispersion_2[] = "halfdispersion\n";
static const char __pyx_k_hasInputMiniMaxi[] = "hasInputMiniMaxi";
static const char __pyx_k_inputsMinMaxList[] = "inputsMinMaxList";
static const char __pyx_k_loadTrainingData[] = "loadTrainingData";
static const char __pyx_k_loadWeightsASCII[] = "loadWeightsASCII";
static const char __pyx_k_model__monalfunc[] = "model._monalfunc";
static const char __pyx_k_newreducedinputs[] = "newreducedinputs";
static const char __pyx_k_originParamCount[] = "_originParamCount";
static const char __pyx_k_projectionMatrix[] = "projectionMatrix";
static const char __pyx_k_savez_compressed[] = "savez_compressed";
static const char __pyx_k_st_XMLStyleSheet[] = "st_XMLStyleSheet";
static const char __pyx_k_transfergradient[] = "transfergradient";
static const char __pyx_k_transferleverage[] = "transferleverage";
static const char __pyx_k_DriverBase___init[] = "DriverBase.__init__";
static const char __pyx_k_DriverBase_action[] = "DriverBase.action";
static const char __pyx_k_Driver__expandvec[] = "Driver._expandvec";
static const char __pyx_k_Driver__reducevec[] = "Driver._reducevec";
static const char __pyx_k_Driver_addComment[] = "Driver.addComment";
static const char __pyx_k_Driver_checkModel[] = "Driver.checkModel";
static const char __pyx_k_Driver_getResults[] = "Driver.getResults";
static const char __pyx_k_Driver_gettargets[] = "Driver.gettargets";
static const char __pyx_k_Driver_inputCount[] = "Driver.inputCount";
static const char __pyx_k_Driver_isParallel[] = "Driver.isParallel";
static const char __pyx_k_Driver_multitrain[] = "Driver.multitrain";
static const char __pyx_k_Driver_outputnorm[] = "Driver.outputnorm";
static const char __pyx_k_Driver_paramCount[] = "Driver.paramCount";
static const char __pyx_k_Driver_residuals2[] = "Driver.residuals2";
static const char __pyx_k_Driver_sdataCount[] = "Driver.sdataCount";
static const char __pyx_k_Driver_setWeights[] = "Driver.setWeights";
static const char __pyx_k_Driver_splitModel[] = "Driver.splitModel";
static const char __pyx_k_Driver_transferCI[] = "Driver.transferCI";
static const char __pyx_k_Driver_transferEx[] = "Driver.transferEx";
static const char __pyx_k_II_P_LAYER_LENGTH[] = "II_P_LAYER_LENGTH";
static const char __pyx_k_II_P_SYN_CHILDREN[] = "II_P_SYN_CHILDREN";
static const char __pyx_k_PyCodeSingleTrain[] = "PyCodeSingleTrain";
static const char __pyx_k_TCR_CONDITIONNING[] = "TCR_CONDITIONNING";
static const char __pyx_k_confidencelevel_2[] = "confidencelevel";
static const char __pyx_k_gethalfdispersion[] = "gethalfdispersion";
static const char __pyx_k_hasOutputMiniMaxi[] = "hasOutputMiniMaxi";
static const char __pyx_k_indexInitialState[] = "indexInitialState";
static const char __pyx_k_lcode_codewriterC[] = "lcode.codewriterC";
static const char __pyx_k_loadWeightsBinary[] = "loadWeightsBinary";
static const char __pyx_k_nntoolbox_dataset[] = "nntoolbox.dataset";
static const char __pyx_k_outputWeighting_2[] = "_outputWeighting";
static const char __pyx_k_outputsMinMaxList[] = "outputsMinMaxList";
static const char __pyx_k_sethalfdispersion[] = "sethalfdispersion";
static const char __pyx_k_studentvariable_2[] = "studentvariable";
static const char __pyx_k_trainingResults_2[] = "trainingResults";
static const char __pyx_k_transferLeverages[] = "transferLeverages";
static const char __pyx_k_transferleverage2[] = "transferleverage2";
static const char __pyx_k_writeCostFunction[] = "writeCostFunction";
static const char __pyx_k_DriverBase_reprlst[] = "DriverBase.reprlst";
static const char __pyx_k_DriverBase_weights[] = "DriverBase.weights";
static const char __pyx_k_Driver_initWeights[] = "Driver.initWeights";
static const char __pyx_k_Driver_outputCount[] = "Driver.outputCount";
static const char __pyx_k_Driver_useOriginal[] = "Driver.useOriginal";
static const char __pyx_k_Information_hidden[] = "Information: {} hidden\n";
static const char __pyx_k_Information_inputs[] = "Information: {} inputs\n";
static const char __pyx_k_TFR_GRADIENTINPUTS[] = "TFR_GRADIENTINPUTS";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_compileAsExtension[] = "compileAsExtension";
static const char __pyx_k_dispersionMatrix_2[] = "dispersionMatrix";
static const char __pyx_k_extendedInputCount[] = "extendedInputCount";
static const char __pyx_k_extradispersions_2[] = "extradispersions";
static const char __pyx_k_getTransferResults[] = "getTransferResults";
static const char __pyx_k_originParamCount_2[] = "originParamCount";
static const char __pyx_k_st_CostFuncUnknown[] = "st_CostFuncUnknown";
static const char __pyx_k_transferleverageex[] = "transferleverageex";
static const char __pyx_k_unnormalizeOutputs[] = "unnormalizeOutputs";
static const char __pyx_k_DriverBase_callback[] = "DriverBase.callback";
static const char __pyx_k_Driver__createModel[] = "Driver._createModel";
static const char __pyx_k_Driver_backupParams[] = "Driver.backupParams";
static const char __pyx_k_Driver_costAndPrime[] = "Driver.costAndPrime";
static const char __pyx_k_Driver_getResiduals[] = "Driver.getResiduals";
static const char __pyx_k_Driver_getindexinfo[] = "Driver.getindexinfo";
static const char __pyx_k_Driver_getrealvalue[] = "Driver.getrealvalue";
static const char __pyx_k_Driver_propertyName[] = "Driver.propertyName";
static const char __pyx_k_Driver_setrealvalue[] = "Driver.setrealvalue";
static const char __pyx_k_Driver_suseOriginal[] = "Driver.suseOriginal";
static const char __pyx_k_Driver_trainingData[] = "Driver.trainingData";
static const char __pyx_k_Information_outputs[] = "Information: {} outputs\n";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_TCR_CORREL_MAX_ADDR[] = "TCR_CORREL_MAX_ADDR";
static const char __pyx_k_computeFromJacobian[] = "computeFromJacobian";
static const char __pyx_k_directInputGradient[] = "directInputGradient";
static const char __pyx_k_getComputeCondition[] = "_getComputeCondition";
static const char __pyx_k_getLeveragesFromSVD[] = "getLeveragesFromSVD";
static const char __pyx_k_inputTrainPrimeFull[] = "inputTrainPrimeFull";
static const char __pyx_k_loadASCIIDispersion[] = "loadASCIIDispersion";
static const char __pyx_k_st_NeedFunctionName[] = "st_NeedFunctionName";
static const char __pyx_k_DriverBase_modelType[] = "DriverBase.modelType";
static const char __pyx_k_DriverBase_signature[] = "DriverBase.signature";
static const char __pyx_k_Driver_Jacobian2long[] = "Driver.Jacobian2long";
static const char __pyx_k_Driver_getNeuronOfId[] = "Driver.getNeuronOfId";
static const char __pyx_k_Driver_ltrainingData[] = "Driver.ltrainingData";
static const char __pyx_k_Driver_restoreParams[] = "Driver.restoreParams";
static const char __pyx_k_Driver_reverse_train[] = "Driver.reverse_train";
static const char __pyx_k_Driver_setindexvalue[] = "Driver.setindexvalue";
static const char __pyx_k_Driver_strainingData[] = "Driver.strainingData";
static const char __pyx_k_Driver_transferCIOld[] = "Driver.transferCIOld";
static const char __pyx_k_Driver_transferExtra[] = "Driver.transferExtra";
static const char __pyx_k_Driver_useLongParams[] = "Driver.useLongParams";
static const char __pyx_k_Incorrect_dataformat[] = "Incorrect dataformat";
static const char __pyx_k_getIndexWeightOfName[] = "getIndexWeightOfName";
static const char __pyx_k_halfDispersionMatrix[] = "_halfDispersionMatrix";
static const char __pyx_k_loadFromASCIIStrList[] = "loadFromASCIIStrList";
static const char __pyx_k_DriverBase__setaction[] = "DriverBase._setaction";
static const char __pyx_k_DriverBase_extraCount[] = "DriverBase.extraCount";
static const char __pyx_k_Driver_backupParamsNT[] = "Driver.backupParamsNT";
static const char __pyx_k_Driver_costgradientNT[] = "Driver.costgradientNT";
static const char __pyx_k_Driver_inputTrainCost[] = "Driver.inputTrainCost";
static const char __pyx_k_Driver_inputTrainFunc[] = "Driver.inputTrainFunc";
static const char __pyx_k_Driver_inputTrainGrad[] = "Driver.inputTrainGrad";
static const char __pyx_k_Driver_loadParameters[] = "Driver.loadParameters";
static const char __pyx_k_Driver_longParamCount[] = "Driver.longParamCount";
static const char __pyx_k_Driver_normalizeModel[] = "Driver.normalizeModel";
static const char __pyx_k_Driver_parameterNames[] = "Driver.parameterNames";
static const char __pyx_k_Driver_residualsPrime[] = "Driver.residualsPrime";
static const char __pyx_k_Driver_saveParameters[] = "Driver.saveParameters";
static const char __pyx_k_Driver_sltrainingData[] = "Driver.sltrainingData";
static const char __pyx_k_Information_dimension[] = "Information: dimension {}\n";
static const char __pyx_k_TCR_STD_DEV_BIAS_LESS[] = "TCR_STD_DEV_BIAS_LESS";
static const char __pyx_k_computeUsageLeverages[] = "computeUsageLeverages";
static const char __pyx_k_transfergradientindex[] = "transfergradientindex";
static const char __pyx_k_DriverBase_setCallback[] = "DriverBase.setCallback";
static const char __pyx_k_Driver_confidenceLevel[] = "Driver.confidenceLevel";
static const char __pyx_k_Driver_gradientCompute[] = "Driver.gradientCompute";
static const char __pyx_k_Driver_inputTrainPrime[] = "Driver.inputTrainPrime";
static const char __pyx_k_Driver_lparameterNames[] = "Driver.lparameterNames";
static const char __pyx_k_Driver_normalizeInputs[] = "Driver.normalizeInputs";
static const char __pyx_k_Driver_restoreParamsNT[] = "Driver.restoreParamsNT";
static const char __pyx_k_Driver_setPseudoMatrix[] = "Driver.setPseudoMatrix";
static const char __pyx_k_Driver_transferExtraCI[] = "Driver.transferExtraCI";
static const char __pyx_k_Information_activation[] = "Information: {} activation\n";
static const char __pyx_k_computeTrainDataDirect[] = "computeTrainDataDirect";
static const char __pyx_k_computeTrainingResults[] = "computeTrainingResults";
static const char __pyx_k_halfDispersionMatrix_2[] = "halfDispersionMatrix";
static const char __pyx_k_setLeverageComputation[] = "setLeverageComputation";
static const char __pyx_k_xml_etree_cElementTree[] = "xml.etree.cElementTree";
static const char __pyx_k_Current_model_is_linear[] = "Current model is linear.";
static const char __pyx_k_DriverBase_loadFromDict[] = "DriverBase.loadFromDict";
static const char __pyx_k_Driver_computeTrainData[] = "Driver.computeTrainData";
static const char __pyx_k_Driver_getlastresiduals[] = "Driver.getlastresiduals";
static const char __pyx_k_Driver_hasInputMiniMaxi[] = "Driver.hasInputMiniMaxi";
static const char __pyx_k_Driver_inputsMinMaxList[] = "Driver.inputsMinMaxList";
static const char __pyx_k_Driver_loadTrainingData[] = "Driver.loadTrainingData";
static const char __pyx_k_USE_INTEGRATED_LEVERAGE[] = "USE_INTEGRATED_LEVERAGE";
static const char __pyx_k_getCorrelFromDispersion[] = "getCorrelFromDispersion";
static const char __pyx_k_st_IndexErrorWithLimits[] = "st_IndexErrorWithLimits";
static const char __pyx_k_DriverBase_getNewWeights[] = "DriverBase.getNewWeights";
static const char __pyx_k_DriverBase_hasResampling[] = "DriverBase.hasResampling";
static const char __pyx_k_Driver__UnNormalizeModel[] = "Driver._UnNormalizeModel";
static const char __pyx_k_Driver_hasOutputMiniMaxi[] = "Driver.hasOutputMiniMaxi";
static const char __pyx_k_Driver_indexInitialState[] = "Driver.indexInitialState";
static const char __pyx_k_Driver_outputsMinMaxList[] = "Driver.outputsMinMaxList";
static const char __pyx_k_Driver_transferLeverages[] = "Driver.transferLeverages";
static const char __pyx_k_Driver_writeCostFunction[] = "Driver.writeCostFunction";
static const char __pyx_k_loadNormFromASCIIStrList[] = "loadNormFromASCIIStrList";
static const char __pyx_k_Cannot_modify_model_count[] = "Cannot modify model count";
static const char __pyx_k_DriverBase_loadWeightsXML[] = "DriverBase.loadWeightsXML";
static const char __pyx_k_DriverBase_saveParameters[] = "DriverBase.saveParameters";
static const char __pyx_k_DriverBase_trainingStddev[] = "DriverBase.trainingStddev";
static const char __pyx_k_Driver_extendedInputCount[] = "Driver.extendedInputCount";
static const char __pyx_k_Driver_unnormalizeOutputs[] = "Driver.unnormalizeOutputs";
static const char __pyx_k_MA_CONFIDENCE_COMPUTATION[] = "MA_CONFIDENCE_COMPUTATION";
static const char __pyx_k_computeTrainingResultsOld[] = "computeTrainingResultsOld";
static const char __pyx_k_setLeverageComputationOld[] = "setLeverageComputationOld";
static const char __pyx_k_transferAndDirectGradient[] = "transferAndDirectGradient";
static const char __pyx_k_Driver_directInputGradient[] = "Driver.directInputGradient";
static const char __pyx_k_Driver_inputTrainPrimeFull[] = "Driver.inputTrainPrimeFull";
static const char __pyx_k_Information_Model_creation[] = "\nInformation: Model creation {}\n";
static const char __pyx_k_propagateAndDirectGradient[] = "propagateAndDirectGradient";
static const char __pyx_k_DriverBase_dispersionMatrix[] = "DriverBase.dispersionMatrix";
static const char __pyx_k_DriverBase_loadWeightsASCII[] = "DriverBase.loadWeightsASCII";
static const char __pyx_k_Driver__getComputeCondition[] = "Driver._getComputeCondition";
static const char __pyx_k_Information_data_normalized[] = "Information: data normalized\n";
static const char __pyx_k_computeTrainDataProgressive[] = "computeTrainDataProgressive";
static const char __pyx_k_getNomalizingMatrixFromData[] = "getNomalizingMatrixFromData";
static const char __pyx_k_DriverBase_loadWeightsBinary[] = "DriverBase.loadWeightsBinary";
static const char __pyx_k_Information_accuracy_reached[] = "Information: accuracy reached";
static const char __pyx_k_Information_data_loaded_from[] = "Information: data loaded from {}\n";
static const char __pyx_k_Information_stop_for_maxiter[] = "Information: stop for maxiter";
static const char __pyx_k_backPropagateCoreMultiOutput[] = "backPropagateCoreMultiOutput";
static const char __pyx_k_DriverBase_getTransferResults[] = "DriverBase.getTransferResults";
static const char __pyx_k_Driver_computeTrainDataDirect[] = "Driver.computeTrainDataDirect";
static const char __pyx_k_Driver_computeTrainingResults[] = "Driver.computeTrainingResults";
static const char __pyx_k_Driver_setLeverageComputation[] = "Driver.setLeverageComputation";
static const char __pyx_k_Not_Implemented_without_Scipy[] = "Not Implemented without Scipy";
static const char __pyx_k_backPropagateCoreSingleOutput[] = "backPropagateCoreSingleOutput";
static const char __pyx_k_getinfo_incomplete_with_style[] = "getinfo incomplete with style = {}";
static const char __pyx_k_metaphor_monal_driver__driver[] = "metaphor.monal.driver._driver";
static const char __pyx_k_Created_on_13_janv_2011_author[] = "\nCreated on 13 janv. 2011\n\n@author: jeanluc\n";
static const char __pyx_k_DriverBase_computeFromJacobian[] = "DriverBase.computeFromJacobian";
static const char __pyx_k_DriverBase_loadASCIIDispersion[] = "DriverBase.loadASCIIDispersion";
static const char __pyx_k_DriverBase_loadFromASCIIStrList[] = "DriverBase.loadFromASCIIStrList";
static const char __pyx_k_Driver_multitrain_locals_lambda[] = "Driver.multitrain.<locals>.<lambda>";
static const char __pyx_k_Information_no_acceptable_point[] = "Information: no acceptable point found";
static const char __pyx_k_Information_training_0_max_iter[] = "\nInformation: training {0}, max iterations {1}\n";
static const char __pyx_k_Information_weights_loaded_from[] = "Information: weights loaded from {0}\n";
static const char __pyx_k_Pilote_d_apprentissage_de_modle[] = "\n    Pilote d'apprentissage de mod\303\257\302\277\305\223le\n    ";
static const char __pyx_k_getDispersionMatrixFromJacobian[] = "getDispersionMatrixFromJacobian";
static const char __pyx_k_DriverBase_computeTrainingResult[] = "DriverBase.computeTrainingResults";
static const char __pyx_k_DriverBase_computeUsageLeverages[] = "DriverBase.computeUsageLeverages";
static const char __pyx_k_DriverBase_loadNormFromASCIIStrL[] = "DriverBase.loadNormFromASCIIStrList";
static const char __pyx_k_Driver_computeTrainDataProgressi[] = "Driver.computeTrainDataProgressive";
static const char __pyx_k_Driver_getNomalizingMatrixFromDa[] = "Driver.getNomalizingMatrixFromData";
static const char __pyx_k_Driver_inputTrainFunc_locals_lam[] = "Driver.inputTrainFunc.<locals>.<lambda>";
static const char __pyx_k_Driver_inputTrainPrimeFull_local[] = "Driver.inputTrainPrimeFull.<locals>.<lambda>";
static const char __pyx_k_Driver_setLeverageComputationOld[] = "Driver.setLeverageComputationOld";
static const char __pyx_k_Driver_transferAndDirectGradient[] = "Driver.transferAndDirectGradient";
static const char __pyx_k_Either_file_source_or_dataset_bu[] = "Either file source or dataset but not both";
static const char __pyx_k_Either_file_source_or_dataset_ne[] = "Either file source or dataset needs not to be None";
static const char __pyx_k_Model_must_have_at_least_1_input[] = "Model must have at least 1 input to be reverse-trained";
static const char __pyx_k_computeTrainingResultsIntegrated[] = "computeTrainingResultsIntegrated";
static const char __pyx_k_getindexinfo_incomplete_with_sty[] = "getindexinfo incomplete with style = {}";
static const char __pyx_k_getrealvalue_incomplete_with_sty[] = "getrealvalue incomplete with style = {}";
static const char __pyx_k_metaphor_monal_driver__driver_py[] = "metaphor/monal/driver/_driver.py";
static const char __pyx_k_mode_should_be_in_integrated_dir[] = "mode should be in [\"integrated\", \"direct\", \"progressive\"]";
static const char __pyx_k_saveModel_not_implemented_yet_wi[] = "saveModel not implemented yet with format = {0}";
static const char __pyx_k_setindexvaluenNot_implemented_ye[] = "setindexvaluenNot implemented yet";
static const char __pyx_k_setrealvalue_not_implemented_yet[] = "setrealvalue not implemented yet";
static const char __pyx_k_student_variable_computation_not[] = "student variable computation not yet implemented";
static const char __pyx_k_DriverBase_computeTrainingResult_2[] = "DriverBase.computeTrainingResultsIntegrated";
static const char __pyx_k_DriverBase_computeTrainingResult_3[] = "DriverBase.computeTrainingResultsOld";
static PyObject *__pyx_kp_u_0;
static PyObject *__pyx_kp_u_0_1;
static PyObject *__pyx_kp_u_0_18_15g;
static PyObject *__pyx_kp_u_0_1_18_15g;
static PyObject *__pyx_kp_u_0_1_2;
static PyObject *__pyx_kp_u_0_2;
static PyObject *__pyx_kp_u_0_c;
static PyObject *__pyx_kp_u_0_dll_c;
static PyObject *__pyx_kp_u_0_trainbase_c;
static PyObject *__pyx_kp_u_0_usebase_c;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_u_BFGS;
static PyObject *__pyx_n_u_BFGS_NT;
static PyObject *__pyx_n_u_BSweights;
static PyObject *__pyx_n_s_BSweights_2;
static PyObject *__pyx_n_s_Bopt;
static PyObject *__pyx_n_s_C;
static PyObject *__pyx_n_s_CC;
static PyObject *__pyx_n_u_CG;
static PyObject *__pyx_n_s_CIm;
static PyObject *__pyx_n_s_CIp;
static PyObject *__pyx_kp_u_Cannot_modify_model_count;
static PyObject *__pyx_n_s_CodeFichier;
static PyObject *__pyx_n_s_CodeWriterC;
static PyObject *__pyx_n_s_Component;
static PyObject *__pyx_n_s_ConfidenceLevel;
static PyObject *__pyx_kp_u_Current_model_is_linear;
static PyObject *__pyx_n_s_DEBUGDLL;
static PyObject *__pyx_n_s_DIMENSION;
static PyObject *__pyx_n_s_DataManager;
static PyObject *__pyx_n_s_Dfun;
static PyObject *__pyx_n_s_Driver;
static PyObject *__pyx_n_s_DriverBase;
static PyObject *__pyx_n_s_DriverBase___init;
static PyObject *__pyx_n_s_DriverBase__setaction;
static PyObject *__pyx_n_s_DriverBase_action;
static PyObject *__pyx_n_s_DriverBase_callback;
static PyObject *__pyx_n_s_DriverBase_computeFromJacobian;
static PyObject *__pyx_n_s_DriverBase_computeTrainingResult;
static PyObject *__pyx_n_s_DriverBase_computeTrainingResult_2;
static PyObject *__pyx_n_s_DriverBase_computeTrainingResult_3;
static PyObject *__pyx_n_s_DriverBase_computeUsageLeverages;
static PyObject *__pyx_n_s_DriverBase_dispersionMatrix;
static PyObject *__pyx_n_s_DriverBase_extraCount;
static PyObject *__pyx_n_s_DriverBase_getNewWeights;
static PyObject *__pyx_n_s_DriverBase_getTransferResults;
static PyObject *__pyx_n_s_DriverBase_hasResampling;
static PyObject *__pyx_n_s_DriverBase_loadASCIIDispersion;
static PyObject *__pyx_n_s_DriverBase_loadFromASCIIStrList;
static PyObject *__pyx_n_s_DriverBase_loadFromDict;
static PyObject *__pyx_n_s_DriverBase_loadNormFromASCIIStrL;
static PyObject *__pyx_n_s_DriverBase_loadWeightsASCII;
static PyObject *__pyx_n_s_DriverBase_loadWeightsBinary;
static PyObject *__pyx_n_s_DriverBase_loadWeightsXML;
static PyObject *__pyx_n_s_DriverBase_modelType;
static PyObject *__pyx_n_s_DriverBase_reprlst;
static PyObject *__pyx_n_s_DriverBase_saveParameters;
static PyObject *__pyx_n_s_DriverBase_setCallback;
static PyObject *__pyx_n_s_DriverBase_signature;
static PyObject *__pyx_n_s_DriverBase_trainingStddev;
static PyObject *__pyx_n_s_DriverBase_weights;
static PyObject *__pyx_n_s_DriverBase_wused;
static PyObject *__pyx_n_s_Driver_Jacobian2;
static PyObject *__pyx_n_s_Driver_Jacobian2long;
static PyObject *__pyx_n_s_Driver_NMLstring;
static PyObject *__pyx_n_s_Driver__UnNormalizeModel;
static PyObject *__pyx_n_s_Driver___del;
static PyObject *__pyx_n_s_Driver___init;
static PyObject *__pyx_n_s_Driver__createModel;
static PyObject *__pyx_n_s_Driver__expandvec;
static PyObject *__pyx_n_s_Driver__getComputeCondition;
static PyObject *__pyx_n_s_Driver__reducevec;
static PyObject *__pyx_n_s_Driver__xmlText;
static PyObject *__pyx_n_s_Driver_addComment;
static PyObject *__pyx_n_s_Driver_backupParams;
static PyObject *__pyx_n_s_Driver_backupParamsNT;
static PyObject *__pyx_n_s_Driver_checkModel;
static PyObject *__pyx_n_s_Driver_chrono;
static PyObject *__pyx_n_s_Driver_computeTrainData;
static PyObject *__pyx_n_s_Driver_computeTrainDataDirect;
static PyObject *__pyx_n_s_Driver_computeTrainDataProgressi;
static PyObject *__pyx_n_s_Driver_computeTrainingResults;
static PyObject *__pyx_n_s_Driver_confidenceLevel;
static PyObject *__pyx_n_s_Driver_cost;
static PyObject *__pyx_n_s_Driver_cost2;
static PyObject *__pyx_n_s_Driver_costAndPrime;
static PyObject *__pyx_n_s_Driver_costNT;
static PyObject *__pyx_n_s_Driver_costgradientNT;
static PyObject *__pyx_n_s_Driver_dataCount;
static PyObject *__pyx_n_s_Driver_dataWidth;
static PyObject *__pyx_n_s_Driver_dimension;
static PyObject *__pyx_n_s_Driver_directInputGradient;
static PyObject *__pyx_n_s_Driver_extendedInputCount;
static PyObject *__pyx_n_s_Driver_getCost;
static PyObject *__pyx_n_s_Driver_getNeuronOfId;
static PyObject *__pyx_n_s_Driver_getNomalizingMatrixFromDa;
static PyObject *__pyx_n_s_Driver_getPRESS;
static PyObject *__pyx_n_s_Driver_getPrime;
static PyObject *__pyx_n_s_Driver_getResiduals;
static PyObject *__pyx_n_s_Driver_getResults;
static PyObject *__pyx_n_s_Driver_getindexinfo;
static PyObject *__pyx_n_s_Driver_getinfo;
static PyObject *__pyx_n_s_Driver_getlastresiduals;
static PyObject *__pyx_n_s_Driver_getrealvalue;
static PyObject *__pyx_n_s_Driver_gettargets;
static PyObject *__pyx_n_s_Driver_gradient;
static PyObject *__pyx_n_s_Driver_gradientCompute;
static PyObject *__pyx_n_s_Driver_hasInputMiniMaxi;
static PyObject *__pyx_n_s_Driver_hasOutputMiniMaxi;
static PyObject *__pyx_n_s_Driver_hessian;
static PyObject *__pyx_n_s_Driver_indexInitialState;
static PyObject *__pyx_n_s_Driver_initWeights;
static PyObject *__pyx_n_s_Driver_inputCount;
static PyObject *__pyx_n_s_Driver_inputTrainCost;
static PyObject *__pyx_n_s_Driver_inputTrainFunc;
static PyObject *__pyx_n_s_Driver_inputTrainFunc_locals_lam;
static PyObject *__pyx_n_s_Driver_inputTrainGrad;
static PyObject *__pyx_n_s_Driver_inputTrainPrime;
static PyObject *__pyx_n_s_Driver_inputTrainPrimeFull;
static PyObject *__pyx_n_s_Driver_inputTrainPrimeFull_local;
static PyObject *__pyx_n_s_Driver_inputnorm;
static PyObject *__pyx_n_s_Driver_inputs;
static PyObject *__pyx_n_s_Driver_inputsMinMaxList;
static PyObject *__pyx_n_s_Driver_isParallel;
static PyObject *__pyx_n_s_Driver_loadParameters;
static PyObject *__pyx_n_s_Driver_loadTrainingData;
static PyObject *__pyx_n_s_Driver_longParamCount;
static PyObject *__pyx_n_s_Driver_lparameterNames;
static PyObject *__pyx_n_s_Driver_ltrainingData;
static PyObject *__pyx_n_s_Driver_multitrain;
static PyObject *__pyx_n_s_Driver_multitrain_locals_lambda;
static PyObject *__pyx_n_s_Driver_normalizeInputs;
static PyObject *__pyx_n_s_Driver_normalizeModel;
static PyObject *__pyx_n_s_Driver_outputCount;
static PyObject *__pyx_n_s_Driver_outputnorm;
static PyObject *__pyx_n_s_Driver_outputs;
static PyObject *__pyx_n_s_Driver_outputsMinMaxList;
static PyObject *__pyx_n_s_Driver_paramCount;
static PyObject *__pyx_n_s_Driver_parameterNames;
static PyObject *__pyx_n_s_Driver_prime;
static PyObject *__pyx_n_s_Driver_prime2;
static PyObject *__pyx_n_s_Driver_propertyName;
static PyObject *__pyx_n_s_Driver_residuals;
static PyObject *__pyx_n_s_Driver_residuals2;
static PyObject *__pyx_n_s_Driver_residualsPrime;
static PyObject *__pyx_n_s_Driver_restoreParams;
static PyObject *__pyx_n_s_Driver_restoreParamsNT;
static PyObject *__pyx_n_s_Driver_reverse_train;
static PyObject *__pyx_n_s_Driver_saveModel;
static PyObject *__pyx_n_s_Driver_saveParameters;
static PyObject *__pyx_n_s_Driver_sdataCount;
static PyObject *__pyx_n_s_Driver_setLeverageComputation;
static PyObject *__pyx_n_s_Driver_setLeverageComputationOld;
static PyObject *__pyx_n_s_Driver_setPseudoMatrix;
static PyObject *__pyx_n_s_Driver_setWeights;
static PyObject *__pyx_n_s_Driver_setindexvalue;
static PyObject *__pyx_n_s_Driver_setivalue;
static PyObject *__pyx_n_s_Driver_setrealvalue;
static PyObject *__pyx_n_s_Driver_sltrainingData;
static PyObject *__pyx_n_s_Driver_splitModel;
static PyObject *__pyx_n_s_Driver_strainingData;
static PyObject *__pyx_n_s_Driver_suseOriginal;
static PyObject *__pyx_n_s_Driver_toFullXML;
static PyObject *__pyx_n_s_Driver_train;
static PyObject *__pyx_n_s_Driver_trainable;
static PyObject *__pyx_n_s_Driver_trainingData;
static PyObject *__pyx_n_s_Driver_transfer;
static PyObject *__pyx_n_s_Driver_transferAndDirectGradient;
static PyObject *__pyx_n_s_Driver_transferCI;
static PyObject *__pyx_n_s_Driver_transferCIOld;
static PyObject *__pyx_n_s_Driver_transferEx;
static PyObject *__pyx_n_s_Driver_transferExtra;
static PyObject *__pyx_n_s_Driver_transferExtraCI;
static PyObject *__pyx_n_s_Driver_transferLeverages;
static PyObject *__pyx_n_s_Driver_unnormalizeOutputs;
static PyObject *__pyx_n_s_Driver_useLongParams;
static PyObject *__pyx_n_s_Driver_useOriginal;
static PyObject *__pyx_n_s_Driver_writeCostFunction;
static PyObject *__pyx_kp_u_Either_file_source_or_dataset_bu;
static PyObject *__pyx_kp_u_Either_file_source_or_dataset_ne;
static PyObject *__pyx_n_s_ID_COMPUTE;
static PyObject *__pyx_n_s_ID_DIFF;
static PyObject *__pyx_n_s_II_P_LAYER_LENGTH;
static PyObject *__pyx_n_s_II_P_SYN_CHILDREN;
static PyObject *__pyx_n_s_II_P_SYN_PARENTS;
static PyObject *__pyx_n_s_INPUT_COUNT;
static PyObject *__pyx_n_s_IOError;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_u_InNorm;
static PyObject *__pyx_kp_u_Incorrect_dataformat;
static PyObject *__pyx_n_s_IndexValueError;
static PyObject *__pyx_kp_u_Information_Model_creation;
static PyObject *__pyx_kp_u_Information_accuracy_reached;
static PyObject *__pyx_kp_u_Information_activation;
static PyObject *__pyx_kp_u_Information_data_loaded_from;
static PyObject *__pyx_kp_u_Information_data_normalized;
static PyObject *__pyx_kp_u_Information_dimension;
static PyObject *__pyx_kp_u_Information_hidden;
static PyObject *__pyx_kp_u_Information_inputs;
static PyObject *__pyx_kp_u_Information_no_acceptable_point;
static PyObject *__pyx_kp_u_Information_outputs;
static PyObject *__pyx_kp_u_Information_stop_for_maxiter;
static PyObject *__pyx_kp_u_Information_training_0_max_iter;
static PyObject *__pyx_kp_u_Information_weights_loaded_from;
static PyObject *__pyx_n_s_InverseMtMdvd;
static PyObject *__pyx_n_s_InverseStudent;
static PyObject *__pyx_n_s_Jacobian2;
static PyObject *__pyx_n_s_Jacobian2long;
static PyObject *__pyx_n_s_KT_AFTER;
static PyObject *__pyx_n_s_KT_BEFORE;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_LAYER_COUNT;
static PyObject *__pyx_n_s_LEV_EARLY;
static PyObject *__pyx_n_s_LEV_METHOD;
static PyObject *__pyx_n_u_LM;
static PyObject *__pyx_n_u_LM_NT;
static PyObject *__pyx_n_u_LOOweights;
static PyObject *__pyx_n_s_LOOweightsMulti;
static PyObject *__pyx_n_s_LOOweights_2;
static PyObject *__pyx_n_s_LS_FIXE;
static PyObject *__pyx_n_s_MA_CONFIDENCE_COMPUTATION;
static PyObject *__pyx_n_u_MODEL;
static PyObject *__pyx_n_s_Model;
static PyObject *__pyx_kp_u_Model_must_have_at_least_1_input;
static PyObject *__pyx_n_s_MonalError;
static PyObject *__pyx_n_s_Multimodel;
static PyObject *__pyx_kp_u_N;
static PyObject *__pyx_n_s_NMLstring;
static PyObject *__pyx_n_s_N_2;
static PyObject *__pyx_n_s_NaN;
static PyObject *__pyx_n_s_Network;
static PyObject *__pyx_n_s_Nf;
static PyObject *__pyx_n_s_Ng;
static PyObject *__pyx_n_s_Normalizer;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_kp_u_Not_Implemented_without_Scipy;
static PyObject *__pyx_n_s_NpzFile;
static PyObject *__pyx_n_s_OKScipy;
static PyObject *__pyx_n_s_ORDER;
static PyObject *__pyx_n_s_OUTPUT_COUNT;
static PyObject *__pyx_n_u_OutNorm;
static PyObject *__pyx_n_s_OutputProc;
static PyObject *__pyx_n_s_PY2;
static PyObject *__pyx_n_u_Pi;
static PyObject *__pyx_kp_s_Pilote_d_apprentissage_de_modle;
static PyObject *__pyx_n_s_Polynom;
static PyObject *__pyx_n_s_Properties;
static PyObject *__pyx_n_s_Property;
static PyObject *__pyx_n_s_PseudoMatrix;
static PyObject *__pyx_n_s_PyCodeList;
static PyObject *__pyx_n_s_PyCodeList2;
static PyObject *__pyx_n_s_PyCodeListShort;
static PyObject *__pyx_n_s_PyCodeSingleTrain;
static PyObject *__pyx_n_u_RealByteVector;
static PyObject *__pyx_n_u_RealVector;
static PyObject *__pyx_n_s_RuntimeWarning;
static PyObject *__pyx_n_s_SF_ASCII;
static PyObject *__pyx_n_s_SF_BINARY;
static PyObject *__pyx_n_s_SF_CCODE;
static PyObject *__pyx_n_s_SF_CCODEMULTI;
static PyObject *__pyx_n_s_SF_CPYTHON;
static PyObject *__pyx_n_s_SF_DLL;
static PyObject *__pyx_n_s_SF_DLLTRAIN;
static PyObject *__pyx_n_s_SF_JSON;
static PyObject *__pyx_n_s_SF_XML;
static PyObject *__pyx_n_u_SPX;
static PyObject *__pyx_n_s_SYNAPSE_COUNT;
static PyObject *__pyx_n_s_SaveDir;
static PyObject *__pyx_n_u_Sigma;
static PyObject *__pyx_n_s_T;
static PyObject *__pyx_n_u_TANH;
static PyObject *__pyx_n_s_TCR_CONDITIONNING;
static PyObject *__pyx_n_s_TCR_CORREL;
static PyObject *__pyx_n_s_TCR_CORREL_MAX;
static PyObject *__pyx_n_s_TCR_CORREL_MAX_ADDR;
static PyObject *__pyx_n_s_TCR_CORREL_MEAN;
static PyObject *__pyx_n_s_TCR_COST;
static PyObject *__pyx_n_s_TCR_COUNT;
static PyObject *__pyx_n_s_TCR_DELTA_RANK;
static PyObject *__pyx_n_s_TCR_DETERMINANT;
static PyObject *__pyx_n_s_TCR_DONT_CARE;
static PyObject *__pyx_n_s_TCR_EIGEN_MAX;
static PyObject *__pyx_n_s_TCR_EIGEN_MIN;
static PyObject *__pyx_n_s_TCR_EPOCHS;
static PyObject *__pyx_n_s_TCR_HIDDEN;
static PyObject *__pyx_n_s_TCR_MINIMIZE;
static PyObject *__pyx_n_s_TCR_MU;
static PyObject *__pyx_n_s_TCR_PRESS;
static PyObject *__pyx_n_s_TCR_R2;
static PyObject *__pyx_n_s_TCR_R2_ADJUST;
static PyObject *__pyx_n_s_TCR_SHII;
static PyObject *__pyx_n_s_TCR_STD_DEV_BIAS_LESS;
static PyObject *__pyx_n_s_TCR_TRACE;
static PyObject *__pyx_n_s_TCR_ZEROINCLUDED;
static PyObject *__pyx_n_s_TFR_GRADIENT;
static PyObject *__pyx_n_s_TFR_GRADIENTINPUTS;
static PyObject *__pyx_n_s_TFR_LEVERAGE;
static PyObject *__pyx_n_s_TFR_STD;
static PyObject *__pyx_n_s_TSR_IN_NORM;
static PyObject *__pyx_n_s_TSR_OUT_NORM;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_USE_INTEGRATED_LEVERAGE;
static PyObject *__pyx_n_s_UnNormalizeModel;
static PyObject *__pyx_n_s_UnpicklingError;
static PyObject *__pyx_kp_u__148;
static PyObject *__pyx_kp_u__15;
static PyObject *__pyx_kp_u__150;
static PyObject *__pyx_n_s__155;
static PyObject *__pyx_n_s__173;
static PyObject *__pyx_n_s__2;
static PyObject *__pyx_kp_u__2;
static PyObject *__pyx_kp_u__20;
static PyObject *__pyx_kp_u__42;
static PyObject *__pyx_kp_u__6;
static PyObject *__pyx_kp_u__9;
static PyObject *__pyx_n_s_absolute;
static PyObject *__pyx_n_s_absorb;
static PyObject *__pyx_n_s_acc;
static PyObject *__pyx_n_s_action;
static PyObject *__pyx_n_s_activation;
static PyObject *__pyx_n_s_activfunc;
static PyObject *__pyx_n_s_actualepochs;
static PyObject *__pyx_n_s_addComment;
static PyObject *__pyx_n_s_algo;
static PyObject *__pyx_n_s_allow_pickle;
static PyObject *__pyx_n_s_allvecs;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_appdatadir;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_appli;
static PyObject *__pyx_n_s_argmax;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_u_array;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_asmatrix;
static PyObject *__pyx_n_s_assign;
static PyObject *__pyx_n_s_astype;
static PyObject *__pyx_n_s_attr;
static PyObject *__pyx_n_s_attrib;
static PyObject *__pyx_n_s_axis;
static PyObject *__pyx_n_s_back;
static PyObject *__pyx_n_s_backPropagate;
static PyObject *__pyx_n_s_backPropagateCoreMultiOutput;
static PyObject *__pyx_n_s_backPropagateCoreSingleOutput;
static PyObject *__pyx_n_s_backupParams;
static PyObject *__pyx_n_s_backupParamsNT;
static PyObject *__pyx_n_s_backupParams_2;
static PyObject *__pyx_n_u_base;
static PyObject *__pyx_n_s_baselen;
static PyObject *__pyx_n_u_baselen;
static PyObject *__pyx_n_s_baselen_2;
static PyObject *__pyx_n_u_baselen_3;
static PyObject *__pyx_n_s_basename;
static PyObject *__pyx_n_s_best;
static PyObject *__pyx_n_s_bestList;
static PyObject *__pyx_n_s_bests;
static PyObject *__pyx_n_s_bias;
static PyObject *__pyx_n_s_bias0;
static PyObject *__pyx_n_s_biasBaseId;
static PyObject *__pyx_n_s_builtins;
static PyObject *__pyx_n_s_cPickle;
static PyObject *__pyx_n_s_callback;
static PyObject *__pyx_n_s_callback_2;
static PyObject *__pyx_n_s_category;
static PyObject *__pyx_n_s_chdir;
static PyObject *__pyx_n_s_checkModel;
static PyObject *__pyx_n_s_chrono;
static PyObject *__pyx_n_s_chrono_2;
static PyObject *__pyx_n_u_class;
static PyObject *__pyx_n_s_classCostDict;
static PyObject *__pyx_n_s_class_2;
static PyObject *__pyx_n_s_classif;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_clist;
static PyObject *__pyx_n_u_close;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_codeWriter;
static PyObject *__pyx_n_s_codeconst;
static PyObject *__pyx_n_s_codelist;
static PyObject *__pyx_n_u_codeversion;
static PyObject *__pyx_n_s_compileAsDll;
static PyObject *__pyx_n_s_compileAsExtension;
static PyObject *__pyx_n_s_compiler;
static PyObject *__pyx_n_s_computeFromJacobian;
static PyObject *__pyx_n_s_computeLevel;
static PyObject *__pyx_n_s_computeTrainData;
static PyObject *__pyx_n_s_computeTrainDataDirect;
static PyObject *__pyx_n_s_computeTrainDataProgressive;
static PyObject *__pyx_n_s_computeTrainingResults;
static PyObject *__pyx_n_s_computeTrainingResultsIntegrated;
static PyObject *__pyx_n_s_computeTrainingResultsOld;
static PyObject *__pyx_n_s_computeUsageLeverages;
static PyObject *__pyx_n_s_computelevel;
static PyObject *__pyx_n_s_cond;
static PyObject *__pyx_n_s_conditionning;
static PyObject *__pyx_n_s_confidenceLevel;
static PyObject *__pyx_n_s_confidencelevel;
static PyObject *__pyx_n_u_confidencelevel_2;
static PyObject *__pyx_n_u_configuration;
static PyObject *__pyx_n_s_const_st;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_copyTo;
static PyObject *__pyx_n_s_corrcoef;
static PyObject *__pyx_n_s_correl;
static PyObject *__pyx_n_s_correlMatrix;
static PyObject *__pyx_n_u_correlMatrix_2;
static PyObject *__pyx_n_s_correlflat;
static PyObject *__pyx_n_s_cost;
static PyObject *__pyx_n_s_cost2;
static PyObject *__pyx_n_s_costAndPrime;
static PyObject *__pyx_n_s_costD;
static PyObject *__pyx_n_s_costFunction;
static PyObject *__pyx_n_s_costNT;
static PyObject *__pyx_n_s_costfunction;
static PyObject *__pyx_n_s_costgradientNT;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_u_count;
static PyObject *__pyx_kp_u_count_0;
static PyObject *__pyx_kp_u_count_2;
static PyObject *__pyx_n_s_cov;
static PyObject *__pyx_n_s_createCodeWriter;
static PyObject *__pyx_n_s_createLink;
static PyObject *__pyx_n_s_createModel;
static PyObject *__pyx_n_u_created;
static PyObject *__pyx_n_s_criterion;
static PyObject *__pyx_n_s_cst;
static PyObject *__pyx_n_u_csv;
static PyObject *__pyx_n_s_cumul;
static PyObject *__pyx_n_s_cur;
static PyObject *__pyx_n_s_curWeights;
static PyObject *__pyx_n_s_curdisp;
static PyObject *__pyx_n_s_curw;
static PyObject *__pyx_n_s_curweights;
static PyObject *__pyx_n_s_dat;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_dataArray;
static PyObject *__pyx_n_s_dataCount;
static PyObject *__pyx_n_u_dataCount;
static PyObject *__pyx_n_s_dataWidth;
static PyObject *__pyx_n_s_dataformat;
static PyObject *__pyx_n_s_dataindex;
static PyObject *__pyx_n_s_dataset;
static PyObject *__pyx_n_s_datasource;
static PyObject *__pyx_n_s_datastyle;
static PyObject *__pyx_n_s_debug;
static PyObject *__pyx_n_s_decal;
static PyObject *__pyx_n_s_del;
static PyObject *__pyx_n_s_delta;
static PyObject *__pyx_n_s_deltares;
static PyObject *__pyx_n_s_deltash;
static PyObject *__pyx_n_u_deltasquare;
static PyObject *__pyx_n_s_derive;
static PyObject *__pyx_n_s_determinant;
static PyObject *__pyx_n_s_determinant_2;
static PyObject *__pyx_n_u_determinant_2;
static PyObject *__pyx_n_s_dim;
static PyObject *__pyx_n_s_dimension;
static PyObject *__pyx_n_u_dimension;
static PyObject *__pyx_n_u_direct;
static PyObject *__pyx_n_s_directInputGradient;
static PyObject *__pyx_n_s_dirname;
static PyObject *__pyx_n_s_disp;
static PyObject *__pyx_n_s_dispersion;
static PyObject *__pyx_n_u_dispersion;
static PyObject *__pyx_n_s_dispersionMatrix;
static PyObject *__pyx_n_s_dispersionMatrix_2;
static PyObject *__pyx_n_u_dispersionMatrix_2;
static PyObject *__pyx_n_u_dispersion_2;
static PyObject *__pyx_n_s_disploc;
static PyObject *__pyx_n_s_doSaveParameters;
static PyObject *__pyx_n_s_doSum;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_doit;
static PyObject *__pyx_n_u_done;
static PyObject *__pyx_n_s_donorm;
static PyObject *__pyx_n_s_doprint;
static PyObject *__pyx_n_s_dosave;
static PyObject *__pyx_n_s_doset;
static PyObject *__pyx_n_s_dot;
static PyObject *__pyx_n_s_double;
static PyObject *__pyx_n_s_downLinks;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dynamiclinking;
static PyObject *__pyx_n_s_eigval;
static PyObject *__pyx_n_s_element;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_env;
static PyObject *__pyx_n_s_epochs;
static PyObject *__pyx_n_s_err;
static PyObject *__pyx_n_s_existingnode;
static PyObject *__pyx_n_s_exists;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_expandvec;
static PyObject *__pyx_n_s_exports;
static PyObject *__pyx_n_s_extendedInputCount;
static PyObject *__pyx_n_s_extfmt;
static PyObject *__pyx_kp_u_extraCount;
static PyObject *__pyx_n_s_extraCount_2;
static PyObject *__pyx_n_s_extraVLOO;
static PyObject *__pyx_n_u_extraVLOO_2;
static PyObject *__pyx_n_u_extradispersion;
static PyObject *__pyx_n_s_extradispersions;
static PyObject *__pyx_n_s_extradispersions_2;
static PyObject *__pyx_n_u_extradispersions_2;
static PyObject *__pyx_n_s_extrastddev;
static PyObject *__pyx_n_s_extrastddev_2;
static PyObject *__pyx_n_u_extrastddev_2;
static PyObject *__pyx_n_s_extraweights;
static PyObject *__pyx_n_s_extraweights_2;
static PyObject *__pyx_n_u_extraweights_2;
static PyObject *__pyx_n_u_extraweightslist;
static PyObject *__pyx_n_s_factor;
static PyObject *__pyx_n_s_fcost;
static PyObject *__pyx_n_s_fct;
static PyObject *__pyx_n_s_ff;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_file_2;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_fill;
static PyObject *__pyx_n_s_fillstr;
static PyObject *__pyx_n_s_filterwarnings;
static PyObject *__pyx_n_s_find;
static PyObject *__pyx_n_s_fix;
static PyObject *__pyx_n_s_fixed;
static PyObject *__pyx_n_s_fixedinputs;
static PyObject *__pyx_n_s_flat;
static PyObject *__pyx_n_s_flist;
static PyObject *__pyx_n_s_float64;
static PyObject *__pyx_n_s_floatEx;
static PyObject *__pyx_n_s_floor;
static PyObject *__pyx_n_s_fmin;
static PyObject *__pyx_n_s_fmin_bfgs;
static PyObject *__pyx_n_s_fmin_cg;
static PyObject *__pyx_n_s_fname;
static PyObject *__pyx_n_s_follow;
static PyObject *__pyx_n_s_fopt;
static PyObject *__pyx_n_s_forcecreate;
static PyObject *__pyx_n_s_forcelib;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fprime;
static PyObject *__pyx_n_s_freedm;
static PyObject *__pyx_n_s_fromstring;
static PyObject *__pyx_n_s_fsum;
static PyObject *__pyx_n_s_full;
static PyObject *__pyx_n_s_full_output;
static PyObject *__pyx_n_s_fullinputs;
static PyObject *__pyx_n_s_funcalls;
static PyObject *__pyx_n_s_functools;
static PyObject *__pyx_n_u_fvec;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getComputeCondition;
static PyObject *__pyx_n_s_getCorrelFromDispersion;
static PyObject *__pyx_n_s_getCost;
static PyObject *__pyx_n_s_getDispersionMatrixFromJacobian;
static PyObject *__pyx_n_s_getIndexWeightOfName;
static PyObject *__pyx_n_s_getJacobian;
static PyObject *__pyx_n_s_getLeveragesFromSVD;
static PyObject *__pyx_n_s_getNeuronOfId;
static PyObject *__pyx_n_s_getNewWeights;
static PyObject *__pyx_n_s_getNomalizingMatrixFromData;
static PyObject *__pyx_n_s_getPRESS;
static PyObject *__pyx_n_s_getParamsStr;
static PyObject *__pyx_n_s_getPrime;
static PyObject *__pyx_n_s_getResiduals;
static PyObject *__pyx_n_s_getResults;
static PyObject *__pyx_n_s_getSVDChildren;
static PyObject *__pyx_n_s_getTempDir;
static PyObject *__pyx_n_s_getTransferResults;
static PyObject *__pyx_n_u_getbaselen;
static PyObject *__pyx_n_u_getbiasbased;
static PyObject *__pyx_n_s_getchildren;
static PyObject *__pyx_n_u_getcost;
static PyObject *__pyx_n_s_getcwd;
static PyObject *__pyx_n_u_getdata;
static PyObject *__pyx_n_u_getdebugfile;
static PyObject *__pyx_n_u_getdirector;
static PyObject *__pyx_n_u_getdispersion;
static PyObject *__pyx_n_u_getfreedom;
static PyObject *__pyx_n_u_getfreedomindex;
static PyObject *__pyx_n_u_gethalfdispersion;
static PyObject *__pyx_n_s_getindexinfo;
static PyObject *__pyx_kp_u_getindexinfo_incomplete_with_sty;
static PyObject *__pyx_n_s_getinfo;
static PyObject *__pyx_kp_u_getinfo_incomplete_with_style;
static PyObject *__pyx_n_u_getinputnorm;
static PyObject *__pyx_n_s_getiterator;
static PyObject *__pyx_n_s_getjacobian;
static PyObject *__pyx_n_u_getjacobian;
static PyObject *__pyx_n_u_getlastcost;
static PyObject *__pyx_n_s_getlastresiduals;
static PyObject *__pyx_n_u_getnames;
static PyObject *__pyx_n_u_getnorm;
static PyObject *__pyx_n_u_getoutlinks;
static PyObject *__pyx_n_u_getparams;
static PyObject *__pyx_n_u_getpress;
static PyObject *__pyx_n_u_getprime;
static PyObject *__pyx_n_u_getproperty;
static PyObject *__pyx_n_s_getrealvalue;
static PyObject *__pyx_kp_u_getrealvalue_incomplete_with_sty;
static PyObject *__pyx_n_s_getresiduals;
static PyObject *__pyx_n_u_getresiduals;
static PyObject *__pyx_n_s_getroot;
static PyObject *__pyx_n_u_getstddev;
static PyObject *__pyx_n_s_gettargets;
static PyObject *__pyx_n_u_gettargets;
static PyObject *__pyx_n_u_gettrainstyle;
static PyObject *__pyx_n_u_gettraintype;
static PyObject *__pyx_n_u_getwused;
static PyObject *__pyx_n_s_givetime;
static PyObject *__pyx_n_s_gopt;
static PyObject *__pyx_n_s_grad;
static PyObject *__pyx_n_s_gradient;
static PyObject *__pyx_n_s_gradientCompute;
static PyObject *__pyx_n_s_gradientInput;
static PyObject *__pyx_n_s_gradient_2;
static PyObject *__pyx_n_s_gradloc;
static PyObject *__pyx_n_s_grads;
static PyObject *__pyx_n_s_gradval;
static PyObject *__pyx_n_s_gradvalue;
static PyObject *__pyx_n_s_halfDispersionMatrix;
static PyObject *__pyx_n_s_halfDispersionMatrix_2;
static PyObject *__pyx_n_s_halfdispersion;
static PyObject *__pyx_n_u_halfdispersion_2;
static PyObject *__pyx_n_s_hasInputMiniMaxi;
static PyObject *__pyx_n_s_hasOutputMiniMaxi;
static PyObject *__pyx_n_s_hasResampling;
static PyObject *__pyx_n_s_hasw;
static PyObject *__pyx_n_s_hessian;
static PyObject *__pyx_n_s_hessian_2;
static PyObject *__pyx_n_s_hh;
static PyObject *__pyx_n_s_hidden;
static PyObject *__pyx_n_u_hidden;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_i1;
static PyObject *__pyx_n_s_i2;
static PyObject *__pyx_n_s_ic;
static PyObject *__pyx_n_s_identity;
static PyObject *__pyx_n_s_ier;
static PyObject *__pyx_n_u_ignore;
static PyObject *__pyx_n_s_il;
static PyObject *__pyx_n_s_imax;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_importXML;
static PyObject *__pyx_n_s_inNames;
static PyObject *__pyx_n_s_inNormModel;
static PyObject *__pyx_n_u_include;
static PyObject *__pyx_n_s_includedirs;
static PyObject *__pyx_n_s_ind;
static PyObject *__pyx_n_s_indata;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_indexInitialState;
static PyObject *__pyx_n_s_indloc;
static PyObject *__pyx_n_s_infodict;
static PyObject *__pyx_n_s_ingrad;
static PyObject *__pyx_n_s_ingrads;
static PyObject *__pyx_n_s_ingradval;
static PyObject *__pyx_n_s_ingradvalue;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_initWeights;
static PyObject *__pyx_n_s_initcount;
static PyObject *__pyx_n_s_initweights;
static PyObject *__pyx_n_s_inivalue;
static PyObject *__pyx_n_s_inivec;
static PyObject *__pyx_n_s_inname;
static PyObject *__pyx_n_s_innode;
static PyObject *__pyx_n_s_innorm;
static PyObject *__pyx_n_u_innorm;
static PyObject *__pyx_n_s_input;
static PyObject *__pyx_n_s_inputArray;
static PyObject *__pyx_n_s_inputCount;
static PyObject *__pyx_n_u_inputCount;
static PyObject *__pyx_n_s_inputDim;
static PyObject *__pyx_n_s_inputNames;
static PyObject *__pyx_n_s_inputNodes;
static PyObject *__pyx_n_s_inputNorm;
static PyObject *__pyx_n_s_inputTrainCost;
static PyObject *__pyx_n_s_inputTrainFunc;
static PyObject *__pyx_n_s_inputTrainGrad;
static PyObject *__pyx_n_s_inputTrainPrime;
static PyObject *__pyx_n_s_inputTrainPrimeFull;
static PyObject *__pyx_n_s_inputini;
static PyObject *__pyx_n_s_inputnamelist;
static PyObject *__pyx_n_u_inputnames;
static PyObject *__pyx_n_s_inputnorm;
static PyObject *__pyx_n_u_inputnorm;
static PyObject *__pyx_n_s_inputnormindex;
static PyObject *__pyx_n_s_inputs;
static PyObject *__pyx_n_s_inputsMinMaxList;
static PyObject *__pyx_n_s_inputsloc;
static PyObject *__pyx_n_s_insertLayer;
static PyObject *__pyx_n_s_int;
static PyObject *__pyx_n_u_integrated;
static PyObject *__pyx_n_s_isFix;
static PyObject *__pyx_n_s_isLinear;
static PyObject *__pyx_n_s_isNewWeight;
static PyObject *__pyx_n_s_isParallel;
static PyObject *__pyx_n_s_isStrNum;
static PyObject *__pyx_n_s_is_windows;
static PyObject *__pyx_n_s_isscalar;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_jacob;
static PyObject *__pyx_n_s_jacobian;
static PyObject *__pyx_n_u_jacobian_2;
static PyObject *__pyx_n_s_jacobians;
static PyObject *__pyx_n_s_jacobians_2;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_keep0;
static PyObject *__pyx_n_s_keeptemp;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_kwd;
static PyObject *__pyx_n_s_kwds;
static PyObject *__pyx_n_s_lastaction;
static PyObject *__pyx_n_u_lasterror;
static PyObject *__pyx_n_u_lastoutput;
static PyObject *__pyx_n_s_layerCount;
static PyObject *__pyx_n_s_layerLength;
static PyObject *__pyx_n_s_lcode;
static PyObject *__pyx_n_s_lcode_codewriterC;
static PyObject *__pyx_n_s_leastsq;
static PyObject *__pyx_n_s_lengetter;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_lensetter;
static PyObject *__pyx_n_s_lev;
static PyObject *__pyx_n_s_level;
static PyObject *__pyx_n_s_leverage;
static PyObject *__pyx_n_s_leverageUsages;
static PyObject *__pyx_n_s_leverages;
static PyObject *__pyx_n_s_leverages_2;
static PyObject *__pyx_n_u_leverages_2;
static PyObject *__pyx_n_s_levs;
static PyObject *__pyx_n_s_lib;
static PyObject *__pyx_n_s_libname;
static PyObject *__pyx_n_s_line;
static PyObject *__pyx_n_u_linear;
static PyObject *__pyx_n_s_linksCount;
static PyObject *__pyx_n_s_llst;
static PyObject *__pyx_n_s_load;
static PyObject *__pyx_n_s_loadASCIIDispersion;
static PyObject *__pyx_n_s_loadFromASCIIStrList;
static PyObject *__pyx_n_s_loadFromDict;
static PyObject *__pyx_n_s_loadNormFromASCIIStrList;
static PyObject *__pyx_n_s_loadParameters;
static PyObject *__pyx_n_s_loadTrainingData;
static PyObject *__pyx_n_s_loadWeightsASCII;
static PyObject *__pyx_n_s_loadWeightsBinary;
static PyObject *__pyx_n_s_loadWeightsXML;
static PyObject *__pyx_n_u_loaddatabase;
static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_local;
static PyObject *__pyx_n_s_locallst;
static PyObject *__pyx_n_s_locrow;
static PyObject *__pyx_n_s_longParamCount;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_lparameterNames;
static PyObject *__pyx_n_s_ls;
static PyObject *__pyx_n_s_lst;
static PyObject *__pyx_n_s_ltrainingData;
static PyObject *__pyx_kp_u_m_d;
static PyObject *__pyx_n_s_maimModel;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_u_main;
static PyObject *__pyx_n_s_mainModel;
static PyObject *__pyx_n_u_mainModel;
static PyObject *__pyx_n_s_mainModelMaster;
static PyObject *__pyx_n_s_mainfile;
static PyObject *__pyx_n_u_mark;
static PyObject *__pyx_n_s_master;
static PyObject *__pyx_n_s_mat;
static PyObject *__pyx_n_s_math;
static PyObject *__pyx_n_s_matlin;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_maxcorrel;
static PyObject *__pyx_n_s_maxfev;
static PyObject *__pyx_n_s_maxi;
static PyObject *__pyx_n_s_maximum;
static PyObject *__pyx_n_s_maxindex;
static PyObject *__pyx_n_s_maxiter;
static PyObject *__pyx_n_s_mean;
static PyObject *__pyx_n_s_meancorrel;
static PyObject *__pyx_n_s_mem;
static PyObject *__pyx_n_s_memdisp;
static PyObject *__pyx_n_s_memw;
static PyObject *__pyx_n_s_memweights;
static PyObject *__pyx_n_s_mesg;
static PyObject *__pyx_n_s_mess;
static PyObject *__pyx_n_s_met;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_u_metaphor;
static PyObject *__pyx_n_s_metaphor_monal_driver__driver;
static PyObject *__pyx_kp_s_metaphor_monal_driver__driver_py;
static PyObject *__pyx_n_s_method;
static PyObject *__pyx_n_s_middleoutputs;
static PyObject *__pyx_n_s_min;
static PyObject *__pyx_n_s_mini;
static PyObject *__pyx_n_s_minimum;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_mode_2;
static PyObject *__pyx_kp_u_mode_should_be_in_integrated_dir;
static PyObject *__pyx_n_s_model;
static PyObject *__pyx_n_u_model;
static PyObject *__pyx_n_s_modelCount;
static PyObject *__pyx_n_u_modelCount;
static PyObject *__pyx_n_s_modelData;
static PyObject *__pyx_n_u_modelName;
static PyObject *__pyx_kp_u_modelType;
static PyObject *__pyx_n_s_modelType_2;
static PyObject *__pyx_n_s_model__monalfunc;
static PyObject *__pyx_n_s_modeldata;
static PyObject *__pyx_n_s_modelindex;
static PyObject *__pyx_n_s_modelname;
static PyObject *__pyx_n_s_models;
static PyObject *__pyx_n_u_models;
static PyObject *__pyx_n_s_modeltemplate;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_u_moduleName;
static PyObject *__pyx_n_s_modulename;
static PyObject *__pyx_n_u_moduletype;
static PyObject *__pyx_n_u_monalVersion;
static PyObject *__pyx_n_s_monalconst;
static PyObject *__pyx_n_s_monalfile;
static PyObject *__pyx_n_s_monaltoolbox;
static PyObject *__pyx_n_s_monalversion;
static PyObject *__pyx_n_s_mtb;
static PyObject *__pyx_n_s_mu;
static PyObject *__pyx_n_u_mu;
static PyObject *__pyx_n_s_mu_2;
static PyObject *__pyx_n_s_multitrain;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_nbmulti;
static PyObject *__pyx_n_s_nd;
static PyObject *__pyx_n_s_ndarray;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_n_s_newaxis;
static PyObject *__pyx_n_s_newinputs;
static PyObject *__pyx_n_s_newreducedinputs;
static PyObject *__pyx_n_u_nfev;
static PyObject *__pyx_n_s_ni;
static PyObject *__pyx_n_s_nm;
static PyObject *__pyx_n_u_nn;
static PyObject *__pyx_n_s_nntb;
static PyObject *__pyx_n_s_nntoolbox;
static PyObject *__pyx_n_s_nntoolbox_dataset;
static PyObject *__pyx_n_s_nntoolbox_utils;
static PyObject *__pyx_n_s_no;
static PyObject *__pyx_n_s_node;
static PyObject *__pyx_n_s_nodes;
static PyObject *__pyx_n_s_norm;
static PyObject *__pyx_n_s_normalize;
static PyObject *__pyx_n_s_normalizeInputs;
static PyObject *__pyx_n_s_normalizeModel;
static PyObject *__pyx_n_s_normgrad;
static PyObject *__pyx_n_s_norminputgrad;
static PyObject *__pyx_n_s_normnode;
static PyObject *__pyx_n_s_normnodes;
static PyObject *__pyx_n_s_nosynapse;
static PyObject *__pyx_n_s_npcopy;
static PyObject *__pyx_n_s_npdouble;
static PyObject *__pyx_n_s_npfloat64;
static PyObject *__pyx_n_s_npint;
static PyObject *__pyx_n_s_npsum;
static PyObject *__pyx_n_s_ns;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_numpy_lib_npyio;
static PyObject *__pyx_n_s_numpy_random;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_oname;
static PyObject *__pyx_n_s_ones;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_optim_bfgs;
static PyObject *__pyx_n_s_optim_leastsq;
static PyObject *__pyx_n_s_optimize;
static PyObject *__pyx_n_s_optimizer;
static PyObject *__pyx_n_s_optimizer_2;
static PyObject *__pyx_n_s_order;
static PyObject *__pyx_n_s_originParamCount;
static PyObject *__pyx_n_u_originParamCount_2;
static PyObject *__pyx_n_s_original;
static PyObject *__pyx_n_s_originallink;
static PyObject *__pyx_n_s_originalsavedir;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_outCost;
static PyObject *__pyx_n_s_outGradient;
static PyObject *__pyx_n_s_outIndex;
static PyObject *__pyx_n_s_outNames;
static PyObject *__pyx_n_s_outNormModel;
static PyObject *__pyx_n_s_outProcList;
static PyObject *__pyx_n_s_outProcList_2;
static PyObject *__pyx_n_s_outResult;
static PyObject *__pyx_n_s_outResult_2;
static PyObject *__pyx_n_s_outindex;
static PyObject *__pyx_n_s_outlev;
static PyObject *__pyx_n_s_outlevs;
static PyObject *__pyx_n_s_outnode;
static PyObject *__pyx_n_s_outnorm;
static PyObject *__pyx_n_u_outnorm;
static PyObject *__pyx_n_u_outnorm_2;
static PyObject *__pyx_n_s_outproc;
static PyObject *__pyx_n_s_output;
static PyObject *__pyx_n_s_outputArray;
static PyObject *__pyx_n_s_outputCount;
static PyObject *__pyx_n_u_outputCount;
static PyObject *__pyx_n_s_outputNames;
static PyObject *__pyx_n_s_outputNodes;
static PyObject *__pyx_n_s_outputNorm;
static PyObject *__pyx_n_s_outputWeighting;
static PyObject *__pyx_n_s_outputWeighting_2;
static PyObject *__pyx_n_u_outputnames;
static PyObject *__pyx_n_s_outputnorm;
static PyObject *__pyx_n_u_outputnorm;
static PyObject *__pyx_n_s_outputnormindex;
static PyObject *__pyx_n_s_outputs;
static PyObject *__pyx_n_s_outputsMinMaxList;
static PyObject *__pyx_n_s_outputs_2;
static PyObject *__pyx_n_s_outputsicm;
static PyObject *__pyx_n_s_outputsicp;
static PyObject *__pyx_n_s_outputtarget;
static PyObject *__pyx_n_s_outs;
static PyObject *__pyx_n_s_owner;
static PyObject *__pyx_n_s_package;
static PyObject *__pyx_n_s_param;
static PyObject *__pyx_n_s_paramCount;
static PyObject *__pyx_n_u_paramCount;
static PyObject *__pyx_n_s_paramList;
static PyObject *__pyx_n_s_paramNames;
static PyObject *__pyx_n_s_parameterNames;
static PyObject *__pyx_n_u_parameters;
static PyObject *__pyx_n_s_paramnames;
static PyObject *__pyx_n_u_paramnames;
static PyObject *__pyx_n_s_params;
static PyObject *__pyx_n_u_params;
static PyObject *__pyx_n_s_parse;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pathmem;
static PyObject *__pyx_n_s_pcount;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pname;
static PyObject *__pyx_n_s_polyType;
static PyObject *__pyx_n_s_polytype;
static PyObject *__pyx_n_s_popt;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_press;
static PyObject *__pyx_n_s_prime;
static PyObject *__pyx_n_s_prime2;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_print_2;
static PyObject *__pyx_n_u_progressive;
static PyObject *__pyx_n_u_projectionMatrix;
static PyObject *__pyx_n_s_propagate;
static PyObject *__pyx_n_s_propagateAndDirectGradient;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_kp_u_propertyName;
static PyObject *__pyx_n_s_propertyName_2;
static PyObject *__pyx_n_s_propertyName_3;
static PyObject *__pyx_n_s_propertyname;
static PyObject *__pyx_n_u_propertyname;
static PyObject *__pyx_n_u_putnorm;
static PyObject *__pyx_n_s_q;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_quiet;
static PyObject *__pyx_n_u_r;
static PyObject *__pyx_n_s_randn;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_rank;
static PyObject *__pyx_n_s_rank_2;
static PyObject *__pyx_n_u_rank_2;
static PyObject *__pyx_n_u_read;
static PyObject *__pyx_n_s_readlines;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reducedinputs;
static PyObject *__pyx_n_s_reducevec;
static PyObject *__pyx_n_s_reprlst;
static PyObject *__pyx_n_s_res;
static PyObject *__pyx_n_s_res0;
static PyObject *__pyx_n_s_res2;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_n_s_residual;
static PyObject *__pyx_n_s_residuals;
static PyObject *__pyx_n_s_residuals2;
static PyObject *__pyx_n_s_residualsPrime;
static PyObject *__pyx_n_s_resloc;
static PyObject *__pyx_n_s_restable;
static PyObject *__pyx_n_s_restoreParams;
static PyObject *__pyx_n_s_restoreParamsNT;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_results;
static PyObject *__pyx_n_s_resvec;
static PyObject *__pyx_n_s_reverse;
static PyObject *__pyx_n_s_reverse_train;
static PyObject *__pyx_n_s_rnd;
static PyObject *__pyx_n_s_root;
static PyObject *__pyx_n_u_root;
static PyObject *__pyx_n_s_rootdic;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_u_row;
static PyObject *__pyx_n_s_rr;
static PyObject *__pyx_n_s_saveDir;
static PyObject *__pyx_n_u_saveDir_2;
static PyObject *__pyx_n_s_saveModel;
static PyObject *__pyx_kp_u_saveModel_not_implemented_yet_wi;
static PyObject *__pyx_n_s_saveObj;
static PyObject *__pyx_n_s_saveParameters;
static PyObject *__pyx_n_s_savedir;
static PyObject *__pyx_n_s_savez_compressed;
static PyObject *__pyx_n_s_savingformat;
static PyObject *__pyx_n_s_scale;
static PyObject *__pyx_n_s_scipy;
static PyObject *__pyx_n_s_sdataCount;
static PyObject *__pyx_n_s_seed;
static PyObject *__pyx_n_u_seed;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_self_callback;
static PyObject *__pyx_n_s_setCallback;
static PyObject *__pyx_n_s_setLeverageComputation;
static PyObject *__pyx_n_s_setLeverageComputationOld;
static PyObject *__pyx_n_s_setPseudoMatrix;
static PyObject *__pyx_n_s_setRandSeed;
static PyObject *__pyx_n_s_setSavingFormat;
static PyObject *__pyx_n_s_setWeights;
static PyObject *__pyx_n_s_setaction;
static PyObject *__pyx_n_u_setbaselen;
static PyObject *__pyx_n_u_setcallback;
static PyObject *__pyx_n_u_setdebugfile;
static PyObject *__pyx_n_u_setdirector;
static PyObject *__pyx_n_u_setdispersion;
static PyObject *__pyx_n_u_sethalfdispersion;
static PyObject *__pyx_n_u_setidentifier;
static PyObject *__pyx_n_s_setindexvalue;
static PyObject *__pyx_kp_u_setindexvaluenNot_implemented_ye;
static PyObject *__pyx_n_u_setinputnorm;
static PyObject *__pyx_n_s_setivalue;
static PyObject *__pyx_n_u_setnorm;
static PyObject *__pyx_n_u_setparams;
static PyObject *__pyx_n_u_setproperty;
static PyObject *__pyx_n_s_setrealvalue;
static PyObject *__pyx_kp_u_setrealvalue_not_implemented_yet;
static PyObject *__pyx_n_u_setstddev;
static PyObject *__pyx_n_u_settargets;
static PyObject *__pyx_n_s_setter;
static PyObject *__pyx_n_u_settrainingset;
static PyObject *__pyx_n_u_settrainstyle;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_shift;
static PyObject *__pyx_n_s_signature;
static PyObject *__pyx_n_s_sing;
static PyObject *__pyx_n_s_singular;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_sltrainingData;
static PyObject *__pyx_n_u_smiles;
static PyObject *__pyx_n_s_sort;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_sourceopen;
static PyObject *__pyx_n_s_sp;
static PyObject *__pyx_n_s_special;
static PyObject *__pyx_n_s_specialmath;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_splitModel;
static PyObject *__pyx_n_s_splitlines;
static PyObject *__pyx_n_s_sqrt;
static PyObject *__pyx_n_s_squeeze;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_st_CostFuncUnknown;
static PyObject *__pyx_n_s_st_IndexErrorWithLimits;
static PyObject *__pyx_n_s_st_ModelURL;
static PyObject *__pyx_n_s_st_NeedFunctionName;
static PyObject *__pyx_n_s_st_REAL;
static PyObject *__pyx_n_s_st_WEIGHTS;
static PyObject *__pyx_n_s_st_XMLEncoding;
static PyObject *__pyx_n_s_st_XMLHeader;
static PyObject *__pyx_n_s_st_XMLSchema;
static PyObject *__pyx_n_s_st_XMLSchemaLoc;
static PyObject *__pyx_n_s_st_XMLStyleSheet;
static PyObject *__pyx_n_s_st_XMLVersion;
static PyObject *__pyx_n_s_st_normName;
static PyObject *__pyx_n_s_st_version;
static PyObject *__pyx_n_s_st_xmlns_xsi;
static PyObject *__pyx_n_s_startWeights;
static PyObject *__pyx_n_s_startw;
static PyObject *__pyx_n_s_statelayer;
static PyObject *__pyx_n_s_statenodeindex;
static PyObject *__pyx_n_s_std;
static PyObject *__pyx_n_s_stddev;
static PyObject *__pyx_n_u_stddev;
static PyObject *__pyx_n_u_stddev_2;
static PyObject *__pyx_n_s_stderr;
static PyObject *__pyx_n_s_stds;
static PyObject *__pyx_n_s_stdtrain;
static PyObject *__pyx_n_u_stdtrain_2;
static PyObject *__pyx_n_s_stdtrit;
static PyObject *__pyx_n_s_strainingData;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_u_student;
static PyObject *__pyx_n_s_student95;
static PyObject *__pyx_kp_u_student_variable_computation_not;
static PyObject *__pyx_n_s_students;
static PyObject *__pyx_n_s_studentvariable;
static PyObject *__pyx_n_u_studentvariable_2;
static PyObject *__pyx_n_s_stval;
static PyObject *__pyx_n_s_style;
static PyObject *__pyx_n_s_style0;
static PyObject *__pyx_n_s_stylePos;
static PyObject *__pyx_n_s_subkey;
static PyObject *__pyx_n_s_subval;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_suseOriginal;
static PyObject *__pyx_n_s_synapseCount;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_tab;
static PyObject *__pyx_n_s_tagname;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_targets;
static PyObject *__pyx_n_u_targets;
static PyObject *__pyx_n_s_tb;
static PyObject *__pyx_n_s_tempdir;
static PyObject *__pyx_n_s_tempfile;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_2;
static PyObject *__pyx_n_s_text;
static PyObject *__pyx_n_s_text_type;
static PyObject *__pyx_n_s_tf;
static PyObject *__pyx_n_s_tg;
static PyObject *__pyx_n_s_titles;
static PyObject *__pyx_n_s_toFullXML;
static PyObject *__pyx_n_s_toolbox;
static PyObject *__pyx_n_s_trace;
static PyObject *__pyx_n_s_train;
static PyObject *__pyx_n_u_train;
static PyObject *__pyx_n_s_trainable;
static PyObject *__pyx_n_s_trainable_2;
static PyObject *__pyx_n_u_trainbase;
static PyObject *__pyx_n_u_trainex;
static PyObject *__pyx_n_s_trainingData;
static PyObject *__pyx_n_s_trainingResults;
static PyObject *__pyx_n_u_trainingResults_2;
static PyObject *__pyx_n_s_trainingStDev;
static PyObject *__pyx_n_s_trainingStddev;
static PyObject *__pyx_n_s_trainstyle;
static PyObject *__pyx_n_s_transfer;
static PyObject *__pyx_n_u_transfer;
static PyObject *__pyx_n_s_transferAndDirectGradient;
static PyObject *__pyx_n_s_transferCI;
static PyObject *__pyx_n_s_transferCIOld;
static PyObject *__pyx_n_s_transferEx;
static PyObject *__pyx_n_s_transferExtra;
static PyObject *__pyx_n_s_transferExtraCI;
static PyObject *__pyx_n_s_transferLeverages;
static PyObject *__pyx_n_s_transferOld;
static PyObject *__pyx_n_u_transfergradient;
static PyObject *__pyx_n_s_transfergradientindex;
static PyObject *__pyx_n_u_transfergradientindex;
static PyObject *__pyx_n_s_transferindex;
static PyObject *__pyx_n_u_transferindex;
static PyObject *__pyx_n_u_transferleverage;
static PyObject *__pyx_n_u_transferleverage2;
static PyObject *__pyx_n_u_transferleverageex;
static PyObject *__pyx_n_u_transferprime;
static PyObject *__pyx_n_s_trueGradList;
static PyObject *__pyx_n_s_trueName;
static PyObject *__pyx_n_s_unnormalizeOutputs;
static PyObject *__pyx_n_s_usageleverages;
static PyObject *__pyx_n_u_use;
static PyObject *__pyx_n_s_useLongParams;
static PyObject *__pyx_n_s_useOriginal;
static PyObject *__pyx_n_s_util;
static PyObject *__pyx_n_s_util_const_st;
static PyObject *__pyx_n_s_util_leverage;
static PyObject *__pyx_n_s_util_monalbase;
static PyObject *__pyx_n_s_util_utils;
static PyObject *__pyx_n_s_utils;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_valelmt;
static PyObject *__pyx_n_s_valloc;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_valueid;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_vclass;
static PyObject *__pyx_n_s_vec;
static PyObject *__pyx_n_s_vecPrime;
static PyObject *__pyx_n_s_verbose;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_u_w;
static PyObject *__pyx_n_s_warnflag;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_weight;
static PyObject *__pyx_n_s_weightloc;
static PyObject *__pyx_n_s_weights;
static PyObject *__pyx_n_u_weights;
static PyObject *__pyx_n_s_weights_2;
static PyObject *__pyx_n_u_weights_2;
static PyObject *__pyx_n_u_weights_3;
static PyObject *__pyx_n_s_wformat;
static PyObject *__pyx_n_s_withCI;
static PyObject *__pyx_n_s_withlev;
static PyObject *__pyx_n_s_wname;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_writeCostFunction;
static PyObject *__pyx_n_s_wused;
static PyObject *__pyx_n_s_ww;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_xml;
static PyObject *__pyx_n_u_xml;
static PyObject *__pyx_n_s_xmlText;
static PyObject *__pyx_n_s_xml_etree_cElementTree;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_n_s_zeros;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_isNewWeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_weights); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_2setCallback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_doset, CYTHON_UNUSED PyObject *__pyx_v_fct); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_4setSavingFormat(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_2reprlst(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_4modelType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_6modelType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_8signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_10wused(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paramNames); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_12weights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_14weights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_16callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_18setCallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fct); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_20hasResampling(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_22getNewWeights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stddev, PyObject *__pyx_v_keep0); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_24loadWeightsXML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_26dispersionMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_28dispersionMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_30trainingStddev(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_32trainingStddev(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_34loadFromDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, CYTHON_UNUSED PyObject *__pyx_v_givetime); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_36loadWeightsBinary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_38loadWeightsASCII(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_40loadNormFromASCIIStrList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_42loadFromASCIIStrList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_44loadASCIIDispersion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_46extraCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_48action(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_50_setaction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_52computeFromJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacob, PyObject *__pyx_v_method, PyObject *__pyx_v_full); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_54computeUsageLeverages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_56getTransferResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_58computeTrainingResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, PyObject *__pyx_v_jacobians, PyObject *__pyx_v_actualepochs); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_60computeTrainingResultsIntegrated(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, CYTHON_UNUSED PyObject *__pyx_v_jacobians, PyObject *__pyx_v_actualepochs); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_62computeTrainingResultsOld(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, PyObject *__pyx_v_jacobians, CYTHON_UNUSED PyObject *__pyx_v_actualepochs); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_64saveParameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_modeldata, PyObject *__pyx_v_trainable, PyObject *__pyx_v_modelname, PyObject *__pyx_v_inputs, PyObject *__pyx_v_outputs, PyObject *__pyx_v_hidden, PyObject *__pyx_v_activfunc, CYTHON_UNUSED PyObject *__pyx_v_statelayer, CYTHON_UNUSED PyObject *__pyx_v_statenodeindex, CYTHON_UNUSED PyObject *__pyx_v_order, PyObject *__pyx_v_nosynapse, CYTHON_UNUSED PyObject *__pyx_v_existingnode, CYTHON_UNUSED PyObject *__pyx_v_polytype, PyObject *__pyx_v_classif, PyObject *__pyx_v_verbose, PyObject *__pyx_v_datasource, PyObject *__pyx_v_dataformat, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weights, CYTHON_UNUSED PyObject *__pyx_v_kwd); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_2__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_4setPseudoMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_6setWeights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_8trainable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_10trainable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_12inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_14inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_16inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_18outputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_20outputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_22outputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_24propertyName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_26propertyName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_28extendedInputCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_30inputCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_32outputCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_34paramCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_36longParamCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_38useLongParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_40gettargets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_42getlastresiduals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_curw); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_44parameterNames(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_46lparameterNames(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_48saveParameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_50getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_52useOriginal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_54suseOriginal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_56getrealvalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_param, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_58getindexinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_60setivalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_style, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_62setrealvalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_style, CYTHON_UNUSED PyObject *__pyx_v_index, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_64setindexvalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_style, CYTHON_UNUSED PyObject *__pyx_v_index, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_66splitModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_68_createModel(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_owner, PyObject *__pyx_v_modelname, PyObject *__pyx_v_inputs, PyObject *__pyx_v_outputs, PyObject *__pyx_v_hidden, PyObject *__pyx_v_activfunc, PyObject *__pyx_v_polytype, PyObject *__pyx_v_modelData, PyObject *__pyx_v_verbose, PyObject *__pyx_v_classif, PyObject *__pyx_v_nosynapse); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_70checkModel(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_72getNeuronOfId(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valueid); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_74initWeights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_env, PyObject *__pyx_v_bias0, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_76writeCostFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_fname); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_78loadParameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_80loadTrainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datasource, PyObject *__pyx_v_dataset, PyObject *__pyx_v_dataformat, PyObject *__pyx_v_datastyle, PyObject *__pyx_v_normalize, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_82_UnNormalizeModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_84getNomalizingMatrixFromData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_86hasOutputMiniMaxi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_88outputsMinMaxList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_90hasInputMiniMaxi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_92inputsMinMaxList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_94inputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_96inputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_98outputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_100outputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_102normalizeModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputnormindex, PyObject *__pyx_v_outputnormindex, PyObject *__pyx_v_scale, PyObject *__pyx_v_shift); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_104_getComputeCondition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_106getResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_108getResiduals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_donorm, PyObject *__pyx_v_deltares); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_110getCost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_donorm, PyObject *__pyx_v_doSum); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_112getPRESS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_leverages, PyObject *__pyx_v_donorm, PyObject *__pyx_v_root); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_114computeTrainingResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, PyObject *__pyx_v_jacobians, PyObject *__pyx_v_actualepochs); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_116getPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_doSum, PyObject *__pyx_v_cost, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_118computeTrainDataProgressive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_18__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_120computeTrainDataDirect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_20__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_122computeTrainData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_124backupParamsNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_126restoreParamsNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_128costgradientNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_130costNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_132cost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_mode, PyObject *__pyx_v_mean, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_134costAndPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_mode, PyObject *__pyx_v_mean, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_136prime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_weights, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_138residuals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_140residualsPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_142residuals2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_144Jacobian2long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_146Jacobian2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_148cost2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_150prime2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, CYTHON_UNUSED PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_152setLeverageComputation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_level, PyObject *__pyx_v_doit); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_154setLeverageComputationOld(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_level, PyObject *__pyx_v_doit); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_156isParallel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_158multitrain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_initcount, PyObject *__pyx_v_maxiter, PyObject *__pyx_v_algo, PyObject *__pyx_v_initweights, PyObject *__pyx_v_seed, PyObject *__pyx_v_callback, PyObject *__pyx_v_criterion, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_160train(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_startWeights, PyObject *__pyx_v_maxiter, PyObject *__pyx_v_algo, PyObject *__pyx_v_verbose, PyObject *__pyx_v_callback, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_162gradientCompute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_outindex); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_164directInputGradient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_166transferAndDirectGradient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_gradient, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_168_expandvec(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_inivec, PyObject *__pyx_v_fixed); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_170_reducevec(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_fixed); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_172inputTrainCost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_174inputTrainFunc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_176inputTrainGrad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_178inputTrainPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_180inputTrainPrimeFull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_182reverse_train(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_inputs, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_epochs, PyObject *__pyx_v_modelindex, PyObject *__pyx_v_callback, PyObject *__pyx_v_debug, PyObject *__pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_24__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_184transferExtra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_style, PyObject *__pyx_v_donorm, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_186transferExtraCI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_188transferEx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_withCI, PyObject *__pyx_v_modelindex); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_190transferLeverages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_weights, PyObject *__pyx_v_disp, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_192transferCI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_donorm, PyObject *__pyx_v_withlev); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_194transferCIOld(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_donorm); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_196transfer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_style, PyObject *__pyx_v_donorm, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_198normalizeInputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_norminputgrad, PyObject *__pyx_v_reverse); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_200unnormalizeOutputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_outputs, PyObject *__pyx_v_normgrad, PyObject *__pyx_v_reverse); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_202backupParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_204restoreParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_decal); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_206dimension(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_208indexInitialState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_210dataWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_212gradient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_214hessian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_216chrono(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_218dataCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_220sdataCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_222_xmlText(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_decal); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_224toFullXML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_226NMLstring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_228saveModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat, PyObject *__pyx_v_trainable, PyObject *__pyx_v_savedir, PyObject *__pyx_v_tempdir, PyObject *__pyx_v_package, CYTHON_UNUSED PyObject *__pyx_v_modeltemplate, PyObject *__pyx_v_keeptemp, PyObject *__pyx_v_verbose, PyObject *__pyx_v_compiler, PyObject *__pyx_v_forcelib, PyObject *__pyx_v_forcecreate, PyObject *__pyx_v_codeWriter, PyObject *__pyx_v_dynamiclinking); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_230trainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_232strainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_234ltrainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_236sltrainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_238confidenceLevel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_240confidenceLevel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_242addComment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_30__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6saveModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat, PyObject *__pyx_v_count, PyObject *__pyx_v_savedir, PyObject *__pyx_v_tempdir, PyObject *__pyx_v_package, PyObject *__pyx_v_keeptemp, PyObject *__pyx_v_compiler); /* proto */
static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_format = {0, &__pyx_n_s_format, 0, 0, 0};
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_0_3;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_0_01;
static PyObject *__pyx_float_0_95;
static PyObject *__pyx_float_neg_1e308;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_18;
static PyObject *__pyx_int_97;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_neg_2;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_slice__16;
static PyObject *__pyx_slice__24;
static PyObject *__pyx_slice__25;
static PyObject *__pyx_slice__26;
static PyObject *__pyx_slice__27;
static PyObject *__pyx_slice__28;
static PyObject *__pyx_slice__52;
static PyObject *__pyx_slice__53;
static PyObject *__pyx_slice__55;
static PyObject *__pyx_slice__56;
static PyObject *__pyx_slice__57;
static PyObject *__pyx_slice__58;
static PyObject *__pyx_slice__60;
static PyObject *__pyx_slice__62;
static PyObject *__pyx_slice__64;
static PyObject *__pyx_slice__66;
static PyObject *__pyx_slice__68;
static PyObject *__pyx_slice__69;
static PyObject *__pyx_slice__70;
static PyObject *__pyx_slice__71;
static PyObject *__pyx_slice__72;
static PyObject *__pyx_slice__73;
static PyObject *__pyx_slice__76;
static PyObject *__pyx_slice__78;
static PyObject *__pyx_slice__80;
static PyObject *__pyx_slice__82;
static PyObject *__pyx_slice__84;
static PyObject *__pyx_slice__85;
static PyObject *__pyx_slice__86;
static PyObject *__pyx_slice__87;
static PyObject *__pyx_slice__88;
static PyObject *__pyx_slice__89;
static PyObject *__pyx_slice__90;
static PyObject *__pyx_slice__91;
static PyObject *__pyx_slice__92;
static PyObject *__pyx_slice__93;
static PyObject *__pyx_slice__94;
static PyObject *__pyx_slice__95;
static PyObject *__pyx_slice__96;
static PyObject *__pyx_slice__98;
static PyObject *__pyx_slice__99;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_slice__105;
static PyObject *__pyx_slice__106;
static PyObject *__pyx_slice__107;
static PyObject *__pyx_slice__108;
static PyObject *__pyx_slice__109;
static PyObject *__pyx_slice__110;
static PyObject *__pyx_slice__113;
static PyObject *__pyx_slice__114;
static PyObject *__pyx_slice__116;
static PyObject *__pyx_slice__120;
static PyObject *__pyx_slice__121;
static PyObject *__pyx_slice__122;
static PyObject *__pyx_slice__123;
static PyObject *__pyx_slice__124;
static PyObject *__pyx_slice__125;
static PyObject *__pyx_slice__127;
static PyObject *__pyx_slice__129;
static PyObject *__pyx_slice__131;
static PyObject *__pyx_slice__133;
static PyObject *__pyx_slice__135;
static PyObject *__pyx_slice__137;
static PyObject *__pyx_slice__139;
static PyObject *__pyx_slice__141;
static PyObject *__pyx_slice__143;
static PyObject *__pyx_slice__145;
static PyObject *__pyx_slice__152;
static PyObject *__pyx_slice__153;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__162;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__166;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__200;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__226;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__242;
static PyObject *__pyx_tuple__244;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_tuple__269;
static PyObject *__pyx_tuple__271;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_tuple__275;
static PyObject *__pyx_tuple__277;
static PyObject *__pyx_tuple__279;
static PyObject *__pyx_tuple__281;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__285;
static PyObject *__pyx_tuple__287;
static PyObject *__pyx_tuple__288;
static PyObject *__pyx_tuple__290;
static PyObject *__pyx_tuple__292;
static PyObject *__pyx_tuple__294;
static PyObject *__pyx_tuple__296;
static PyObject *__pyx_tuple__298;
static PyObject *__pyx_tuple__300;
static PyObject *__pyx_tuple__302;
static PyObject *__pyx_tuple__304;
static PyObject *__pyx_tuple__306;
static PyObject *__pyx_tuple__308;
static PyObject *__pyx_tuple__310;
static PyObject *__pyx_tuple__312;
static PyObject *__pyx_tuple__314;
static PyObject *__pyx_tuple__315;
static PyObject *__pyx_tuple__317;
static PyObject *__pyx_tuple__319;
static PyObject *__pyx_tuple__321;
static PyObject *__pyx_tuple__322;
static PyObject *__pyx_tuple__324;
static PyObject *__pyx_tuple__325;
static PyObject *__pyx_tuple__327;
static PyObject *__pyx_tuple__329;
static PyObject *__pyx_tuple__330;
static PyObject *__pyx_tuple__332;
static PyObject *__pyx_tuple__334;
static PyObject *__pyx_tuple__336;
static PyObject *__pyx_tuple__338;
static PyObject *__pyx_tuple__340;
static PyObject *__pyx_tuple__342;
static PyObject *__pyx_tuple__344;
static PyObject *__pyx_tuple__346;
static PyObject *__pyx_tuple__348;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__352;
static PyObject *__pyx_tuple__353;
static PyObject *__pyx_tuple__355;
static PyObject *__pyx_tuple__357;
static PyObject *__pyx_tuple__358;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__361;
static PyObject *__pyx_tuple__363;
static PyObject *__pyx_tuple__364;
static PyObject *__pyx_tuple__366;
static PyObject *__pyx_tuple__367;
static PyObject *__pyx_tuple__369;
static PyObject *__pyx_tuple__370;
static PyObject *__pyx_tuple__372;
static PyObject *__pyx_tuple__373;
static PyObject *__pyx_tuple__375;
static PyObject *__pyx_tuple__377;
static PyObject *__pyx_tuple__379;
static PyObject *__pyx_tuple__381;
static PyObject *__pyx_tuple__383;
static PyObject *__pyx_tuple__384;
static PyObject *__pyx_tuple__386;
static PyObject *__pyx_tuple__388;
static PyObject *__pyx_tuple__390;
static PyObject *__pyx_tuple__391;
static PyObject *__pyx_tuple__393;
static PyObject *__pyx_tuple__394;
static PyObject *__pyx_tuple__396;
static PyObject *__pyx_tuple__397;
static PyObject *__pyx_tuple__399;
static PyObject *__pyx_tuple__400;
static PyObject *__pyx_tuple__402;
static PyObject *__pyx_tuple__403;
static PyObject *__pyx_tuple__405;
static PyObject *__pyx_tuple__406;
static PyObject *__pyx_tuple__408;
static PyObject *__pyx_tuple__409;
static PyObject *__pyx_tuple__411;
static PyObject *__pyx_tuple__412;
static PyObject *__pyx_tuple__414;
static PyObject *__pyx_tuple__415;
static PyObject *__pyx_tuple__417;
static PyObject *__pyx_tuple__418;
static PyObject *__pyx_tuple__420;
static PyObject *__pyx_tuple__421;
static PyObject *__pyx_tuple__423;
static PyObject *__pyx_tuple__424;
static PyObject *__pyx_tuple__426;
static PyObject *__pyx_tuple__428;
static PyObject *__pyx_tuple__430;
static PyObject *__pyx_tuple__431;
static PyObject *__pyx_tuple__433;
static PyObject *__pyx_tuple__434;
static PyObject *__pyx_tuple__436;
static PyObject *__pyx_tuple__438;
static PyObject *__pyx_tuple__439;
static PyObject *__pyx_tuple__441;
static PyObject *__pyx_tuple__443;
static PyObject *__pyx_tuple__445;
static PyObject *__pyx_tuple__447;
static PyObject *__pyx_tuple__449;
static PyObject *__pyx_tuple__451;
static PyObject *__pyx_tuple__453;
static PyObject *__pyx_tuple__455;
static PyObject *__pyx_tuple__456;
static PyObject *__pyx_tuple__458;
static PyObject *__pyx_tuple__460;
static PyObject *__pyx_tuple__461;
static PyObject *__pyx_tuple__463;
static PyObject *__pyx_tuple__464;
static PyObject *__pyx_tuple__466;
static PyObject *__pyx_tuple__467;
static PyObject *__pyx_tuple__469;
static PyObject *__pyx_tuple__470;
static PyObject *__pyx_tuple__472;
static PyObject *__pyx_tuple__473;
static PyObject *__pyx_tuple__475;
static PyObject *__pyx_tuple__477;
static PyObject *__pyx_tuple__478;
static PyObject *__pyx_tuple__480;
static PyObject *__pyx_tuple__481;
static PyObject *__pyx_tuple__483;
static PyObject *__pyx_tuple__485;
static PyObject *__pyx_tuple__486;
static PyObject *__pyx_tuple__488;
static PyObject *__pyx_tuple__490;
static PyObject *__pyx_tuple__492;
static PyObject *__pyx_tuple__494;
static PyObject *__pyx_tuple__496;
static PyObject *__pyx_tuple__498;
static PyObject *__pyx_tuple__500;
static PyObject *__pyx_tuple__502;
static PyObject *__pyx_tuple__504;
static PyObject *__pyx_tuple__506;
static PyObject *__pyx_tuple__508;
static PyObject *__pyx_tuple__510;
static PyObject *__pyx_tuple__512;
static PyObject *__pyx_tuple__514;
static PyObject *__pyx_tuple__516;
static PyObject *__pyx_tuple__518;
static PyObject *__pyx_tuple__520;
static PyObject *__pyx_tuple__522;
static PyObject *__pyx_tuple__524;
static PyObject *__pyx_tuple__525;
static PyObject *__pyx_tuple__527;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__233;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__239;
static PyObject *__pyx_codeobj__243;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__258;
static PyObject *__pyx_codeobj__260;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__264;
static PyObject *__pyx_codeobj__266;
static PyObject *__pyx_codeobj__268;
static PyObject *__pyx_codeobj__270;
static PyObject *__pyx_codeobj__272;
static PyObject *__pyx_codeobj__274;
static PyObject *__pyx_codeobj__276;
static PyObject *__pyx_codeobj__278;
static PyObject *__pyx_codeobj__280;
static PyObject *__pyx_codeobj__282;
static PyObject *__pyx_codeobj__284;
static PyObject *__pyx_codeobj__286;
static PyObject *__pyx_codeobj__289;
static PyObject *__pyx_codeobj__291;
static PyObject *__pyx_codeobj__293;
static PyObject *__pyx_codeobj__295;
static PyObject *__pyx_codeobj__297;
static PyObject *__pyx_codeobj__299;
static PyObject *__pyx_codeobj__301;
static PyObject *__pyx_codeobj__303;
static PyObject *__pyx_codeobj__305;
static PyObject *__pyx_codeobj__307;
static PyObject *__pyx_codeobj__309;
static PyObject *__pyx_codeobj__311;
static PyObject *__pyx_codeobj__313;
static PyObject *__pyx_codeobj__316;
static PyObject *__pyx_codeobj__318;
static PyObject *__pyx_codeobj__320;
static PyObject *__pyx_codeobj__323;
static PyObject *__pyx_codeobj__326;
static PyObject *__pyx_codeobj__328;
static PyObject *__pyx_codeobj__331;
static PyObject *__pyx_codeobj__333;
static PyObject *__pyx_codeobj__335;
static PyObject *__pyx_codeobj__337;
static PyObject *__pyx_codeobj__339;
static PyObject *__pyx_codeobj__341;
static PyObject *__pyx_codeobj__343;
static PyObject *__pyx_codeobj__345;
static PyObject *__pyx_codeobj__347;
static PyObject *__pyx_codeobj__349;
static PyObject *__pyx_codeobj__351;
static PyObject *__pyx_codeobj__354;
static PyObject *__pyx_codeobj__356;
static PyObject *__pyx_codeobj__359;
static PyObject *__pyx_codeobj__362;
static PyObject *__pyx_codeobj__365;
static PyObject *__pyx_codeobj__368;
static PyObject *__pyx_codeobj__371;
static PyObject *__pyx_codeobj__374;
static PyObject *__pyx_codeobj__376;
static PyObject *__pyx_codeobj__378;
static PyObject *__pyx_codeobj__380;
static PyObject *__pyx_codeobj__382;
static PyObject *__pyx_codeobj__385;
static PyObject *__pyx_codeobj__387;
static PyObject *__pyx_codeobj__389;
static PyObject *__pyx_codeobj__392;
static PyObject *__pyx_codeobj__395;
static PyObject *__pyx_codeobj__398;
static PyObject *__pyx_codeobj__401;
static PyObject *__pyx_codeobj__404;
static PyObject *__pyx_codeobj__407;
static PyObject *__pyx_codeobj__410;
static PyObject *__pyx_codeobj__413;
static PyObject *__pyx_codeobj__416;
static PyObject *__pyx_codeobj__419;
static PyObject *__pyx_codeobj__422;
static PyObject *__pyx_codeobj__425;
static PyObject *__pyx_codeobj__427;
static PyObject *__pyx_codeobj__429;
static PyObject *__pyx_codeobj__432;
static PyObject *__pyx_codeobj__435;
static PyObject *__pyx_codeobj__437;
static PyObject *__pyx_codeobj__440;
static PyObject *__pyx_codeobj__442;
static PyObject *__pyx_codeobj__444;
static PyObject *__pyx_codeobj__446;
static PyObject *__pyx_codeobj__448;
static PyObject *__pyx_codeobj__450;
static PyObject *__pyx_codeobj__452;
static PyObject *__pyx_codeobj__454;
static PyObject *__pyx_codeobj__457;
static PyObject *__pyx_codeobj__459;
static PyObject *__pyx_codeobj__462;
static PyObject *__pyx_codeobj__465;
static PyObject *__pyx_codeobj__468;
static PyObject *__pyx_codeobj__471;
static PyObject *__pyx_codeobj__474;
static PyObject *__pyx_codeobj__476;
static PyObject *__pyx_codeobj__479;
static PyObject *__pyx_codeobj__482;
static PyObject *__pyx_codeobj__484;
static PyObject *__pyx_codeobj__487;
static PyObject *__pyx_codeobj__489;
static PyObject *__pyx_codeobj__491;
static PyObject *__pyx_codeobj__493;
static PyObject *__pyx_codeobj__495;
static PyObject *__pyx_codeobj__497;
static PyObject *__pyx_codeobj__499;
static PyObject *__pyx_codeobj__501;
static PyObject *__pyx_codeobj__503;
static PyObject *__pyx_codeobj__505;
static PyObject *__pyx_codeobj__507;
static PyObject *__pyx_codeobj__509;
static PyObject *__pyx_codeobj__511;
static PyObject *__pyx_codeobj__513;
static PyObject *__pyx_codeobj__515;
static PyObject *__pyx_codeobj__517;
static PyObject *__pyx_codeobj__519;
static PyObject *__pyx_codeobj__521;
static PyObject *__pyx_codeobj__523;
static PyObject *__pyx_codeobj__526;
/* Late includes */

/* "metaphor/monal/driver/_driver.py":82
 * warnings.filterwarnings("ignore", category=RuntimeWarning)
 * 
 * def isNewWeight(target, weights):             # <<<<<<<<<<<<<<
 *     if weights is None:
 *         return False
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_1isNewWeight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_1isNewWeight = {"isNewWeight", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_1isNewWeight, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_1isNewWeight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isNewWeight (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,&__pyx_n_s_weights,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("isNewWeight", 1, 2, 2, 1); __PYX_ERR(0, 82, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isNewWeight") < 0)) __PYX_ERR(0, 82, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_target = values[0];
    __pyx_v_weights = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isNewWeight", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.isNewWeight", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_isNewWeight(__pyx_self, __pyx_v_target, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_isNewWeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_weights) {
  PyObject *__pyx_v_tg = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("isNewWeight", 0);

  /* "metaphor/monal/driver/_driver.py":83
 * 
 * def isNewWeight(target, weights):
 *     if weights is None:             # <<<<<<<<<<<<<<
 *         return False
 *     for tg, val in zip(target.weights, weights):
 */
  __pyx_t_1 = (__pyx_v_weights == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":84
 * def isNewWeight(target, weights):
 *     if weights is None:
 *         return False             # <<<<<<<<<<<<<<
 *     for tg, val in zip(target.weights, weights):
 *         if tg != val:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":83
 * 
 * def isNewWeight(target, weights):
 *     if weights is None:             # <<<<<<<<<<<<<<
 *         return False
 *     for tg, val in zip(target.weights, weights):
 */
  }

  /* "metaphor/monal/driver/_driver.py":85
 *     if weights is None:
 *         return False
 *     for tg, val in zip(target.weights, weights):             # <<<<<<<<<<<<<<
 *         if tg != val:
 *             return True
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_weights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_weights);
  __Pyx_GIVEREF(__pyx_v_weights);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_weights);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 85, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 85, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 85, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 85, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 85, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_tg, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":86
 *         return False
 *     for tg, val in zip(target.weights, weights):
 *         if tg != val:             # <<<<<<<<<<<<<<
 *             return True
 *     return False
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_tg, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":87
 *     for tg, val in zip(target.weights, weights):
 *         if tg != val:
 *             return True             # <<<<<<<<<<<<<<
 *     return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":86
 *         return False
 *     for tg, val in zip(target.weights, weights):
 *         if tg != val:             # <<<<<<<<<<<<<<
 *             return True
 *     return False
 */
    }

    /* "metaphor/monal/driver/_driver.py":85
 *     if weights is None:
 *         return False
 *     for tg, val in zip(target.weights, weights):             # <<<<<<<<<<<<<<
 *         if tg != val:
 *             return True
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":88
 *         if tg != val:
 *             return True
 *     return False             # <<<<<<<<<<<<<<
 * 
 * # def set RandSeed(sed=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":82
 * warnings.filterwarnings("ignore", category=RuntimeWarning)
 * 
 * def isNewWeight(target, weights):             # <<<<<<<<<<<<<<
 *     if weights is None:
 *         return False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.isNewWeight", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tg);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":104
 * #     return rnd.set_state(state)
 * 
 * def setCallback(doset=True, fct=None):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_3setCallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_3setCallback = {"setCallback", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_3setCallback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_3setCallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_doset = 0;
  CYTHON_UNUSED PyObject *__pyx_v_fct = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCallback (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_doset,&__pyx_n_s_fct,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)((PyObject *)Py_True));
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doset);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fct);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCallback") < 0)) __PYX_ERR(0, 104, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_doset = values[0];
    __pyx_v_fct = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCallback", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 104, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.setCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_2setCallback(__pyx_self, __pyx_v_doset, __pyx_v_fct);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_2setCallback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_doset, CYTHON_UNUSED PyObject *__pyx_v_fct) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCallback", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":110
 * #     pass
 * 
 * def setSavingFormat( value ):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_5setSavingFormat(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_5setSavingFormat = {"setSavingFormat", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_5setSavingFormat, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_5setSavingFormat(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSavingFormat (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_4setSavingFormat(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_4setSavingFormat(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSavingFormat", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":146
 *     _tab = ""
 * 
 *     def __init__(self, verbose=0):             # <<<<<<<<<<<<<<
 *         super(DriverBase, self).__init__(None)
 *         self.verbose = verbose
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_verbose,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 146, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_verbose = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase___init__(__pyx_self, __pyx_v_self, __pyx_v_verbose);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_verbose) {
  CYTHON_UNUSED PyObject *__pyx_v_self_callback = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "metaphor/monal/driver/_driver.py":147
 * 
 *     def __init__(self, verbose=0):
 *         super(DriverBase, self).__init__(None)             # <<<<<<<<<<<<<<
 *         self.verbose = verbose
 *         self_callback = None
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DriverBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":148
 *     def __init__(self, verbose=0):
 *         super(DriverBase, self).__init__(None)
 *         self.verbose = verbose             # <<<<<<<<<<<<<<
 *         self_callback = None
 *         #self._propertyname = ""
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 148, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":149
 *         super(DriverBase, self).__init__(None)
 *         self.verbose = verbose
 *         self_callback = None             # <<<<<<<<<<<<<<
 *         #self._propertyname = ""
 *         #self.wused = None
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_self_callback = Py_None;

  /* "metaphor/monal/driver/_driver.py":146
 *     _tab = ""
 * 
 *     def __init__(self, verbose=0):             # <<<<<<<<<<<<<<
 *         super(DriverBase, self).__init__(None)
 *         self.verbose = verbose
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_self_callback);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":153
 *         #self.wused = None
 * 
 *     def reprlst(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         lst = super(DriverBase, self).reprlst()
 *         lst.append("modelType : {}".format(self.modelType))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_3reprlst(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_3reprlst = {"reprlst", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_3reprlst, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_3reprlst(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reprlst (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_2reprlst(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_2reprlst(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reprlst", 0);

  /* "metaphor/monal/driver/_driver.py":154
 * 
 *     def reprlst(self):  # DriverBase
 *         lst = super(DriverBase, self).reprlst()             # <<<<<<<<<<<<<<
 *         lst.append("modelType : {}".format(self.modelType))
 *         lst.append("extraCount : {}".format(self.extraCount))
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DriverBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reprlst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_lst = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":155
 *     def reprlst(self):  # DriverBase
 *         lst = super(DriverBase, self).reprlst()
 *         lst.append("modelType : {}".format(self.modelType))             # <<<<<<<<<<<<<<
 *         lst.append("extraCount : {}".format(self.extraCount))
 *         lst.append("propertyName : {}".format(self.propertyName))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_modelType, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":156
 *         lst = super(DriverBase, self).reprlst()
 *         lst.append("modelType : {}".format(self.modelType))
 *         lst.append("extraCount : {}".format(self.extraCount))             # <<<<<<<<<<<<<<
 *         lst.append("propertyName : {}".format(self.propertyName))
 *         return lst
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_extraCount, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraCount_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":157
 *         lst.append("modelType : {}".format(self.modelType))
 *         lst.append("extraCount : {}".format(self.extraCount))
 *         lst.append("propertyName : {}".format(self.propertyName))             # <<<<<<<<<<<<<<
 *         return lst
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_propertyName, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":158
 *         lst.append("extraCount : {}".format(self.extraCount))
 *         lst.append("propertyName : {}".format(self.propertyName))
 *         return lst             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_lst);
  __pyx_r = __pyx_v_lst;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":153
 *         #self.wused = None
 * 
 *     def reprlst(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         lst = super(DriverBase, self).reprlst()
 *         lst.append("modelType : {}".format(self.modelType))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.reprlst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":161
 * 
 *     @Property
 *     def modelType(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.modelType
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_5modelType(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_5modelType = {"modelType", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_5modelType, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_5modelType(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("modelType (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_4modelType(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_4modelType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("modelType", 0);

  /* "metaphor/monal/driver/_driver.py":162
 *     @Property
 *     def modelType(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.mainModel.modelType
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":163
 *     def modelType(self):
 *         try:
 *             return self.mainModel.modelType             # <<<<<<<<<<<<<<
 *         except:
 *             return 0  #self._modelType
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_modelType_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L7_try_return;

      /* "metaphor/monal/driver/_driver.py":162
 *     @Property
 *     def modelType(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.mainModel.modelType
 *         except:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":164
 *         try:
 *             return self.mainModel.modelType
 *         except:             # <<<<<<<<<<<<<<
 *             return 0  #self._modelType
 *     @modelType.setter
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.modelType", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 164, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/monal/driver/_driver.py":165
 *             return self.mainModel.modelType
 *         except:
 *             return 0  #self._modelType             # <<<<<<<<<<<<<<
 *     @modelType.setter
 *     def modelType(self, value):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_0);
      __pyx_r = __pyx_int_0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":162
 *     @Property
 *     def modelType(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.mainModel.modelType
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":161
 * 
 *     @Property
 *     def modelType(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.modelType
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.modelType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":167
 *             return 0  #self._modelType
 *     @modelType.setter
 *     def modelType(self, value):             # <<<<<<<<<<<<<<
 *         self.mainModel.modelType = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_7modelType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_7modelType = {"modelType", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_7modelType, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_7modelType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("modelType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("modelType", 1, 2, 2, 1); __PYX_ERR(0, 167, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modelType") < 0)) __PYX_ERR(0, 167, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("modelType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 167, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.modelType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_6modelType(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_6modelType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("modelType", 0);

  /* "metaphor/monal/driver/_driver.py":168
 *     @modelType.setter
 *     def modelType(self, value):
 *         self.mainModel.modelType = value             # <<<<<<<<<<<<<<
 * 
 *     def signature(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_modelType_2, __pyx_v_value) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":167
 *             return 0  #self._modelType
 *     @modelType.setter
 *     def modelType(self, value):             # <<<<<<<<<<<<<<
 *         self.mainModel.modelType = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.modelType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":170
 *         self.mainModel.modelType = value
 * 
 *     def signature(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.signature()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_9signature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_9signature = {"signature", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_9signature, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_9signature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("signature (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_8signature(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_8signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_weights = NULL;
  PyObject *__pyx_v_inputs = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_ind = NULL;
  CYTHON_UNUSED PyObject *__pyx_7genexpr__pyx_v__ = NULL;
  CYTHON_UNUSED PyObject *__pyx_8genexpr1__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  __Pyx_RefNannySetupContext("signature", 0);

  /* "metaphor/monal/driver/_driver.py":171
 * 
 *     def signature(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.mainModel.signature()
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":172
 *     def signature(self):
 *         try:
 *             return self.mainModel.signature()             # <<<<<<<<<<<<<<
 *         except:
 * #             hasweights = self.weights is not None
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_signature); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L3_error)
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "metaphor/monal/driver/_driver.py":171
 * 
 *     def signature(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.mainModel.signature()
 *         except:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":173
 *         try:
 *             return self.mainModel.signature()
 *         except:             # <<<<<<<<<<<<<<
 * #             hasweights = self.weights is not None
 * #             if hasweights:
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 173, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);

      /* "metaphor/monal/driver/_driver.py":179
 * #             else:
 * #                 memweights = None
 *             weights = [0.01 for _ in range(self.paramCount)]             # <<<<<<<<<<<<<<
 *             inputs = [0.01 for _ in range(self.inputCount)]
 *             try:
 */
      { /* enter inner scope */
        __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 179, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 179, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 179, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
          __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
        } else {
          __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 179, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 179, __pyx_L13_error)
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        for (;;) {
          if (likely(!__pyx_t_11)) {
            if (likely(PyList_CheckExact(__pyx_t_8))) {
              if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 179, __pyx_L13_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 179, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            } else {
              if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 179, __pyx_L13_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 179, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            }
          } else {
            __pyx_t_9 = __pyx_t_11(__pyx_t_8);
            if (unlikely(!__pyx_t_9)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 179, __pyx_L13_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v__, __pyx_t_9);
          __pyx_t_9 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_float_0_01))) __PYX_ERR(0, 179, __pyx_L13_error)
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v__); __pyx_7genexpr__pyx_v__ = 0;
        goto __pyx_L16_exit_scope;
        __pyx_L13_error:;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v__); __pyx_7genexpr__pyx_v__ = 0;
        goto __pyx_L5_except_error;
        __pyx_L16_exit_scope:;
      } /* exit inner scope */
      __pyx_v_weights = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":180
 * #                 memweights = None
 *             weights = [0.01 for _ in range(self.paramCount)]
 *             inputs = [0.01 for _ in range(self.inputCount)]             # <<<<<<<<<<<<<<
 *             try:
 *                 res = self.transfer(weights, inputs)
 */
      { /* enter inner scope */
        __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 180, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
          __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
        } else {
          __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 180, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 180, __pyx_L19_error)
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        for (;;) {
          if (likely(!__pyx_t_11)) {
            if (likely(PyList_CheckExact(__pyx_t_8))) {
              if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 180, __pyx_L19_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L19_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            } else {
              if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 180, __pyx_L19_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L19_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            }
          } else {
            __pyx_t_9 = __pyx_t_11(__pyx_t_8);
            if (unlikely(!__pyx_t_9)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 180, __pyx_L19_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v__, __pyx_t_9);
          __pyx_t_9 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_float_0_01))) __PYX_ERR(0, 180, __pyx_L19_error)
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_8genexpr1__pyx_v__); __pyx_8genexpr1__pyx_v__ = 0;
        goto __pyx_L22_exit_scope;
        __pyx_L19_error:;
        __Pyx_XDECREF(__pyx_8genexpr1__pyx_v__); __pyx_8genexpr1__pyx_v__ = 0;
        goto __pyx_L5_except_error;
        __pyx_L22_exit_scope:;
      } /* exit inner scope */
      __pyx_v_inputs = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":181
 *             weights = [0.01 for _ in range(self.paramCount)]
 *             inputs = [0.01 for _ in range(self.inputCount)]
 *             try:             # <<<<<<<<<<<<<<
 *                 res = self.transfer(weights, inputs)
 *             except:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        /*try:*/ {

          /* "metaphor/monal/driver/_driver.py":182
 *             inputs = [0.01 for _ in range(self.inputCount)]
 *             try:
 *                 res = self.transfer(weights, inputs)             # <<<<<<<<<<<<<<
 *             except:
 *                 res = 0
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_weights, __pyx_v_inputs};
            __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L23_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_7);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_weights, __pyx_v_inputs};
            __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L23_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_7);
          } else
          #endif
          {
            __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 182, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_16);
            if (__pyx_t_9) {
              __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_9); __pyx_t_9 = NULL;
            }
            __Pyx_INCREF(__pyx_v_weights);
            __Pyx_GIVEREF(__pyx_v_weights);
            PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_weights);
            __Pyx_INCREF(__pyx_v_inputs);
            __Pyx_GIVEREF(__pyx_v_inputs);
            PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_inputs);
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_res = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":181
 *             weights = [0.01 for _ in range(self.paramCount)]
 *             inputs = [0.01 for _ in range(self.inputCount)]
 *             try:             # <<<<<<<<<<<<<<
 *                 res = self.transfer(weights, inputs)
 *             except:
 */
        }
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L30_try_end;
        __pyx_L23_error:;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":183
 *             try:
 *                 res = self.transfer(weights, inputs)
 *             except:             # <<<<<<<<<<<<<<
 *                 res = 0
 *                 for ind in range(self.modelCount):
 */
        /*except:*/ {
          __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_16) < 0) __PYX_ERR(0, 183, __pyx_L25_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_16);

          /* "metaphor/monal/driver/_driver.py":184
 *                 res = self.transfer(weights, inputs)
 *             except:
 *                 res = 0             # <<<<<<<<<<<<<<
 *                 for ind in range(self.modelCount):
 *                     res += self.transferindex(weights, ind)
 */
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_XDECREF_SET(__pyx_v_res, __pyx_int_0);

          /* "metaphor/monal/driver/_driver.py":185
 *             except:
 *                 res = 0
 *                 for ind in range(self.modelCount):             # <<<<<<<<<<<<<<
 *                     res += self.transferindex(weights, ind)
 * #             self.weights = memweights
 */
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelCount); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L25_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 185, __pyx_L25_except_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (likely(PyList_CheckExact(__pyx_t_17)) || PyTuple_CheckExact(__pyx_t_17)) {
            __pyx_t_9 = __pyx_t_17; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0;
            __pyx_t_11 = NULL;
          } else {
            __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L25_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 185, __pyx_L25_except_error)
          }
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          for (;;) {
            if (likely(!__pyx_t_11)) {
              if (likely(PyList_CheckExact(__pyx_t_9))) {
                if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_17 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_17); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L25_except_error)
                #else
                __pyx_t_17 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 185, __pyx_L25_except_error)
                __Pyx_GOTREF(__pyx_t_17);
                #endif
              } else {
                if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_17); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L25_except_error)
                #else
                __pyx_t_17 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 185, __pyx_L25_except_error)
                __Pyx_GOTREF(__pyx_t_17);
                #endif
              }
            } else {
              __pyx_t_17 = __pyx_t_11(__pyx_t_9);
              if (unlikely(!__pyx_t_17)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 185, __pyx_L25_except_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_17);
            }
            __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_17);
            __pyx_t_17 = 0;

            /* "metaphor/monal/driver/_driver.py":186
 *                 res = 0
 *                 for ind in range(self.modelCount):
 *                     res += self.transferindex(weights, ind)             # <<<<<<<<<<<<<<
 * #             self.weights = memweights
 *             return res
 */
            __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferindex); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 186, __pyx_L25_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_19 = NULL;
            __pyx_t_15 = 0;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
              __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_18);
              if (likely(__pyx_t_19)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                __Pyx_INCREF(__pyx_t_19);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_18, function);
                __pyx_t_15 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_18)) {
              PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_v_weights, __pyx_v_ind};
              __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 186, __pyx_L25_except_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_17);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
              PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_v_weights, __pyx_v_ind};
              __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 186, __pyx_L25_except_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_17);
            } else
            #endif
            {
              __pyx_t_20 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 186, __pyx_L25_except_error)
              __Pyx_GOTREF(__pyx_t_20);
              if (__pyx_t_19) {
                __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19); __pyx_t_19 = NULL;
              }
              __Pyx_INCREF(__pyx_v_weights);
              __Pyx_GIVEREF(__pyx_v_weights);
              PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_15, __pyx_v_weights);
              __Pyx_INCREF(__pyx_v_ind);
              __Pyx_GIVEREF(__pyx_v_ind);
              PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_15, __pyx_v_ind);
              __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_20, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 186, __pyx_L25_except_error)
              __Pyx_GOTREF(__pyx_t_17);
              __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            }
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_v_res, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 186, __pyx_L25_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_18);
            __pyx_t_18 = 0;

            /* "metaphor/monal/driver/_driver.py":185
 *             except:
 *                 res = 0
 *                 for ind in range(self.modelCount):             # <<<<<<<<<<<<<<
 *                     res += self.transferindex(weights, ind)
 * #             self.weights = memweights
 */
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L24_exception_handled;
        }
        __pyx_L25_except_error:;

        /* "metaphor/monal/driver/_driver.py":181
 *             weights = [0.01 for _ in range(self.paramCount)]
 *             inputs = [0.01 for _ in range(self.inputCount)]
 *             try:             # <<<<<<<<<<<<<<
 *                 res = self.transfer(weights, inputs)
 *             except:
 */
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        goto __pyx_L5_except_error;
        __pyx_L24_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        __pyx_L30_try_end:;
      }

      /* "metaphor/monal/driver/_driver.py":188
 *                     res += self.transferindex(weights, ind)
 * #             self.weights = memweights
 *             return res             # <<<<<<<<<<<<<<
 * 
 *     def wused(self, paramNames=None): # ModelLib
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":171
 * 
 *     def signature(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.mainModel.signature()
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":170
 *         self.mainModel.modelType = value
 * 
 *     def signature(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.signature()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weights);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v__);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":190
 *             return res
 * 
 *     def wused(self, paramNames=None): # ModelLib             # <<<<<<<<<<<<<<
 *         if paramNames is None:
 *             paramNames = self.paramNames
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_11wused(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_11wused = {"wused", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_11wused, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_11wused(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_paramNames = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wused (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_paramNames,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paramNames);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wused") < 0)) __PYX_ERR(0, 190, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_paramNames = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wused", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.wused", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_10wused(__pyx_self, __pyx_v_self, __pyx_v_paramNames);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_10wused(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paramNames) {
  PyObject *__pyx_v_ls = NULL;
  PyObject *__pyx_v_target = NULL;
  PyObject *__pyx_v_cur = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_pname = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("wused", 0);
  __Pyx_INCREF(__pyx_v_paramNames);

  /* "metaphor/monal/driver/_driver.py":191
 * 
 *     def wused(self, paramNames=None): # ModelLib
 *         if paramNames is None:             # <<<<<<<<<<<<<<
 *             paramNames = self.paramNames
 *         ls = self.paramCount
 */
  __pyx_t_1 = (__pyx_v_paramNames == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":192
 *     def wused(self, paramNames=None): # ModelLib
 *         if paramNames is None:
 *             paramNames = self.paramNames             # <<<<<<<<<<<<<<
 *         ls = self.paramCount
 *         target = zeros((ls,), dtype=npint)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramNames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_paramNames, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":191
 * 
 *     def wused(self, paramNames=None): # ModelLib
 *         if paramNames is None:             # <<<<<<<<<<<<<<
 *             paramNames = self.paramNames
 *         ls = self.paramCount
 */
  }

  /* "metaphor/monal/driver/_driver.py":193
 *         if paramNames is None:
 *             paramNames = self.paramNames
 *         ls = self.paramCount             # <<<<<<<<<<<<<<
 *         target = zeros((ls,), dtype=npint)
 *         cur = 0
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_ls = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":194
 *             paramNames = self.paramNames
 *         ls = self.paramCount
 *         target = zeros((ls,), dtype=npint)             # <<<<<<<<<<<<<<
 *         cur = 0
 *         for ind, pname in enumerate(paramNames):
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_ls);
  __Pyx_GIVEREF(__pyx_v_ls);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ls);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_npint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_target = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":195
 *         ls = self.paramCount
 *         target = zeros((ls,), dtype=npint)
 *         cur = 0             # <<<<<<<<<<<<<<
 *         for ind, pname in enumerate(paramNames):
 *             for i in range(ls):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_cur = __pyx_int_0;

  /* "metaphor/monal/driver/_driver.py":196
 *         target = zeros((ls,), dtype=npint)
 *         cur = 0
 *         for ind, pname in enumerate(paramNames):             # <<<<<<<<<<<<<<
 *             for i in range(ls):
 *                 if pname == self.mainModel.paramNames(i):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_6 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_paramNames)) || PyTuple_CheckExact(__pyx_v_paramNames)) {
    __pyx_t_4 = __pyx_v_paramNames; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_paramNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 196, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_8(__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 196, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_pname, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":197
 *         cur = 0
 *         for ind, pname in enumerate(paramNames):
 *             for i in range(ls):             # <<<<<<<<<<<<<<
 *                 if pname == self.mainModel.paramNames(i):
 *                     target[cur] = ind
 */
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_ls); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 197, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_10(__pyx_t_3);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 197, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":198
 *         for ind, pname in enumerate(paramNames):
 *             for i in range(ls):
 *                 if pname == self.mainModel.paramNames(i):             # <<<<<<<<<<<<<<
 *                     target[cur] = ind
 *                     cur += 1
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_paramNames); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
        }
      }
      if (!__pyx_t_11) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_i};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_i};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 198, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
          __Pyx_INCREF(__pyx_v_i);
          __Pyx_GIVEREF(__pyx_v_i);
          PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_i);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_RichCompare(__pyx_v_pname, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":199
 *             for i in range(ls):
 *                 if pname == self.mainModel.paramNames(i):
 *                     target[cur] = ind             # <<<<<<<<<<<<<<
 *                     cur += 1
 *                     break
 */
        if (unlikely(PyObject_SetItem(__pyx_v_target, __pyx_v_cur, __pyx_v_ind) < 0)) __PYX_ERR(0, 199, __pyx_L1_error)

        /* "metaphor/monal/driver/_driver.py":200
 *                 if pname == self.mainModel.paramNames(i):
 *                     target[cur] = ind
 *                     cur += 1             # <<<<<<<<<<<<<<
 *                     break
 *         return target
 */
        __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_v_cur, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF_SET(__pyx_v_cur, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "metaphor/monal/driver/_driver.py":201
 *                     target[cur] = ind
 *                     cur += 1
 *                     break             # <<<<<<<<<<<<<<
 *         return target
 * 
 */
        goto __pyx_L7_break;

        /* "metaphor/monal/driver/_driver.py":198
 *         for ind, pname in enumerate(paramNames):
 *             for i in range(ls):
 *                 if pname == self.mainModel.paramNames(i):             # <<<<<<<<<<<<<<
 *                     target[cur] = ind
 *                     cur += 1
 */
      }

      /* "metaphor/monal/driver/_driver.py":197
 *         cur = 0
 *         for ind, pname in enumerate(paramNames):
 *             for i in range(ls):             # <<<<<<<<<<<<<<
 *                 if pname == self.mainModel.paramNames(i):
 *                     target[cur] = ind
 */
    }
    __pyx_L7_break:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":196
 *         target = zeros((ls,), dtype=npint)
 *         cur = 0
 *         for ind, pname in enumerate(paramNames):             # <<<<<<<<<<<<<<
 *             for i in range(ls):
 *                 if pname == self.mainModel.paramNames(i):
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":202
 *                     cur += 1
 *                     break
 *         return target             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_target);
  __pyx_r = __pyx_v_target;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":190
 *             return res
 * 
 *     def wused(self, paramNames=None): # ModelLib             # <<<<<<<<<<<<<<
 *         if paramNames is None:
 *             paramNames = self.paramNames
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.wused", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ls);
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XDECREF(__pyx_v_cur);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_pname);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_paramNames);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":205
 * 
 *     @property
 *     def weights(self):             # <<<<<<<<<<<<<<
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_13weights(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_13weights = {"weights", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_13weights, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_13weights(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weights (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_12weights(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_12weights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hasw = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("weights", 0);

  /* "metaphor/monal/driver/_driver.py":206
 *     @property
 *     def weights(self):
 *         hasw = hasattr(self, "_weights") and self._weights is not None             # <<<<<<<<<<<<<<
 *         if hasw:
 *             return self._weights
 */
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_u_weights_2); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 206, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_v_hasw = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":207
 *     def weights(self):
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:             # <<<<<<<<<<<<<<
 *             return self._weights
 *         if self.mainModel.weights is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_hasw); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":208
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:
 *             return self._weights             # <<<<<<<<<<<<<<
 *         if self.mainModel.weights is not None:
 *             return self.mainModel.weights
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":207
 *     def weights(self):
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:             # <<<<<<<<<<<<<<
 *             return self._weights
 *         if self.mainModel.weights is not None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":209
 *         if hasw:
 *             return self._weights
 *         if self.mainModel.weights is not None:             # <<<<<<<<<<<<<<
 *             return self.mainModel.weights
 *         return None
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_weights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":210
 *             return self._weights
 *         if self.mainModel.weights is not None:
 *             return self.mainModel.weights             # <<<<<<<<<<<<<<
 *         return None
 *     @weights.setter
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":209
 *         if hasw:
 *             return self._weights
 *         if self.mainModel.weights is not None:             # <<<<<<<<<<<<<<
 *             return self.mainModel.weights
 *         return None
 */
  }

  /* "metaphor/monal/driver/_driver.py":211
 *         if self.mainModel.weights is not None:
 *             return self.mainModel.weights
 *         return None             # <<<<<<<<<<<<<<
 *     @weights.setter
 *     def weights(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":205
 * 
 *     @property
 *     def weights(self):             # <<<<<<<<<<<<<<
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.weights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hasw);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":213
 *         return None
 *     @weights.setter
 *     def weights(self, value):             # <<<<<<<<<<<<<<
 *         self._weights = array(value).copy()
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_15weights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_15weights = {"weights", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_15weights, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_15weights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weights (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("weights", 1, 2, 2, 1); __PYX_ERR(0, 213, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "weights") < 0)) __PYX_ERR(0, 213, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("weights", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 213, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.weights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_14weights(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_14weights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("weights", 0);

  /* "metaphor/monal/driver/_driver.py":214
 *     @weights.setter
 *     def weights(self, value):
 *         self._weights = array(value).copy()             # <<<<<<<<<<<<<<
 *         try:
 *             self.mainModel.weights = self._weights
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights_2, __pyx_t_1) < 0) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":215
 *     def weights(self, value):
 *         self._weights = array(value).copy()
 *         try:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self._weights
 *         except: pass
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":216
 *         self._weights = array(value).copy()
 *         try:
 *             self.mainModel.weights = self._weights             # <<<<<<<<<<<<<<
 *         except: pass
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_weights, __pyx_t_1) < 0) __PYX_ERR(0, 216, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":215
 *     def weights(self, value):
 *         self._weights = array(value).copy()
 *         try:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self._weights
 *         except: pass
 */
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":217
 *         try:
 *             self.mainModel.weights = self._weights
 *         except: pass             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L8_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":213
 *         return None
 *     @weights.setter
 *     def weights(self, value):             # <<<<<<<<<<<<<<
 *         self._weights = array(value).copy()
 *         try:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.weights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":220
 * 
 *     @Property
 *     def callback(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._callback
 * #     @callback.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_17callback(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_17callback = {"callback", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_17callback, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_17callback(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("callback (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_16callback(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_16callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("callback", 0);

  /* "metaphor/monal/driver/_driver.py":221
 *     @Property
 *     def callback(self):  # DriverBase
 *         return self._callback             # <<<<<<<<<<<<<<
 * #     @callback.setter
 * #     def callback(self, fct):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":220
 * 
 *     @Property
 *     def callback(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._callback
 * #     @callback.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":226
 * #         self._callback = fct
 * 
 *     def setCallback(self, fct=None):             # <<<<<<<<<<<<<<
 *         self._callback = fct
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_19setCallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_19setCallback = {"setCallback", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_19setCallback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_19setCallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fct = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCallback (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fct,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fct);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCallback") < 0)) __PYX_ERR(0, 226, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_fct = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCallback", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.setCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_18setCallback(__pyx_self, __pyx_v_self, __pyx_v_fct);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_18setCallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fct) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCallback", 0);

  /* "metaphor/monal/driver/_driver.py":227
 * 
 *     def setCallback(self, fct=None):
 *         self._callback = fct             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_fct) < 0) __PYX_ERR(0, 227, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":226
 * #         self._callback = fct
 * 
 *     def setCallback(self, fct=None):             # <<<<<<<<<<<<<<
 *         self._callback = fct
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.setCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":230
 * 
 *     @Property
 *     def hasResampling(self):             # <<<<<<<<<<<<<<
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 *             return self._extraweights.any()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_21hasResampling(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_21hasResampling = {"hasResampling", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_21hasResampling, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_21hasResampling(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hasResampling (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_20hasResampling(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_20hasResampling(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("hasResampling", 0);

  /* "metaphor/monal/driver/_driver.py":231
 *     @Property
 *     def hasResampling(self):
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:             # <<<<<<<<<<<<<<
 *             return self._extraweights.any()
 *         return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":232
 *     def hasResampling(self):
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 *             return self._extraweights.any()             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_any); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":231
 *     @Property
 *     def hasResampling(self):
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:             # <<<<<<<<<<<<<<
 *             return self._extraweights.any()
 *         return False
 */
  }

  /* "metaphor/monal/driver/_driver.py":233
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 *             return self._extraweights.any()
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def getNewWeights(self, stddev=0.3, keep0=[]):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":230
 * 
 *     @Property
 *     def hasResampling(self):             # <<<<<<<<<<<<<<
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 *             return self._extraweights.any()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.hasResampling", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":235
 *         return False
 * 
 *     def getNewWeights(self, stddev=0.3, keep0=[]):  # DriverBase             # <<<<<<<<<<<<<<
 *         """Create a new weights vector.
 *         The result is not affected to the Driver.weights property.
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject*)__pyx_float_0_3));
  __Pyx_GIVEREF(((PyObject*)__pyx_float_0_3));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)__pyx_float_0_3));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_keep0);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_keep0);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_keep0);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_23getNewWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_10DriverBase_22getNewWeights[] = "Create a new weights vector.\n        The result is not affected to the Driver.weights property.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_23getNewWeights = {"getNewWeights", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_23getNewWeights, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_10DriverBase_22getNewWeights};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_23getNewWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stddev = 0;
  PyObject *__pyx_v_keep0 = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNewWeights (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stddev,&__pyx_n_s_keep0,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = ((PyObject *)((PyObject*)__pyx_float_0_3));
    values[2] = __pyx_dynamic_args->__pyx_arg_keep0;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stddev);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keep0);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getNewWeights") < 0)) __PYX_ERR(0, 235, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stddev = values[1];
    __pyx_v_keep0 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getNewWeights", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.getNewWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_22getNewWeights(__pyx_self, __pyx_v_self, __pyx_v_stddev, __pyx_v_keep0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_22getNewWeights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stddev, PyObject *__pyx_v_keep0) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannySetupContext("getNewWeights", 0);

  /* "metaphor/monal/driver/_driver.py":239
 *         The result is not affected to the Driver.weights property.
 *         """
 *         result = rnd.randn(self.paramCount)*stddev             # <<<<<<<<<<<<<<
 *         if len(keep0):
 *             for i in keep0:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_rnd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_randn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_v_stddev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":240
 *         """
 *         result = rnd.randn(self.paramCount)*stddev
 *         if len(keep0):             # <<<<<<<<<<<<<<
 *             for i in keep0:
 *                 result[i] = 0.0
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_keep0); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 240, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":241
 *         result = rnd.randn(self.paramCount)*stddev
 *         if len(keep0):
 *             for i in keep0:             # <<<<<<<<<<<<<<
 *                 result[i] = 0.0
 *         return result
 */
    if (likely(PyList_CheckExact(__pyx_v_keep0)) || PyTuple_CheckExact(__pyx_v_keep0)) {
      __pyx_t_3 = __pyx_v_keep0; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_keep0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 241, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 241, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 241, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 241, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":242
 *         if len(keep0):
 *             for i in keep0:
 *                 result[i] = 0.0             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      if (unlikely(PyObject_SetItem(__pyx_v_result, __pyx_v_i, __pyx_float_0_0) < 0)) __PYX_ERR(0, 242, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":241
 *         result = rnd.randn(self.paramCount)*stddev
 *         if len(keep0):
 *             for i in keep0:             # <<<<<<<<<<<<<<
 *                 result[i] = 0.0
 *         return result
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":240
 *         """
 *         result = rnd.randn(self.paramCount)*stddev
 *         if len(keep0):             # <<<<<<<<<<<<<<
 *             for i in keep0:
 *                 result[i] = 0.0
 */
  }

  /* "metaphor/monal/driver/_driver.py":243
 *             for i in keep0:
 *                 result[i] = 0.0
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":235
 *         return False
 * 
 *     def getNewWeights(self, stddev=0.3, keep0=[]):  # DriverBase             # <<<<<<<<<<<<<<
 *         """Create a new weights vector.
 *         The result is not affected to the Driver.weights property.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.getNewWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":245
 *         return result
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         if target == self:
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_25loadWeightsXML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_25loadWeightsXML = {"loadWeightsXML", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_25loadWeightsXML, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_25loadWeightsXML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadWeightsXML (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,&__pyx_n_s_target,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadWeightsXML", 1, 3, 3, 1); __PYX_ERR(0, 245, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadWeightsXML", 1, 3, 3, 2); __PYX_ERR(0, 245, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadWeightsXML") < 0)) __PYX_ERR(0, 245, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
    __pyx_v_target = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadWeightsXML", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 245, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_24loadWeightsXML(__pyx_self, __pyx_v_self, __pyx_v_source, __pyx_v_target);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_24loadWeightsXML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_target) {
  int __pyx_v_res;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_v_local = NULL;
  PyObject *__pyx_v_vclass = NULL;
  PyObject *__pyx_v_element = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_valelmt = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  __Pyx_RefNannySetupContext("loadWeightsXML", 0);

  /* "metaphor/monal/driver/_driver.py":246
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase
 *         if target == self:             # <<<<<<<<<<<<<<
 * 
 *             res = False
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_target, __pyx_v_self, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":248
 *         if target == self:
 * 
 *             res = False             # <<<<<<<<<<<<<<
 *             try:
 *                 if os.path.exists(source):
 */
    __pyx_v_res = 0;

    /* "metaphor/monal/driver/_driver.py":249
 * 
 *             res = False
 *             try:             # <<<<<<<<<<<<<<
 *                 if os.path.exists(source):
 *                     node = parse(source).getroot()
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "metaphor/monal/driver/_driver.py":250
 *             res = False
 *             try:
 *                 if os.path.exists(source):             # <<<<<<<<<<<<<<
 *                     node = parse(source).getroot()
 *                 else:
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_source};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L4_error)
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_source};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L4_error)
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
            __Pyx_INCREF(__pyx_v_source);
            __Pyx_GIVEREF(__pyx_v_source);
            PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_source);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 250, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_2) {

          /* "metaphor/monal/driver/_driver.py":251
 *             try:
 *                 if os.path.exists(source):
 *                     node = parse(source).getroot()             # <<<<<<<<<<<<<<
 *                 else:
 *                     node = fromstring(source).getroot()
 */
          __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          if (!__pyx_t_7) {
            __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_source); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_6);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_8)) {
              PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_source};
              __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L4_error)
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_GOTREF(__pyx_t_6);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
              PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_source};
              __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L4_error)
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_GOTREF(__pyx_t_6);
            } else
            #endif
            {
              __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 251, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
              __Pyx_INCREF(__pyx_v_source);
              __Pyx_GIVEREF(__pyx_v_source);
              PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_source);
              __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getroot); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L4_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L4_error)
          }
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_node = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "metaphor/monal/driver/_driver.py":250
 *             res = False
 *             try:
 *                 if os.path.exists(source):             # <<<<<<<<<<<<<<
 *                     node = parse(source).getroot()
 *                 else:
 */
          goto __pyx_L10;
        }

        /* "metaphor/monal/driver/_driver.py":253
 *                     node = parse(source).getroot()
 *                 else:
 *                     node = fromstring(source).getroot()             # <<<<<<<<<<<<<<
 *             except:
 *                 node = None
 */
        /*else*/ {
          __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_9 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (!__pyx_t_9) {
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_source); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_source};
              __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L4_error)
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_GOTREF(__pyx_t_8);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_source};
              __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L4_error)
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_GOTREF(__pyx_t_8);
            } else
            #endif
            {
              __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL;
              __Pyx_INCREF(__pyx_v_source);
              __Pyx_GIVEREF(__pyx_v_source);
              PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_source);
              __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getroot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_8) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L4_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L4_error)
          }
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_v_node = __pyx_t_1;
          __pyx_t_1 = 0;
        }
        __pyx_L10:;

        /* "metaphor/monal/driver/_driver.py":249
 * 
 *             res = False
 *             try:             # <<<<<<<<<<<<<<
 *                 if os.path.exists(source):
 *                     node = parse(source).getroot()
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":254
 *                 else:
 *                     node = fromstring(source).getroot()
 *             except:             # <<<<<<<<<<<<<<
 *                 node = None
 *             if node:
 */
      /*except:*/ {
        __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 254, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_8);

        /* "metaphor/monal/driver/_driver.py":255
 *                     node = fromstring(source).getroot()
 *             except:
 *                 node = None             # <<<<<<<<<<<<<<
 *             if node:
 *                 if self.weights is None:
 */
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF_SET(__pyx_v_node, Py_None);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;

      /* "metaphor/monal/driver/_driver.py":249
 * 
 *             res = False
 *             try:             # <<<<<<<<<<<<<<
 *                 if os.path.exists(source):
 *                     node = parse(source).getroot()
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L9_try_end:;
    }

    /* "metaphor/monal/driver/_driver.py":256
 *             except:
 *                 node = None
 *             if node:             # <<<<<<<<<<<<<<
 *                 if self.weights is None:
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_node); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 256, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":257
 *                 node = None
 *             if node:
 *                 if self.weights is None:             # <<<<<<<<<<<<<<
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 *                 local = None
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = (__pyx_t_8 == Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = (__pyx_t_2 != 0);
      if (__pyx_t_10) {

        /* "metaphor/monal/driver/_driver.py":258
 *             if node:
 *                 if self.weights is None:
 *                     self.weights = zeros((self.paramCount,)).squeeze()             # <<<<<<<<<<<<<<
 *                 local = None
 *                 for local in node.getiterator(st_WEIGHTS):
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
            __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
            __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 258, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = NULL;
            __Pyx_GIVEREF(__pyx_t_9);
            PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_9);
            __pyx_t_9 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (__pyx_t_6) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 258, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else {
          __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 258, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights, __pyx_t_8) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "metaphor/monal/driver/_driver.py":257
 *                 node = None
 *             if node:
 *                 if self.weights is None:             # <<<<<<<<<<<<<<
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 *                 local = None
 */
      }

      /* "metaphor/monal/driver/_driver.py":259
 *                 if self.weights is None:
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 *                 local = None             # <<<<<<<<<<<<<<
 *                 for local in node.getiterator(st_WEIGHTS):
 *                     break
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_local = Py_None;

      /* "metaphor/monal/driver/_driver.py":260
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 *                 local = None
 *                 for local in node.getiterator(st_WEIGHTS):             # <<<<<<<<<<<<<<
 *                     break
 *                 if local and (int(local.attrib["count"]) == self.paramCount):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_getiterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_st_WEIGHTS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_11) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_6};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_6};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); __pyx_t_11 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
        __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 260, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 260, __pyx_L1_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 260, __pyx_L1_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_13(__pyx_t_1);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 260, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_DECREF_SET(__pyx_v_local, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "metaphor/monal/driver/_driver.py":261
 *                 local = None
 *                 for local in node.getiterator(st_WEIGHTS):
 *                     break             # <<<<<<<<<<<<<<
 *                 if local and (int(local.attrib["count"]) == self.paramCount):
 *                     res = True
 */
        goto __pyx_L16_break;

        /* "metaphor/monal/driver/_driver.py":260
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 *                 local = None
 *                 for local in node.getiterator(st_WEIGHTS):             # <<<<<<<<<<<<<<
 *                     break
 *                 if local and (int(local.attrib["count"]) == self.paramCount):
 */
      }
      __pyx_L16_break:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":262
 *                 for local in node.getiterator(st_WEIGHTS):
 *                     break
 *                 if local and (int(local.attrib["count"]) == self.paramCount):             # <<<<<<<<<<<<<<
 *                     res = True
 *                     vclass = local.attrib.get("class", "")
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_local); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 262, __pyx_L1_error)
      if (__pyx_t_2) {
      } else {
        __pyx_t_10 = __pyx_t_2;
        goto __pyx_L18_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local, __pyx_n_s_attrib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = __pyx_t_2;
      __pyx_L18_bool_binop_done:;
      if (__pyx_t_10) {

        /* "metaphor/monal/driver/_driver.py":263
 *                     break
 *                 if local and (int(local.attrib["count"]) == self.paramCount):
 *                     res = True             # <<<<<<<<<<<<<<
 *                     vclass = local.attrib.get("class", "")
 *                     if vclass == "RealByteVector":
 */
        __pyx_v_res = 1;

        /* "metaphor/monal/driver/_driver.py":264
 *                 if local and (int(local.attrib["count"]) == self.paramCount):
 *                     res = True
 *                     vclass = local.attrib.get("class", "")             # <<<<<<<<<<<<<<
 *                     if vclass == "RealByteVector":
 *                         for element in local.getchildren():
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_local, __pyx_n_s_attrib); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_vclass = __pyx_t_9;
        __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":265
 *                     res = True
 *                     vclass = local.attrib.get("class", "")
 *                     if vclass == "RealByteVector":             # <<<<<<<<<<<<<<
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))
 */
        __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_vclass, __pyx_n_u_RealByteVector, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 265, __pyx_L1_error)
        if (__pyx_t_10) {

          /* "metaphor/monal/driver/_driver.py":266
 *                     vclass = local.attrib.get("class", "")
 *                     if vclass == "RealByteVector":
 *                         for element in local.getchildren():             # <<<<<<<<<<<<<<
 *                             row = int(element.attrib.get("row", 0))
 *                             valelmt = element.find(cst.st_REAL)
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_local, __pyx_n_s_getchildren); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_1 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          if (__pyx_t_1) {
            __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          } else {
            __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
            __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0;
            __pyx_t_13 = NULL;
          } else {
            __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 266, __pyx_L1_error)
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          for (;;) {
            if (likely(!__pyx_t_13)) {
              if (likely(PyList_CheckExact(__pyx_t_8))) {
                if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
                #else
                __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
              } else {
                if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
                #else
                __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
              }
            } else {
              __pyx_t_9 = __pyx_t_13(__pyx_t_8);
              if (unlikely(!__pyx_t_9)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 266, __pyx_L1_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_9);
            }
            __Pyx_XDECREF_SET(__pyx_v_element, __pyx_t_9);
            __pyx_t_9 = 0;

            /* "metaphor/monal/driver/_driver.py":267
 *                     if vclass == "RealByteVector":
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))             # <<<<<<<<<<<<<<
 *                             valelmt = element.find(cst.st_REAL)
 *                             if valelmt is not None:
 */
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_element, __pyx_n_s_attrib); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 267, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 267, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "metaphor/monal/driver/_driver.py":268
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))
 *                             valelmt = element.find(cst.st_REAL)             # <<<<<<<<<<<<<<
 *                             if valelmt is not None:
 *                                 value = nntb.floatEx(valelmt.text)
 */
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_element, __pyx_n_s_find); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 268, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_st_REAL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 268, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
              }
            }
            if (!__pyx_t_6) {
              __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_9)) {
                PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_11};
                __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
                PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_11};
                __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              } else
              #endif
              {
                __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 268, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
                __Pyx_GIVEREF(__pyx_t_11);
                PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_11);
                __pyx_t_11 = 0;
                __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF_SET(__pyx_v_valelmt, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "metaphor/monal/driver/_driver.py":269
 *                             row = int(element.attrib.get("row", 0))
 *                             valelmt = element.find(cst.st_REAL)
 *                             if valelmt is not None:             # <<<<<<<<<<<<<<
 *                                 value = nntb.floatEx(valelmt.text)
 *                                 self.weights[row] = value
 */
            __pyx_t_10 = (__pyx_v_valelmt != Py_None);
            __pyx_t_2 = (__pyx_t_10 != 0);
            if (__pyx_t_2) {

              /* "metaphor/monal/driver/_driver.py":270
 *                             valelmt = element.find(cst.st_REAL)
 *                             if valelmt is not None:
 *                                 value = nntb.floatEx(valelmt.text)             # <<<<<<<<<<<<<<
 *                                 self.weights[row] = value
 *                     elif vclass == "RealVector" :
 */
              __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 270, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 270, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_valelmt, __pyx_n_s_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 270, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_11 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_7, function);
                }
              }
              if (!__pyx_t_11) {
                __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_GOTREF(__pyx_t_1);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_7)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
                  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
                  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                } else
                #endif
                {
                  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
                  __Pyx_GIVEREF(__pyx_t_9);
                  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_9);
                  __pyx_t_9 = 0;
                  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "metaphor/monal/driver/_driver.py":271
 *                             if valelmt is not None:
 *                                 value = nntb.floatEx(valelmt.text)
 *                                 self.weights[row] = value             # <<<<<<<<<<<<<<
 *                     elif vclass == "RealVector" :
 *                         for element in local.getchildren():
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_row, __pyx_v_value) < 0)) __PYX_ERR(0, 271, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "metaphor/monal/driver/_driver.py":269
 *                             row = int(element.attrib.get("row", 0))
 *                             valelmt = element.find(cst.st_REAL)
 *                             if valelmt is not None:             # <<<<<<<<<<<<<<
 *                                 value = nntb.floatEx(valelmt.text)
 *                                 self.weights[row] = value
 */
            }

            /* "metaphor/monal/driver/_driver.py":266
 *                     vclass = local.attrib.get("class", "")
 *                     if vclass == "RealByteVector":
 *                         for element in local.getchildren():             # <<<<<<<<<<<<<<
 *                             row = int(element.attrib.get("row", 0))
 *                             valelmt = element.find(cst.st_REAL)
 */
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "metaphor/monal/driver/_driver.py":265
 *                     res = True
 *                     vclass = local.attrib.get("class", "")
 *                     if vclass == "RealByteVector":             # <<<<<<<<<<<<<<
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))
 */
          goto __pyx_L20;
        }

        /* "metaphor/monal/driver/_driver.py":272
 *                                 value = nntb.floatEx(valelmt.text)
 *                                 self.weights[row] = value
 *                     elif vclass == "RealVector" :             # <<<<<<<<<<<<<<
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))
 */
        __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_vclass, __pyx_n_u_RealVector, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 272, __pyx_L1_error)
        if (__pyx_t_2) {

          /* "metaphor/monal/driver/_driver.py":273
 *                                 self.weights[row] = value
 *                     elif vclass == "RealVector" :
 *                         for element in local.getchildren():             # <<<<<<<<<<<<<<
 *                             row = int(element.attrib.get("row", 0))
 *                             value = nntb.floatEx(element.text)
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local, __pyx_n_s_getchildren); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          if (__pyx_t_7) {
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else {
            __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
            __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
            __pyx_t_13 = NULL;
          } else {
            __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 273, __pyx_L1_error)
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          for (;;) {
            if (likely(!__pyx_t_13)) {
              if (likely(PyList_CheckExact(__pyx_t_1))) {
                if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 273, __pyx_L1_error)
                #else
                __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
              } else {
                if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 273, __pyx_L1_error)
                #else
                __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
              }
            } else {
              __pyx_t_8 = __pyx_t_13(__pyx_t_1);
              if (unlikely(!__pyx_t_8)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 273, __pyx_L1_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_8);
            }
            __Pyx_XDECREF_SET(__pyx_v_element, __pyx_t_8);
            __pyx_t_8 = 0;

            /* "metaphor/monal/driver/_driver.py":274
 *                     elif vclass == "RealVector" :
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))             # <<<<<<<<<<<<<<
 *                             value = nntb.floatEx(element.text)
 *                             self.weights[row] = value
 */
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_element, __pyx_n_s_attrib); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 274, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 274, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
            __pyx_t_7 = 0;

            /* "metaphor/monal/driver/_driver.py":275
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))
 *                             value = nntb.floatEx(element.text)             # <<<<<<<<<<<<<<
 *                             self.weights[row] = value
 *             return res
 */
            __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 275, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_element, __pyx_n_s_text); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 275, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            if (!__pyx_t_9) {
              __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 275, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_GOTREF(__pyx_t_7);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_6)) {
                PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
                __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 275, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
                PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
                __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 275, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              } else
              #endif
              {
                __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 275, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
                __Pyx_GIVEREF(__pyx_t_8);
                PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_8);
                __pyx_t_8 = 0;
                __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 275, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
            __pyx_t_7 = 0;

            /* "metaphor/monal/driver/_driver.py":276
 *                             row = int(element.attrib.get("row", 0))
 *                             value = nntb.floatEx(element.text)
 *                             self.weights[row] = value             # <<<<<<<<<<<<<<
 *             return res
 *         elif target == self.mainModel:
 */
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_row, __pyx_v_value) < 0)) __PYX_ERR(0, 276, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "metaphor/monal/driver/_driver.py":273
 *                                 self.weights[row] = value
 *                     elif vclass == "RealVector" :
 *                         for element in local.getchildren():             # <<<<<<<<<<<<<<
 *                             row = int(element.attrib.get("row", 0))
 *                             value = nntb.floatEx(element.text)
 */
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "metaphor/monal/driver/_driver.py":272
 *                                 value = nntb.floatEx(valelmt.text)
 *                                 self.weights[row] = value
 *                     elif vclass == "RealVector" :             # <<<<<<<<<<<<<<
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))
 */
        }
        __pyx_L20:;

        /* "metaphor/monal/driver/_driver.py":262
 *                 for local in node.getiterator(st_WEIGHTS):
 *                     break
 *                 if local and (int(local.attrib["count"]) == self.paramCount):             # <<<<<<<<<<<<<<
 *                     res = True
 *                     vclass = local.attrib.get("class", "")
 */
      }

      /* "metaphor/monal/driver/_driver.py":256
 *             except:
 *                 node = None
 *             if node:             # <<<<<<<<<<<<<<
 *                 if self.weights is None:
 *                     self.weights = zeros((self.paramCount,)).squeeze()
 */
    }

    /* "metaphor/monal/driver/_driver.py":277
 *                             value = nntb.floatEx(element.text)
 *                             self.weights[row] = value
 *             return res             # <<<<<<<<<<<<<<
 *         elif target == self.mainModel:
 *             return target.loadWeightsXML(source)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":246
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase
 *         if target == self:             # <<<<<<<<<<<<<<
 * 
 *             res = False
 */
  }

  /* "metaphor/monal/driver/_driver.py":278
 *                             self.weights[row] = value
 *             return res
 *         elif target == self.mainModel:             # <<<<<<<<<<<<<<
 *             return target.loadWeightsXML(source)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_RichCompare(__pyx_v_target, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":279
 *             return res
 *         elif target == self.mainModel:
 *             return target.loadWeightsXML(source)             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_loadWeightsXML); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_source); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_source);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":278
 *                             self.weights[row] = value
 *             return res
 *         elif target == self.mainModel:             # <<<<<<<<<<<<<<
 *             return target.loadWeightsXML(source)
 * 
 */
  }

  /* "metaphor/monal/driver/_driver.py":245
 *         return result
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         if target == self:
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XDECREF(__pyx_v_local);
  __Pyx_XDECREF(__pyx_v_vclass);
  __Pyx_XDECREF(__pyx_v_element);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_valelmt);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":282
 * 
 *     @Property
 *     def dispersionMatrix(self):             # <<<<<<<<<<<<<<
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_27dispersionMatrix(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_27dispersionMatrix = {"dispersionMatrix", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_27dispersionMatrix, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_27dispersionMatrix(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispersionMatrix (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_26dispersionMatrix(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_26dispersionMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("dispersionMatrix", 0);

  /* "metaphor/monal/driver/_driver.py":283
 *     @Property
 *     def dispersionMatrix(self):
 *         return self._dispersionMatrix             # <<<<<<<<<<<<<<
 *     @dispersionMatrix.setter
 *     def dispersionMatrix(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":282
 * 
 *     @Property
 *     def dispersionMatrix(self):             # <<<<<<<<<<<<<<
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.dispersionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":285
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 *     def dispersionMatrix(self, value):             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_29dispersionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_29dispersionMatrix = {"dispersionMatrix", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_29dispersionMatrix, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_29dispersionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispersionMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dispersionMatrix", 1, 2, 2, 1); __PYX_ERR(0, 285, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dispersionMatrix") < 0)) __PYX_ERR(0, 285, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dispersionMatrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 285, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.dispersionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_28dispersionMatrix(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_28dispersionMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispersionMatrix", 0);

  /* "metaphor/monal/driver/_driver.py":286
 *     @dispersionMatrix.setter
 *     def dispersionMatrix(self, value):
 *         self._dispersionMatrix = value             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_v_value) < 0) __PYX_ERR(0, 286, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":285
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 *     def dispersionMatrix(self, value):             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.dispersionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":289
 * 
 *     @Property
 *     def trainingStddev(self):             # <<<<<<<<<<<<<<
 *         return self._stdtrain
 *     @trainingStddev.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_31trainingStddev(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_31trainingStddev = {"trainingStddev", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_31trainingStddev, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_31trainingStddev(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainingStddev (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_30trainingStddev(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_30trainingStddev(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("trainingStddev", 0);

  /* "metaphor/monal/driver/_driver.py":290
 *     @Property
 *     def trainingStddev(self):
 *         return self._stdtrain             # <<<<<<<<<<<<<<
 *     @trainingStddev.setter
 *     def trainingStddev(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":289
 * 
 *     @Property
 *     def trainingStddev(self):             # <<<<<<<<<<<<<<
 *         return self._stdtrain
 *     @trainingStddev.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.trainingStddev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":292
 *         return self._stdtrain
 *     @trainingStddev.setter
 *     def trainingStddev(self, value):             # <<<<<<<<<<<<<<
 *         self._stdtrain = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_33trainingStddev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_33trainingStddev = {"trainingStddev", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_33trainingStddev, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_33trainingStddev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainingStddev (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("trainingStddev", 1, 2, 2, 1); __PYX_ERR(0, 292, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trainingStddev") < 0)) __PYX_ERR(0, 292, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("trainingStddev", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 292, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.trainingStddev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_32trainingStddev(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_32trainingStddev(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainingStddev", 0);

  /* "metaphor/monal/driver/_driver.py":293
 *     @trainingStddev.setter
 *     def trainingStddev(self, value):
 *         self._stdtrain = value             # <<<<<<<<<<<<<<
 * 
 *     def loadFromDict(self, source, givetime=False): # ModelLib
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain, __pyx_v_value) < 0) __PYX_ERR(0, 293, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":292
 *         return self._stdtrain
 *     @trainingStddev.setter
 *     def trainingStddev(self, value):             # <<<<<<<<<<<<<<
 *         self._stdtrain = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.trainingStddev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":295
 *         self._stdtrain = value
 * 
 *     def loadFromDict(self, source, givetime=False): # ModelLib             # <<<<<<<<<<<<<<
 *         self._extradispersions = None
 *         self._extraweights = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_35loadFromDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_35loadFromDict = {"loadFromDict", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_35loadFromDict, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_35loadFromDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  CYTHON_UNUSED PyObject *__pyx_v_givetime = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,&__pyx_n_s_givetime,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadFromDict", 0, 2, 3, 1); __PYX_ERR(0, 295, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_givetime);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadFromDict") < 0)) __PYX_ERR(0, 295, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
    __pyx_v_givetime = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadFromDict", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 295, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_34loadFromDict(__pyx_self, __pyx_v_self, __pyx_v_source, __pyx_v_givetime);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_34loadFromDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, CYTHON_UNUSED PyObject *__pyx_v_givetime) {
  PyObject *__pyx_v_inputnorm = NULL;
  PyObject *__pyx_v_outputnorm = NULL;
  PyObject *__pyx_v_extradispersions = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_paramnames = NULL;
  PyObject *__pyx_v_dispersionMatrix = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_params = NULL;
  PyObject *__pyx_v_ndim = NULL;
  PyObject *__pyx_v_shape = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_nbmulti = NULL;
  PyObject *__pyx_v_rootdic = NULL;
  PyObject *__pyx_v_subkey = NULL;
  PyObject *__pyx_v_subval = NULL;
  PyObject *__pyx_v_inputnamelist = NULL;
  PyObject *__pyx_v_indloc = NULL;
  PyObject *__pyx_v_valloc = NULL;
  PyObject *__pyx_v_cond = NULL;
  PyObject *__pyx_v_pcount = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_disp = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_matlin = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyObject *(*__pyx_t_22)(PyObject *);
  PyObject *__pyx_t_23 = NULL;
  int __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  __Pyx_RefNannySetupContext("loadFromDict", 0);

  /* "metaphor/monal/driver/_driver.py":296
 * 
 *     def loadFromDict(self, source, givetime=False): # ModelLib
 *         self._extradispersions = None             # <<<<<<<<<<<<<<
 *         self._extraweights = None
 *         self._extrastddev = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extradispersions, Py_None) < 0) __PYX_ERR(0, 296, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":297
 *     def loadFromDict(self, source, givetime=False): # ModelLib
 *         self._extradispersions = None
 *         self._extraweights = None             # <<<<<<<<<<<<<<
 *         self._extrastddev = None
 *         self._extraVLOO = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extraweights, Py_None) < 0) __PYX_ERR(0, 297, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":298
 *         self._extradispersions = None
 *         self._extraweights = None
 *         self._extrastddev = None             # <<<<<<<<<<<<<<
 *         self._extraVLOO = None
 *         inputnorm = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extrastddev, Py_None) < 0) __PYX_ERR(0, 298, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":299
 *         self._extraweights = None
 *         self._extrastddev = None
 *         self._extraVLOO = None             # <<<<<<<<<<<<<<
 *         inputnorm = None
 *         outputnorm = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extraVLOO, Py_None) < 0) __PYX_ERR(0, 299, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":300
 *         self._extrastddev = None
 *         self._extraVLOO = None
 *         inputnorm = None             # <<<<<<<<<<<<<<
 *         outputnorm = None
 *         extradispersions = None
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_inputnorm = Py_None;

  /* "metaphor/monal/driver/_driver.py":301
 *         self._extraVLOO = None
 *         inputnorm = None
 *         outputnorm = None             # <<<<<<<<<<<<<<
 *         extradispersions = None
 *         try:
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_outputnorm = Py_None;

  /* "metaphor/monal/driver/_driver.py":302
 *         inputnorm = None
 *         outputnorm = None
 *         extradispersions = None             # <<<<<<<<<<<<<<
 *         try:
 *             paramnames = None
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_extradispersions = Py_None;

  /* "metaphor/monal/driver/_driver.py":303
 *         outputnorm = None
 *         extradispersions = None
 *         try:             # <<<<<<<<<<<<<<
 *             paramnames = None
 *             dispersionMatrix = None
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":304
 *         extradispersions = None
 *         try:
 *             paramnames = None             # <<<<<<<<<<<<<<
 *             dispersionMatrix = None
 *             for key, value in source.items():
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_paramnames = ((PyObject*)Py_None);

      /* "metaphor/monal/driver/_driver.py":305
 *         try:
 *             paramnames = None
 *             dispersionMatrix = None             # <<<<<<<<<<<<<<
 *             for key, value in source.items():
 *                 try:
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_dispersionMatrix = Py_None;

      /* "metaphor/monal/driver/_driver.py":306
 *             paramnames = None
 *             dispersionMatrix = None
 *             for key, value in source.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if key == "propertyname":
 */
      __pyx_t_5 = 0;
      if (unlikely(__pyx_v_source == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 306, __pyx_L3_error)
      }
      __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_source, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_8;
      __pyx_t_8 = 0;
      while (1) {
        __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_6, &__pyx_t_5, &__pyx_t_8, &__pyx_t_9, NULL, __pyx_t_7);
        if (unlikely(__pyx_t_10 == 0)) break;
        if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 306, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":307
 *             dispersionMatrix = None
 *             for key, value in source.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if key == "propertyname":
 *                         self.propertyName = str(value)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          /*try:*/ {

            /* "metaphor/monal/driver/_driver.py":308
 *             for key, value in source.items():
 *                 try:
 *                     if key == "propertyname":             # <<<<<<<<<<<<<<
 *                         self.propertyName = str(value)
 *                     elif key == "paramnames":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_propertyname, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 308, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":309
 *                 try:
 *                     if key == "propertyname":
 *                         self.propertyName = str(value)             # <<<<<<<<<<<<<<
 *                     elif key == "paramnames":
 *                         paramnames = list(value)
 */
              __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 309, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2, __pyx_t_9) < 0) __PYX_ERR(0, 309, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":308
 *             for key, value in source.items():
 *                 try:
 *                     if key == "propertyname":             # <<<<<<<<<<<<<<
 *                         self.propertyName = str(value)
 *                     elif key == "paramnames":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":310
 *                     if key == "propertyname":
 *                         self.propertyName = str(value)
 *                     elif key == "paramnames":             # <<<<<<<<<<<<<<
 *                         paramnames = list(value)
 *                     elif key == "params":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_paramnames, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 310, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":311
 *                         self.propertyName = str(value)
 *                     elif key == "paramnames":
 *                         paramnames = list(value)             # <<<<<<<<<<<<<<
 *                     elif key == "params":
 *                         params = asarray(value)
 */
              __pyx_t_9 = PySequence_List(__pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 311, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF_SET(__pyx_v_paramnames, ((PyObject*)__pyx_t_9));
              __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":310
 *                     if key == "propertyname":
 *                         self.propertyName = str(value)
 *                     elif key == "paramnames":             # <<<<<<<<<<<<<<
 *                         paramnames = list(value)
 *                     elif key == "params":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":312
 *                     elif key == "paramnames":
 *                         paramnames = list(value)
 *                     elif key == "params":             # <<<<<<<<<<<<<<
 *                         params = asarray(value)
 *                     elif key in ("innorm", "inputnorm"):
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_params, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 312, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":313
 *                         paramnames = list(value)
 *                     elif key == "params":
 *                         params = asarray(value)             # <<<<<<<<<<<<<<
 *                     elif key in ("innorm", "inputnorm"):
 *                         inputnorm = value
 */
              __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 313, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_15 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_15)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_15);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                }
              }
              if (!__pyx_t_15) {
                __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 313, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_9);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_8)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_value};
                  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 313, __pyx_L11_error)
                  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_GOTREF(__pyx_t_9);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_value};
                  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 313, __pyx_L11_error)
                  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_GOTREF(__pyx_t_9);
                } else
                #endif
                {
                  __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 313, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_16);
                  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
                  __Pyx_INCREF(__pyx_v_value);
                  __Pyx_GIVEREF(__pyx_v_value);
                  PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_value);
                  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 313, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":312
 *                     elif key == "paramnames":
 *                         paramnames = list(value)
 *                     elif key == "params":             # <<<<<<<<<<<<<<
 *                         params = asarray(value)
 *                     elif key in ("innorm", "inputnorm"):
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":314
 *                     elif key == "params":
 *                         params = asarray(value)
 *                     elif key in ("innorm", "inputnorm"):             # <<<<<<<<<<<<<<
 *                         inputnorm = value
 *                     elif key in ("outnorm", "outputnorm"):
 */
            __Pyx_INCREF(__pyx_v_key);
            __pyx_t_9 = __pyx_v_key;
            __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_innorm, Py_EQ)); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 314, __pyx_L11_error)
            if (!__pyx_t_17) {
            } else {
              __pyx_t_14 = __pyx_t_17;
              goto __pyx_L20_bool_binop_done;
            }
            __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_inputnorm, Py_EQ)); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 314, __pyx_L11_error)
            __pyx_t_14 = __pyx_t_17;
            __pyx_L20_bool_binop_done:;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_17 = (__pyx_t_14 != 0);
            if (__pyx_t_17) {

              /* "metaphor/monal/driver/_driver.py":315
 *                         params = asarray(value)
 *                     elif key in ("innorm", "inputnorm"):
 *                         inputnorm = value             # <<<<<<<<<<<<<<
 *                     elif key in ("outnorm", "outputnorm"):
 *                         outputnorm = value
 */
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_DECREF_SET(__pyx_v_inputnorm, __pyx_v_value);

              /* "metaphor/monal/driver/_driver.py":314
 *                     elif key == "params":
 *                         params = asarray(value)
 *                     elif key in ("innorm", "inputnorm"):             # <<<<<<<<<<<<<<
 *                         inputnorm = value
 *                     elif key in ("outnorm", "outputnorm"):
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":316
 *                     elif key in ("innorm", "inputnorm"):
 *                         inputnorm = value
 *                     elif key in ("outnorm", "outputnorm"):             # <<<<<<<<<<<<<<
 *                         outputnorm = value
 *                     elif key == "baselen":
 */
            __Pyx_INCREF(__pyx_v_key);
            __pyx_t_9 = __pyx_v_key;
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_outnorm, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 316, __pyx_L11_error)
            if (!__pyx_t_14) {
            } else {
              __pyx_t_17 = __pyx_t_14;
              goto __pyx_L22_bool_binop_done;
            }
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_outputnorm, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 316, __pyx_L11_error)
            __pyx_t_17 = __pyx_t_14;
            __pyx_L22_bool_binop_done:;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_14 = (__pyx_t_17 != 0);
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":317
 *                         inputnorm = value
 *                     elif key in ("outnorm", "outputnorm"):
 *                         outputnorm = value             # <<<<<<<<<<<<<<
 *                     elif key == "baselen":
 *                         self._baselen = int(value)
 */
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_DECREF_SET(__pyx_v_outputnorm, __pyx_v_value);

              /* "metaphor/monal/driver/_driver.py":316
 *                     elif key in ("innorm", "inputnorm"):
 *                         inputnorm = value
 *                     elif key in ("outnorm", "outputnorm"):             # <<<<<<<<<<<<<<
 *                         outputnorm = value
 *                     elif key == "baselen":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":318
 *                     elif key in ("outnorm", "outputnorm"):
 *                         outputnorm = value
 *                     elif key == "baselen":             # <<<<<<<<<<<<<<
 *                         self._baselen = int(value)
 *                     elif key == "stddev":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_baselen, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 318, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":319
 *                         outputnorm = value
 *                     elif key == "baselen":
 *                         self._baselen = int(value)             # <<<<<<<<<<<<<<
 *                     elif key == "stddev":
 *                         self.trainingStddev = float(value)
 */
              __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 319, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2, __pyx_t_9) < 0) __PYX_ERR(0, 319, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":318
 *                     elif key in ("outnorm", "outputnorm"):
 *                         outputnorm = value
 *                     elif key == "baselen":             # <<<<<<<<<<<<<<
 *                         self._baselen = int(value)
 *                     elif key == "stddev":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":320
 *                     elif key == "baselen":
 *                         self._baselen = int(value)
 *                     elif key == "stddev":             # <<<<<<<<<<<<<<
 *                         self.trainingStddev = float(value)
 *                     elif key == "dispersion":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_stddev, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 320, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":321
 *                         self._baselen = int(value)
 *                     elif key == "stddev":
 *                         self.trainingStddev = float(value)             # <<<<<<<<<<<<<<
 *                     elif key == "dispersion":
 *                         dispersionMatrix = asarray(value)
 */
              __pyx_t_9 = __Pyx_PyNumber_Float(__pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 321, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_trainingStddev, __pyx_t_9) < 0) __PYX_ERR(0, 321, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":320
 *                     elif key == "baselen":
 *                         self._baselen = int(value)
 *                     elif key == "stddev":             # <<<<<<<<<<<<<<
 *                         self.trainingStddev = float(value)
 *                     elif key == "dispersion":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":322
 *                     elif key == "stddev":
 *                         self.trainingStddev = float(value)
 *                     elif key == "dispersion":             # <<<<<<<<<<<<<<
 *                         dispersionMatrix = asarray(value)
 *                     elif key == "extraweights":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_dispersion, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 322, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":323
 *                         self.trainingStddev = float(value)
 *                     elif key == "dispersion":
 *                         dispersionMatrix = asarray(value)             # <<<<<<<<<<<<<<
 *                     elif key == "extraweights":
 *                         self._extraweights = value.copy()
 */
              __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 323, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_16 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_16)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_16);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                }
              }
              if (!__pyx_t_16) {
                __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_9);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_8)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_value};
                  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L11_error)
                  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_GOTREF(__pyx_t_9);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_value};
                  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L11_error)
                  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_GOTREF(__pyx_t_9);
                } else
                #endif
                {
                  __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 323, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __pyx_t_16 = NULL;
                  __Pyx_INCREF(__pyx_v_value);
                  __Pyx_GIVEREF(__pyx_v_value);
                  PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_value);
                  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF_SET(__pyx_v_dispersionMatrix, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":322
 *                     elif key == "stddev":
 *                         self.trainingStddev = float(value)
 *                     elif key == "dispersion":             # <<<<<<<<<<<<<<
 *                         dispersionMatrix = asarray(value)
 *                     elif key == "extraweights":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":324
 *                     elif key == "dispersion":
 *                         dispersionMatrix = asarray(value)
 *                     elif key == "extraweights":             # <<<<<<<<<<<<<<
 *                         self._extraweights = value.copy()
 *                     elif key == "extrastddev":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_extraweights_2, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 324, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":325
 *                         dispersionMatrix = asarray(value)
 *                     elif key == "extraweights":
 *                         self._extraweights = value.copy()             # <<<<<<<<<<<<<<
 *                     elif key == "extrastddev":
 *                         self._extrastddev = value.copy()
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 325, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_15 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_15)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_15);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                }
              }
              if (__pyx_t_15) {
                __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 325, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              } else {
                __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 325, __pyx_L11_error)
              }
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extraweights, __pyx_t_9) < 0) __PYX_ERR(0, 325, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":324
 *                     elif key == "dispersion":
 *                         dispersionMatrix = asarray(value)
 *                     elif key == "extraweights":             # <<<<<<<<<<<<<<
 *                         self._extraweights = value.copy()
 *                     elif key == "extrastddev":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":326
 *                     elif key == "extraweights":
 *                         self._extraweights = value.copy()
 *                     elif key == "extrastddev":             # <<<<<<<<<<<<<<
 *                         self._extrastddev = value.copy()
 *                     elif key == "extraVLOO":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_extrastddev_2, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 326, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":327
 *                         self._extraweights = value.copy()
 *                     elif key == "extrastddev":
 *                         self._extrastddev = value.copy()             # <<<<<<<<<<<<<<
 *                     elif key == "extraVLOO":
 *                         self._extraVLOO = value.copy()
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 327, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_15 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_15)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_15);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                }
              }
              if (__pyx_t_15) {
                __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 327, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              } else {
                __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 327, __pyx_L11_error)
              }
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extrastddev, __pyx_t_9) < 0) __PYX_ERR(0, 327, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":326
 *                     elif key == "extraweights":
 *                         self._extraweights = value.copy()
 *                     elif key == "extrastddev":             # <<<<<<<<<<<<<<
 *                         self._extrastddev = value.copy()
 *                     elif key == "extraVLOO":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":328
 *                     elif key == "extrastddev":
 *                         self._extrastddev = value.copy()
 *                     elif key == "extraVLOO":             # <<<<<<<<<<<<<<
 *                         self._extraVLOO = value.copy()
 *                     elif key == "LOOweights":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_extraVLOO_2, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 328, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":329
 *                         self._extrastddev = value.copy()
 *                     elif key == "extraVLOO":
 *                         self._extraVLOO = value.copy()             # <<<<<<<<<<<<<<
 *                     elif key == "LOOweights":
 *                         ndim = value.ndim
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_15 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_15)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_15);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                }
              }
              if (__pyx_t_15) {
                __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 329, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              } else {
                __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 329, __pyx_L11_error)
              }
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extraVLOO, __pyx_t_9) < 0) __PYX_ERR(0, 329, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":328
 *                     elif key == "extrastddev":
 *                         self._extrastddev = value.copy()
 *                     elif key == "extraVLOO":             # <<<<<<<<<<<<<<
 *                         self._extraVLOO = value.copy()
 *                     elif key == "LOOweights":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":330
 *                     elif key == "extraVLOO":
 *                         self._extraVLOO = value.copy()
 *                     elif key == "LOOweights":             # <<<<<<<<<<<<<<
 *                         ndim = value.ndim
 *                         shape = value.shape
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_LOOweights, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 330, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":331
 *                         self._extraVLOO = value.copy()
 *                     elif key == "LOOweights":
 *                         ndim = value.ndim             # <<<<<<<<<<<<<<
 *                         shape = value.shape
 *                         if ndim == 2:
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 331, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_XDECREF_SET(__pyx_v_ndim, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":332
 *                     elif key == "LOOweights":
 *                         ndim = value.ndim
 *                         shape = value.shape             # <<<<<<<<<<<<<<
 *                         if ndim == 2:
 *                             nbmulti = shape[0]
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":333
 *                         ndim = value.ndim
 *                         shape = value.shape
 *                         if ndim == 2:             # <<<<<<<<<<<<<<
 *                             nbmulti = shape[0]
 *                             self._LOOweights = value.copy()
 */
              __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_ndim, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 333, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 333, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_14) {

                /* "metaphor/monal/driver/_driver.py":334
 *                         shape = value.shape
 *                         if ndim == 2:
 *                             nbmulti = shape[0]             # <<<<<<<<<<<<<<
 *                             self._LOOweights = value.copy()
 *                         elif ndim == 3:
 */
                __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_shape, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 334, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_XDECREF_SET(__pyx_v_nbmulti, __pyx_t_9);
                __pyx_t_9 = 0;

                /* "metaphor/monal/driver/_driver.py":335
 *                         if ndim == 2:
 *                             nbmulti = shape[0]
 *                             self._LOOweights = value.copy()             # <<<<<<<<<<<<<<
 *                         elif ndim == 3:
 *                             nbmulti = shape[1]
 */
                __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 335, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_15 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
                  if (likely(__pyx_t_15)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                    __Pyx_INCREF(__pyx_t_15);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_8, function);
                  }
                }
                if (__pyx_t_15) {
                  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 335, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                } else {
                  __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 335, __pyx_L11_error)
                }
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LOOweights_2, __pyx_t_9) < 0) __PYX_ERR(0, 335, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "metaphor/monal/driver/_driver.py":333
 *                         ndim = value.ndim
 *                         shape = value.shape
 *                         if ndim == 2:             # <<<<<<<<<<<<<<
 *                             nbmulti = shape[0]
 *                             self._LOOweights = value.copy()
 */
                goto __pyx_L24;
              }

              /* "metaphor/monal/driver/_driver.py":336
 *                             nbmulti = shape[0]
 *                             self._LOOweights = value.copy()
 *                         elif ndim == 3:             # <<<<<<<<<<<<<<
 *                             nbmulti = shape[1]
 *                             self._LOOweightsMulti = value.copy()
 */
              __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_ndim, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 336, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 336, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_14) {

                /* "metaphor/monal/driver/_driver.py":337
 *                             self._LOOweights = value.copy()
 *                         elif ndim == 3:
 *                             nbmulti = shape[1]             # <<<<<<<<<<<<<<
 *                             self._LOOweightsMulti = value.copy()
 *                             self._LOOweights = value[0].copy()
 */
                __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_shape, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_XDECREF_SET(__pyx_v_nbmulti, __pyx_t_9);
                __pyx_t_9 = 0;

                /* "metaphor/monal/driver/_driver.py":338
 *                         elif ndim == 3:
 *                             nbmulti = shape[1]
 *                             self._LOOweightsMulti = value.copy()             # <<<<<<<<<<<<<<
 *                             self._LOOweights = value[0].copy()
 * 
 */
                __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_15 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
                  if (likely(__pyx_t_15)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                    __Pyx_INCREF(__pyx_t_15);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_8, function);
                  }
                }
                if (__pyx_t_15) {
                  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                } else {
                  __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L11_error)
                }
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LOOweightsMulti, __pyx_t_9) < 0) __PYX_ERR(0, 338, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "metaphor/monal/driver/_driver.py":339
 *                             nbmulti = shape[1]
 *                             self._LOOweightsMulti = value.copy()
 *                             self._LOOweights = value[0].copy()             # <<<<<<<<<<<<<<
 * 
 *                     elif key == "BSweights":
 */
                __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 339, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_copy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 339, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __pyx_t_8 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
                  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15);
                  if (likely(__pyx_t_8)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                    __Pyx_INCREF(__pyx_t_8);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_15, function);
                  }
                }
                if (__pyx_t_8) {
                  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 339, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                } else {
                  __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 339, __pyx_L11_error)
                }
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LOOweights_2, __pyx_t_9) < 0) __PYX_ERR(0, 339, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "metaphor/monal/driver/_driver.py":336
 *                             nbmulti = shape[0]
 *                             self._LOOweights = value.copy()
 *                         elif ndim == 3:             # <<<<<<<<<<<<<<
 *                             nbmulti = shape[1]
 *                             self._LOOweightsMulti = value.copy()
 */
              }
              __pyx_L24:;

              /* "metaphor/monal/driver/_driver.py":330
 *                     elif key == "extraVLOO":
 *                         self._extraVLOO = value.copy()
 *                     elif key == "LOOweights":             # <<<<<<<<<<<<<<
 *                         ndim = value.ndim
 *                         shape = value.shape
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":341
 *                             self._LOOweights = value[0].copy()
 * 
 *                     elif key == "BSweights":             # <<<<<<<<<<<<<<
 *                         self._BSweights = value.copy()
 *                     elif key == "extradispersion":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_BSweights, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 341, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":342
 * 
 *                     elif key == "BSweights":
 *                         self._BSweights = value.copy()             # <<<<<<<<<<<<<<
 *                     elif key == "extradispersion":
 *                         extradispersions = value
 */
              __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_copy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 342, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_15);
              __pyx_t_8 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_15, function);
                }
              }
              if (__pyx_t_8) {
                __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 342, __pyx_L11_error)
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              } else {
                __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 342, __pyx_L11_error)
              }
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_BSweights_2, __pyx_t_9) < 0) __PYX_ERR(0, 342, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":341
 *                             self._LOOweights = value[0].copy()
 * 
 *                     elif key == "BSweights":             # <<<<<<<<<<<<<<
 *                         self._BSweights = value.copy()
 *                     elif key == "extradispersion":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":343
 *                     elif key == "BSweights":
 *                         self._BSweights = value.copy()
 *                     elif key == "extradispersion":             # <<<<<<<<<<<<<<
 *                         extradispersions = value
 *                     elif key == "model":
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_extradispersion, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 343, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":344
 *                         self._BSweights = value.copy()
 *                     elif key == "extradispersion":
 *                         extradispersions = value             # <<<<<<<<<<<<<<
 *                     elif key == "model":
 *                         rootdic = value
 */
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_DECREF_SET(__pyx_v_extradispersions, __pyx_v_value);

              /* "metaphor/monal/driver/_driver.py":343
 *                     elif key == "BSweights":
 *                         self._BSweights = value.copy()
 *                     elif key == "extradispersion":             # <<<<<<<<<<<<<<
 *                         extradispersions = value
 *                     elif key == "model":
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":345
 *                     elif key == "extradispersion":
 *                         extradispersions = value
 *                     elif key == "model":             # <<<<<<<<<<<<<<
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_model, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 345, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":346
 *                         extradispersions = value
 *                     elif key == "model":
 *                         rootdic = value             # <<<<<<<<<<<<<<
 *                         for subkey, subval in rootdic.items():
 *                             if subkey == "inputnames":
 */
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_XDECREF_SET(__pyx_v_rootdic, __pyx_v_value);

              /* "metaphor/monal/driver/_driver.py":347
 *                     elif key == "model":
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():             # <<<<<<<<<<<<<<
 *                             if subkey == "inputnames":
 *                                 inputnamelist = subval.split(',')
 */
              __pyx_t_18 = 0;
              if (unlikely(__pyx_v_rootdic == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                __PYX_ERR(0, 347, __pyx_L11_error)
              }
              __pyx_t_15 = __Pyx_dict_iterator(__pyx_v_rootdic, 0, __pyx_n_s_items, (&__pyx_t_19), (&__pyx_t_10)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 347, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_XDECREF(__pyx_t_9);
              __pyx_t_9 = __pyx_t_15;
              __pyx_t_15 = 0;
              while (1) {
                __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_19, &__pyx_t_18, &__pyx_t_15, &__pyx_t_8, NULL, __pyx_t_10);
                if (unlikely(__pyx_t_20 == 0)) break;
                if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 347, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_GOTREF(__pyx_t_8);
                __Pyx_XDECREF_SET(__pyx_v_subkey, __pyx_t_15);
                __pyx_t_15 = 0;
                __Pyx_XDECREF_SET(__pyx_v_subval, __pyx_t_8);
                __pyx_t_8 = 0;

                /* "metaphor/monal/driver/_driver.py":348
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 *                             if subkey == "inputnames":             # <<<<<<<<<<<<<<
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):
 */
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_subkey, __pyx_n_u_inputnames, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 348, __pyx_L11_error)
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":349
 *                         for subkey, subval in rootdic.items():
 *                             if subkey == "inputnames":
 *                                 inputnamelist = subval.split(',')             # <<<<<<<<<<<<<<
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.inputNames[indloc] = valloc
 */
                  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_subval, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 349, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_inputnamelist, __pyx_t_15);
                  __pyx_t_15 = 0;

                  /* "metaphor/monal/driver/_driver.py":350
 *                             if subkey == "inputnames":
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):             # <<<<<<<<<<<<<<
 *                                     self.mainModel.inputNames[indloc] = valloc
 *                             elif subkey == "outputnames":
 */
                  __Pyx_INCREF(__pyx_int_0);
                  __pyx_t_15 = __pyx_int_0;
                  if (likely(PyList_CheckExact(__pyx_v_inputnamelist)) || PyTuple_CheckExact(__pyx_v_inputnamelist)) {
                    __pyx_t_8 = __pyx_v_inputnamelist; __Pyx_INCREF(__pyx_t_8); __pyx_t_21 = 0;
                    __pyx_t_22 = NULL;
                  } else {
                    __pyx_t_21 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_inputnamelist); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 350, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_22 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 350, __pyx_L11_error)
                  }
                  for (;;) {
                    if (likely(!__pyx_t_22)) {
                      if (likely(PyList_CheckExact(__pyx_t_8))) {
                        if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_8)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_16 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_21); __Pyx_INCREF(__pyx_t_16); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 350, __pyx_L11_error)
                        #else
                        __pyx_t_16 = PySequence_ITEM(__pyx_t_8, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 350, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_16);
                        #endif
                      } else {
                        if (__pyx_t_21 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_21); __Pyx_INCREF(__pyx_t_16); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 350, __pyx_L11_error)
                        #else
                        __pyx_t_16 = PySequence_ITEM(__pyx_t_8, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 350, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_16);
                        #endif
                      }
                    } else {
                      __pyx_t_16 = __pyx_t_22(__pyx_t_8);
                      if (unlikely(!__pyx_t_16)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                          else __PYX_ERR(0, 350, __pyx_L11_error)
                        }
                        break;
                      }
                      __Pyx_GOTREF(__pyx_t_16);
                    }
                    __Pyx_XDECREF_SET(__pyx_v_valloc, __pyx_t_16);
                    __pyx_t_16 = 0;
                    __Pyx_INCREF(__pyx_t_15);
                    __Pyx_XDECREF_SET(__pyx_v_indloc, __pyx_t_15);
                    __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_t_15, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 350, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_16);
                    __Pyx_DECREF(__pyx_t_15);
                    __pyx_t_15 = __pyx_t_16;
                    __pyx_t_16 = 0;

                    /* "metaphor/monal/driver/_driver.py":351
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.inputNames[indloc] = valloc             # <<<<<<<<<<<<<<
 *                             elif subkey == "outputnames":
 *                                 inputnamelist = subval.split(',')
 */
                    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 351, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_16);
                    __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 351, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_23);
                    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                    if (unlikely(PyObject_SetItem(__pyx_t_23, __pyx_v_indloc, __pyx_v_valloc) < 0)) __PYX_ERR(0, 351, __pyx_L11_error)
                    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

                    /* "metaphor/monal/driver/_driver.py":350
 *                             if subkey == "inputnames":
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):             # <<<<<<<<<<<<<<
 *                                     self.mainModel.inputNames[indloc] = valloc
 *                             elif subkey == "outputnames":
 */
                  }
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

                  /* "metaphor/monal/driver/_driver.py":348
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 *                             if subkey == "inputnames":             # <<<<<<<<<<<<<<
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):
 */
                  goto __pyx_L27;
                }

                /* "metaphor/monal/driver/_driver.py":352
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.inputNames[indloc] = valloc
 *                             elif subkey == "outputnames":             # <<<<<<<<<<<<<<
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):
 */
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_subkey, __pyx_n_u_outputnames, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 352, __pyx_L11_error)
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":353
 *                                     self.mainModel.inputNames[indloc] = valloc
 *                             elif subkey == "outputnames":
 *                                 inputnamelist = subval.split(',')             # <<<<<<<<<<<<<<
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.outputNames[indloc] = valloc
 */
                  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_subval, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 353, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_inputnamelist, __pyx_t_8);
                  __pyx_t_8 = 0;

                  /* "metaphor/monal/driver/_driver.py":354
 *                             elif subkey == "outputnames":
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):             # <<<<<<<<<<<<<<
 *                                     self.mainModel.outputNames[indloc] = valloc
 *                     elif key == "root":
 */
                  __Pyx_INCREF(__pyx_int_0);
                  __pyx_t_8 = __pyx_int_0;
                  if (likely(PyList_CheckExact(__pyx_v_inputnamelist)) || PyTuple_CheckExact(__pyx_v_inputnamelist)) {
                    __pyx_t_15 = __pyx_v_inputnamelist; __Pyx_INCREF(__pyx_t_15); __pyx_t_21 = 0;
                    __pyx_t_22 = NULL;
                  } else {
                    __pyx_t_21 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_v_inputnamelist); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 354, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_15);
                    __pyx_t_22 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 354, __pyx_L11_error)
                  }
                  for (;;) {
                    if (likely(!__pyx_t_22)) {
                      if (likely(PyList_CheckExact(__pyx_t_15))) {
                        if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_15)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_23 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_21); __Pyx_INCREF(__pyx_t_23); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 354, __pyx_L11_error)
                        #else
                        __pyx_t_23 = PySequence_ITEM(__pyx_t_15, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 354, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_23);
                        #endif
                      } else {
                        if (__pyx_t_21 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_23 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_21); __Pyx_INCREF(__pyx_t_23); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 354, __pyx_L11_error)
                        #else
                        __pyx_t_23 = PySequence_ITEM(__pyx_t_15, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 354, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_23);
                        #endif
                      }
                    } else {
                      __pyx_t_23 = __pyx_t_22(__pyx_t_15);
                      if (unlikely(!__pyx_t_23)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                          else __PYX_ERR(0, 354, __pyx_L11_error)
                        }
                        break;
                      }
                      __Pyx_GOTREF(__pyx_t_23);
                    }
                    __Pyx_XDECREF_SET(__pyx_v_valloc, __pyx_t_23);
                    __pyx_t_23 = 0;
                    __Pyx_INCREF(__pyx_t_8);
                    __Pyx_XDECREF_SET(__pyx_v_indloc, __pyx_t_8);
                    __pyx_t_23 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 354, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_23);
                    __Pyx_DECREF(__pyx_t_8);
                    __pyx_t_8 = __pyx_t_23;
                    __pyx_t_23 = 0;

                    /* "metaphor/monal/driver/_driver.py":355
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.outputNames[indloc] = valloc             # <<<<<<<<<<<<<<
 *                     elif key == "root":
 *                         rootdic = value
 */
                    __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 355, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_23);
                    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 355, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_16);
                    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                    if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_v_indloc, __pyx_v_valloc) < 0)) __PYX_ERR(0, 355, __pyx_L11_error)
                    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

                    /* "metaphor/monal/driver/_driver.py":354
 *                             elif subkey == "outputnames":
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):             # <<<<<<<<<<<<<<
 *                                     self.mainModel.outputNames[indloc] = valloc
 *                     elif key == "root":
 */
                  }
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                  /* "metaphor/monal/driver/_driver.py":352
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.inputNames[indloc] = valloc
 *                             elif subkey == "outputnames":             # <<<<<<<<<<<<<<
 *                                 inputnamelist = subval.split(',')
 *                                 for indloc, valloc in enumerate(inputnamelist):
 */
                }
                __pyx_L27:;
              }
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":345
 *                     elif key == "extradispersion":
 *                         extradispersions = value
 *                     elif key == "model":             # <<<<<<<<<<<<<<
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":356
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.outputNames[indloc] = valloc
 *                     elif key == "root":             # <<<<<<<<<<<<<<
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 */
            __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_root, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 356, __pyx_L11_error)
            if (__pyx_t_14) {

              /* "metaphor/monal/driver/_driver.py":357
 *                                     self.mainModel.outputNames[indloc] = valloc
 *                     elif key == "root":
 *                         rootdic = value             # <<<<<<<<<<<<<<
 *                         for subkey, subval in rootdic.items():
 *                             if subkey in ('innorm', 'inputnorm'):
 */
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_XDECREF_SET(__pyx_v_rootdic, __pyx_v_value);

              /* "metaphor/monal/driver/_driver.py":358
 *                     elif key == "root":
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():             # <<<<<<<<<<<<<<
 *                             if subkey in ('innorm', 'inputnorm'):
 *                                 self.inputnorm = subval
 */
              __pyx_t_19 = 0;
              if (unlikely(__pyx_v_rootdic == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                __PYX_ERR(0, 358, __pyx_L11_error)
              }
              __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_rootdic, 0, __pyx_n_s_items, (&__pyx_t_18), (&__pyx_t_10)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 358, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_XDECREF(__pyx_t_9);
              __pyx_t_9 = __pyx_t_8;
              __pyx_t_8 = 0;
              while (1) {
                __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_18, &__pyx_t_19, &__pyx_t_8, &__pyx_t_15, NULL, __pyx_t_10);
                if (unlikely(__pyx_t_20 == 0)) break;
                if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 358, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_8);
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_XDECREF_SET(__pyx_v_subkey, __pyx_t_8);
                __pyx_t_8 = 0;
                __Pyx_XDECREF_SET(__pyx_v_subval, __pyx_t_15);
                __pyx_t_15 = 0;

                /* "metaphor/monal/driver/_driver.py":359
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 *                             if subkey in ('innorm', 'inputnorm'):             # <<<<<<<<<<<<<<
 *                                 self.inputnorm = subval
 *                             if subkey in ('putnorm', 'outputnorm'):
 */
                __Pyx_INCREF(__pyx_v_subkey);
                __pyx_t_15 = __pyx_v_subkey;
                __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_15, __pyx_n_u_innorm, Py_EQ)); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 359, __pyx_L11_error)
                if (!__pyx_t_17) {
                } else {
                  __pyx_t_14 = __pyx_t_17;
                  goto __pyx_L35_bool_binop_done;
                }
                __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_15, __pyx_n_u_inputnorm, Py_EQ)); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 359, __pyx_L11_error)
                __pyx_t_14 = __pyx_t_17;
                __pyx_L35_bool_binop_done:;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __pyx_t_17 = (__pyx_t_14 != 0);
                if (__pyx_t_17) {

                  /* "metaphor/monal/driver/_driver.py":360
 *                         for subkey, subval in rootdic.items():
 *                             if subkey in ('innorm', 'inputnorm'):
 *                                 self.inputnorm = subval             # <<<<<<<<<<<<<<
 *                             if subkey in ('putnorm', 'outputnorm'):
 *                                 outputnorm = subval
 */
                  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inputnorm, __pyx_v_subval) < 0) __PYX_ERR(0, 360, __pyx_L11_error)

                  /* "metaphor/monal/driver/_driver.py":359
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 *                             if subkey in ('innorm', 'inputnorm'):             # <<<<<<<<<<<<<<
 *                                 self.inputnorm = subval
 *                             if subkey in ('putnorm', 'outputnorm'):
 */
                }

                /* "metaphor/monal/driver/_driver.py":361
 *                             if subkey in ('innorm', 'inputnorm'):
 *                                 self.inputnorm = subval
 *                             if subkey in ('putnorm', 'outputnorm'):             # <<<<<<<<<<<<<<
 *                                 outputnorm = subval
 *                             elif subkey == "propertyname":
 */
                __Pyx_INCREF(__pyx_v_subkey);
                __pyx_t_15 = __pyx_v_subkey;
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_t_15, __pyx_n_u_putnorm, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 361, __pyx_L11_error)
                if (!__pyx_t_14) {
                } else {
                  __pyx_t_17 = __pyx_t_14;
                  goto __pyx_L38_bool_binop_done;
                }
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_t_15, __pyx_n_u_outputnorm, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 361, __pyx_L11_error)
                __pyx_t_17 = __pyx_t_14;
                __pyx_L38_bool_binop_done:;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __pyx_t_14 = (__pyx_t_17 != 0);
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":362
 *                                 self.inputnorm = subval
 *                             if subkey in ('putnorm', 'outputnorm'):
 *                                 outputnorm = subval             # <<<<<<<<<<<<<<
 *                             elif subkey == "propertyname":
 *                                 self.propertyName = str(subval)
 */
                  __Pyx_INCREF(__pyx_v_subval);
                  __Pyx_DECREF_SET(__pyx_v_outputnorm, __pyx_v_subval);

                  /* "metaphor/monal/driver/_driver.py":361
 *                             if subkey in ('innorm', 'inputnorm'):
 *                                 self.inputnorm = subval
 *                             if subkey in ('putnorm', 'outputnorm'):             # <<<<<<<<<<<<<<
 *                                 outputnorm = subval
 *                             elif subkey == "propertyname":
 */
                  goto __pyx_L37;
                }

                /* "metaphor/monal/driver/_driver.py":363
 *                             if subkey in ('putnorm', 'outputnorm'):
 *                                 outputnorm = subval
 *                             elif subkey == "propertyname":             # <<<<<<<<<<<<<<
 *                                 self.propertyName = str(subval)
 *                             elif subkey == "params":
 */
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_subkey, __pyx_n_u_propertyname, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 363, __pyx_L11_error)
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":364
 *                                 outputnorm = subval
 *                             elif subkey == "propertyname":
 *                                 self.propertyName = str(subval)             # <<<<<<<<<<<<<<
 *                             elif subkey == "params":
 *                                 params = asarray(subval)
 */
                  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_subval); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 364, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2, __pyx_t_15) < 0) __PYX_ERR(0, 364, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

                  /* "metaphor/monal/driver/_driver.py":363
 *                             if subkey in ('putnorm', 'outputnorm'):
 *                                 outputnorm = subval
 *                             elif subkey == "propertyname":             # <<<<<<<<<<<<<<
 *                                 self.propertyName = str(subval)
 *                             elif subkey == "params":
 */
                  goto __pyx_L37;
                }

                /* "metaphor/monal/driver/_driver.py":365
 *                             elif subkey == "propertyname":
 *                                 self.propertyName = str(subval)
 *                             elif subkey == "params":             # <<<<<<<<<<<<<<
 *                                 params = asarray(subval)
 *                             elif subkey == "paramnames":
 */
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_subkey, __pyx_n_u_params, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 365, __pyx_L11_error)
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":366
 *                                 self.propertyName = str(subval)
 *                             elif subkey == "params":
 *                                 params = asarray(subval)             # <<<<<<<<<<<<<<
 *                             elif subkey == "paramnames":
 *                                 paramnames = list(subval)
 */
                  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 366, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_16 = NULL;
                  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
                    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_8);
                    if (likely(__pyx_t_16)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                      __Pyx_INCREF(__pyx_t_16);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_8, function);
                    }
                  }
                  if (!__pyx_t_16) {
                    __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_subval); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 366, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_15);
                  } else {
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_8)) {
                      PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_subval};
                      __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 366, __pyx_L11_error)
                      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                      __Pyx_GOTREF(__pyx_t_15);
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                      PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_subval};
                      __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 366, __pyx_L11_error)
                      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                      __Pyx_GOTREF(__pyx_t_15);
                    } else
                    #endif
                    {
                      __pyx_t_23 = PyTuple_New(1+1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 366, __pyx_L11_error)
                      __Pyx_GOTREF(__pyx_t_23);
                      __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_16); __pyx_t_16 = NULL;
                      __Pyx_INCREF(__pyx_v_subval);
                      __Pyx_GIVEREF(__pyx_v_subval);
                      PyTuple_SET_ITEM(__pyx_t_23, 0+1, __pyx_v_subval);
                      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_23, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 366, __pyx_L11_error)
                      __Pyx_GOTREF(__pyx_t_15);
                      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                    }
                  }
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_15);
                  __pyx_t_15 = 0;

                  /* "metaphor/monal/driver/_driver.py":365
 *                             elif subkey == "propertyname":
 *                                 self.propertyName = str(subval)
 *                             elif subkey == "params":             # <<<<<<<<<<<<<<
 *                                 params = asarray(subval)
 *                             elif subkey == "paramnames":
 */
                  goto __pyx_L37;
                }

                /* "metaphor/monal/driver/_driver.py":367
 *                             elif subkey == "params":
 *                                 params = asarray(subval)
 *                             elif subkey == "paramnames":             # <<<<<<<<<<<<<<
 *                                 paramnames = list(subval)
 *                             elif subkey == "baselen":
 */
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_subkey, __pyx_n_u_paramnames, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 367, __pyx_L11_error)
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":368
 *                                 params = asarray(subval)
 *                             elif subkey == "paramnames":
 *                                 paramnames = list(subval)             # <<<<<<<<<<<<<<
 *                             elif subkey == "baselen":
 *                                 self._baselen = int(subval)
 */
                  __pyx_t_15 = PySequence_List(__pyx_v_subval); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 368, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  __Pyx_DECREF_SET(__pyx_v_paramnames, ((PyObject*)__pyx_t_15));
                  __pyx_t_15 = 0;

                  /* "metaphor/monal/driver/_driver.py":367
 *                             elif subkey == "params":
 *                                 params = asarray(subval)
 *                             elif subkey == "paramnames":             # <<<<<<<<<<<<<<
 *                                 paramnames = list(subval)
 *                             elif subkey == "baselen":
 */
                  goto __pyx_L37;
                }

                /* "metaphor/monal/driver/_driver.py":369
 *                             elif subkey == "paramnames":
 *                                 paramnames = list(subval)
 *                             elif subkey == "baselen":             # <<<<<<<<<<<<<<
 *                                 self._baselen = int(subval)
 *                 except: pass
 */
                __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_subkey, __pyx_n_u_baselen, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 369, __pyx_L11_error)
                if (__pyx_t_14) {

                  /* "metaphor/monal/driver/_driver.py":370
 *                                 paramnames = list(subval)
 *                             elif subkey == "baselen":
 *                                 self._baselen = int(subval)             # <<<<<<<<<<<<<<
 *                 except: pass
 *             if self.baselen:
 */
                  __pyx_t_15 = __Pyx_PyNumber_Int(__pyx_v_subval); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 370, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2, __pyx_t_15) < 0) __PYX_ERR(0, 370, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

                  /* "metaphor/monal/driver/_driver.py":369
 *                             elif subkey == "paramnames":
 *                                 paramnames = list(subval)
 *                             elif subkey == "baselen":             # <<<<<<<<<<<<<<
 *                                 self._baselen = int(subval)
 *                 except: pass
 */
                }
                __pyx_L37:;
              }
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "metaphor/monal/driver/_driver.py":356
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.outputNames[indloc] = valloc
 *                     elif key == "root":             # <<<<<<<<<<<<<<
 *                         rootdic = value
 *                         for subkey, subval in rootdic.items():
 */
            }
            __pyx_L19:;

            /* "metaphor/monal/driver/_driver.py":307
 *             dispersionMatrix = None
 *             for key, value in source.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if key == "propertyname":
 *                         self.propertyName = str(value)
 */
          }
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L18_try_end;
          __pyx_L11_error:;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "metaphor/monal/driver/_driver.py":371
 *                             elif subkey == "baselen":
 *                                 self._baselen = int(subval)
 *                 except: pass             # <<<<<<<<<<<<<<
 *             if self.baselen:
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 */
          /*except:*/ {
            __Pyx_ErrRestore(0,0,0);
            goto __pyx_L12_exception_handled;
          }
          __pyx_L12_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          __pyx_L18_try_end:;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":372
 *                                 self._baselen = int(subval)
 *                 except: pass
 *             if self.baselen:             # <<<<<<<<<<<<<<
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 372, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":373
 *                 except: pass
 *             if self.baselen:
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)             # <<<<<<<<<<<<<<
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]
 */
        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 373, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_InverseStudent); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 373, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 373, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 373, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_23 = PyNumber_Subtract(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 373, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_23);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_15, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_15)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_float_0_95, __pyx_t_23};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_float_0_95, __pyx_t_23};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 373, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(__pyx_float_0_95);
          __Pyx_GIVEREF(__pyx_float_0_95);
          PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_float_0_95);
          __Pyx_GIVEREF(__pyx_t_23);
          PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_23);
          __pyx_t_23 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable, __pyx_t_4) < 0) __PYX_ERR(0, 373, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":372
 *                                 self._baselen = int(subval)
 *                 except: pass
 *             if self.baselen:             # <<<<<<<<<<<<<<
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):
 */
      }

      /* "metaphor/monal/driver/_driver.py":374
 *             if self.baselen:
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):             # <<<<<<<<<<<<<<
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]
 *             self.inputnorm = inputnorm
 */
      __pyx_t_17 = (__pyx_v_inputnorm != Py_None);
      __pyx_t_24 = (__pyx_t_17 != 0);
      if (__pyx_t_24) {
      } else {
        __pyx_t_14 = __pyx_t_24;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_text_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_24 = PyObject_IsInstance(__pyx_v_inputnorm, __pyx_t_4); if (unlikely(__pyx_t_24 == ((int)-1))) __PYX_ERR(0, 374, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_17 = (__pyx_t_24 != 0);
      __pyx_t_14 = __pyx_t_17;
      __pyx_L42_bool_binop_done:;
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":375
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]             # <<<<<<<<<<<<<<
 *             self.inputnorm = inputnorm
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):
 */
        { /* enter inner scope */
          __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_inputnorm, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 375, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 375, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
            __pyx_t_15 = __pyx_t_9; __Pyx_INCREF(__pyx_t_15); __pyx_t_6 = 0;
            __pyx_t_22 = NULL;
          } else {
            __pyx_t_6 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 375, __pyx_L46_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_22 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 375, __pyx_L46_error)
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          for (;;) {
            if (likely(!__pyx_t_22)) {
              if (likely(PyList_CheckExact(__pyx_t_15))) {
                if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_15)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_9 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 375, __pyx_L46_error)
                #else
                __pyx_t_9 = PySequence_ITEM(__pyx_t_15, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 375, __pyx_L46_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
              } else {
                if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 375, __pyx_L46_error)
                #else
                __pyx_t_9 = PySequence_ITEM(__pyx_t_15, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 375, __pyx_L46_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
              }
            } else {
              __pyx_t_9 = __pyx_t_22(__pyx_t_15);
              if (unlikely(!__pyx_t_9)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 375, __pyx_L46_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_9);
            }
            __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_val, __pyx_t_9);
            __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyNumber_Float(__pyx_8genexpr2__pyx_v_val); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 375, __pyx_L46_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 375, __pyx_L46_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_val); __pyx_8genexpr2__pyx_v_val = 0;
          goto __pyx_L49_exit_scope;
          __pyx_L46_error:;
          __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_val); __pyx_8genexpr2__pyx_v_val = 0;
          goto __pyx_L3_error;
          __pyx_L49_exit_scope:;
        } /* exit inner scope */
        __Pyx_DECREF_SET(__pyx_v_inputnorm, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":374
 *             if self.baselen:
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):             # <<<<<<<<<<<<<<
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]
 *             self.inputnorm = inputnorm
 */
      }

      /* "metaphor/monal/driver/_driver.py":376
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]
 *             self.inputnorm = inputnorm             # <<<<<<<<<<<<<<
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inputnorm, __pyx_v_inputnorm) < 0) __PYX_ERR(0, 376, __pyx_L3_error)

      /* "metaphor/monal/driver/_driver.py":377
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]
 *             self.inputnorm = inputnorm
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):             # <<<<<<<<<<<<<<
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]
 *             self.outputnorm = outputnorm
 */
      __pyx_t_17 = (__pyx_v_outputnorm != Py_None);
      __pyx_t_24 = (__pyx_t_17 != 0);
      if (__pyx_t_24) {
      } else {
        __pyx_t_14 = __pyx_t_24;
        goto __pyx_L51_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_text_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_24 = PyObject_IsInstance(__pyx_v_outputnorm, __pyx_t_4); if (unlikely(__pyx_t_24 == ((int)-1))) __PYX_ERR(0, 377, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_17 = (__pyx_t_24 != 0);
      __pyx_t_14 = __pyx_t_17;
      __pyx_L51_bool_binop_done:;
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":378
 *             self.inputnorm = inputnorm
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]             # <<<<<<<<<<<<<<
 *             self.outputnorm = outputnorm
 *             self.weights = params
 */
        { /* enter inner scope */
          __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputnorm, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 378, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 378, __pyx_L55_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
            __pyx_t_15 = __pyx_t_9; __Pyx_INCREF(__pyx_t_15); __pyx_t_6 = 0;
            __pyx_t_22 = NULL;
          } else {
            __pyx_t_6 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 378, __pyx_L55_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_22 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 378, __pyx_L55_error)
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          for (;;) {
            if (likely(!__pyx_t_22)) {
              if (likely(PyList_CheckExact(__pyx_t_15))) {
                if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_15)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_9 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 378, __pyx_L55_error)
                #else
                __pyx_t_9 = PySequence_ITEM(__pyx_t_15, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 378, __pyx_L55_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
              } else {
                if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 378, __pyx_L55_error)
                #else
                __pyx_t_9 = PySequence_ITEM(__pyx_t_15, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 378, __pyx_L55_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
              }
            } else {
              __pyx_t_9 = __pyx_t_22(__pyx_t_15);
              if (unlikely(!__pyx_t_9)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 378, __pyx_L55_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_9);
            }
            __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_val, __pyx_t_9);
            __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyNumber_Float(__pyx_8genexpr3__pyx_v_val); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 378, __pyx_L55_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 378, __pyx_L55_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_val); __pyx_8genexpr3__pyx_v_val = 0;
          goto __pyx_L58_exit_scope;
          __pyx_L55_error:;
          __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_val); __pyx_8genexpr3__pyx_v_val = 0;
          goto __pyx_L3_error;
          __pyx_L58_exit_scope:;
        } /* exit inner scope */
        __Pyx_DECREF_SET(__pyx_v_outputnorm, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":377
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]
 *             self.inputnorm = inputnorm
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):             # <<<<<<<<<<<<<<
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]
 *             self.outputnorm = outputnorm
 */
      }

      /* "metaphor/monal/driver/_driver.py":379
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]
 *             self.outputnorm = outputnorm             # <<<<<<<<<<<<<<
 *             self.weights = params
 *             self._dispersionMatrix = dispersionMatrix
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputnorm, __pyx_v_outputnorm) < 0) __PYX_ERR(0, 379, __pyx_L3_error)

      /* "metaphor/monal/driver/_driver.py":380
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]
 *             self.outputnorm = outputnorm
 *             self.weights = params             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = dispersionMatrix
 *             if (extradispersions is not None) and len(extradispersions):
 */
      if (unlikely(!__pyx_v_params)) { __Pyx_RaiseUnboundLocalError("params"); __PYX_ERR(0, 380, __pyx_L3_error) }
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights, __pyx_v_params) < 0) __PYX_ERR(0, 380, __pyx_L3_error)

      /* "metaphor/monal/driver/_driver.py":381
 *             self.outputnorm = outputnorm
 *             self.weights = params
 *             self._dispersionMatrix = dispersionMatrix             # <<<<<<<<<<<<<<
 *             if (extradispersions is not None) and len(extradispersions):
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_v_dispersionMatrix) < 0) __PYX_ERR(0, 381, __pyx_L3_error)

      /* "metaphor/monal/driver/_driver.py":382
 *             self.weights = params
 *             self._dispersionMatrix = dispersionMatrix
 *             if (extradispersions is not None) and len(extradispersions):             # <<<<<<<<<<<<<<
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])
 *                 if not cond:
 */
      __pyx_t_17 = (__pyx_v_extradispersions != Py_None);
      __pyx_t_24 = (__pyx_t_17 != 0);
      if (__pyx_t_24) {
      } else {
        __pyx_t_14 = __pyx_t_24;
        goto __pyx_L60_bool_binop_done;
      }
      __pyx_t_6 = PyObject_Length(__pyx_v_extradispersions); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 382, __pyx_L3_error)
      __pyx_t_24 = (__pyx_t_6 != 0);
      __pyx_t_14 = __pyx_t_24;
      __pyx_L60_bool_binop_done:;
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":383
 *             self._dispersionMatrix = dispersionMatrix
 *             if (extradispersions is not None) and len(extradispersions):
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])             # <<<<<<<<<<<<<<
 *                 if not cond:
 *                     pcount = self.paramCount
 */
        __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_extradispersions, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_9, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 383, __pyx_L3_error)
        if (__pyx_t_14) {
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else {
          __Pyx_INCREF(__pyx_t_15);
          __pyx_t_4 = __pyx_t_15;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L62_bool_binop_done;
        }
        __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_extradispersions, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_extradispersions, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_shape); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_23);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_23, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __pyx_t_23 = PyObject_RichCompare(__pyx_t_15, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 383, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_t_23);
        __pyx_t_4 = __pyx_t_23;
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __pyx_L62_bool_binop_done:;
        __pyx_v_cond = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":384
 *             if (extradispersions is not None) and len(extradispersions):
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])
 *                 if not cond:             # <<<<<<<<<<<<<<
 *                     pcount = self.paramCount
 *                     extradispersions = [asarray(disp.flat, npdouble) for disp in extradispersions]
 */
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_cond); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 384, __pyx_L3_error)
        __pyx_t_24 = ((!__pyx_t_14) != 0);
        if (__pyx_t_24) {

          /* "metaphor/monal/driver/_driver.py":385
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])
 *                 if not cond:
 *                     pcount = self.paramCount             # <<<<<<<<<<<<<<
 *                     extradispersions = [asarray(disp.flat, npdouble) for disp in extradispersions]
 *                     extradispersions = [matlin.reshape(pcount, pcount) for matlin in extradispersions]
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_v_pcount = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "metaphor/monal/driver/_driver.py":386
 *                 if not cond:
 *                     pcount = self.paramCount
 *                     extradispersions = [asarray(disp.flat, npdouble) for disp in extradispersions]             # <<<<<<<<<<<<<<
 *                     extradispersions = [matlin.reshape(pcount, pcount) for matlin in extradispersions]
 * 
 */
          { /* enter inner scope */
            __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (likely(PyList_CheckExact(__pyx_v_extradispersions)) || PyTuple_CheckExact(__pyx_v_extradispersions)) {
              __pyx_t_23 = __pyx_v_extradispersions; __Pyx_INCREF(__pyx_t_23); __pyx_t_6 = 0;
              __pyx_t_22 = NULL;
            } else {
              __pyx_t_6 = -1; __pyx_t_23 = PyObject_GetIter(__pyx_v_extradispersions); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 386, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_23);
              __pyx_t_22 = Py_TYPE(__pyx_t_23)->tp_iternext; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 386, __pyx_L67_error)
            }
            for (;;) {
              if (likely(!__pyx_t_22)) {
                if (likely(PyList_CheckExact(__pyx_t_23))) {
                  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_23)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 386, __pyx_L67_error)
                  #else
                  __pyx_t_9 = PySequence_ITEM(__pyx_t_23, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L67_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                } else {
                  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_23)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_23, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 386, __pyx_L67_error)
                  #else
                  __pyx_t_9 = PySequence_ITEM(__pyx_t_23, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L67_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                }
              } else {
                __pyx_t_9 = __pyx_t_22(__pyx_t_23);
                if (unlikely(!__pyx_t_9)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 386, __pyx_L67_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_9);
              }
              __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_disp, __pyx_t_9);
              __pyx_t_9 = 0;
              __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 386, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_15);
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_disp, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 386, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_npdouble); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 386, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_25 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
                __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_15);
                if (likely(__pyx_t_25)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                  __Pyx_INCREF(__pyx_t_25);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_15, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_15)) {
                PyObject *__pyx_temp[3] = {__pyx_t_25, __pyx_t_8, __pyx_t_16};
                __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L67_error)
                __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
                PyObject *__pyx_temp[3] = {__pyx_t_25, __pyx_t_8, __pyx_t_16};
                __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L67_error)
                __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              } else
              #endif
              {
                __pyx_t_26 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 386, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_26);
                if (__pyx_t_25) {
                  __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_25); __pyx_t_25 = NULL;
                }
                __Pyx_GIVEREF(__pyx_t_8);
                PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_7, __pyx_t_8);
                __Pyx_GIVEREF(__pyx_t_16);
                PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_7, __pyx_t_16);
                __pyx_t_8 = 0;
                __pyx_t_16 = 0;
                __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_26, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
              }
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 386, __pyx_L67_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_disp); __pyx_8genexpr4__pyx_v_disp = 0;
            goto __pyx_L70_exit_scope;
            __pyx_L67_error:;
            __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_disp); __pyx_8genexpr4__pyx_v_disp = 0;
            goto __pyx_L3_error;
            __pyx_L70_exit_scope:;
          } /* exit inner scope */
          __Pyx_DECREF_SET(__pyx_v_extradispersions, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "metaphor/monal/driver/_driver.py":387
 *                     pcount = self.paramCount
 *                     extradispersions = [asarray(disp.flat, npdouble) for disp in extradispersions]
 *                     extradispersions = [matlin.reshape(pcount, pcount) for matlin in extradispersions]             # <<<<<<<<<<<<<<
 * 
 *                 self._extradispersions = extradispersions
 */
          { /* enter inner scope */
            __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L73_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (likely(PyList_CheckExact(__pyx_v_extradispersions)) || PyTuple_CheckExact(__pyx_v_extradispersions)) {
              __pyx_t_23 = __pyx_v_extradispersions; __Pyx_INCREF(__pyx_t_23); __pyx_t_6 = 0;
              __pyx_t_22 = NULL;
            } else {
              __pyx_t_6 = -1; __pyx_t_23 = PyObject_GetIter(__pyx_v_extradispersions); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 387, __pyx_L73_error)
              __Pyx_GOTREF(__pyx_t_23);
              __pyx_t_22 = Py_TYPE(__pyx_t_23)->tp_iternext; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 387, __pyx_L73_error)
            }
            for (;;) {
              if (likely(!__pyx_t_22)) {
                if (likely(PyList_CheckExact(__pyx_t_23))) {
                  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_23)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 387, __pyx_L73_error)
                  #else
                  __pyx_t_9 = PySequence_ITEM(__pyx_t_23, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L73_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                } else {
                  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_23)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_23, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 387, __pyx_L73_error)
                  #else
                  __pyx_t_9 = PySequence_ITEM(__pyx_t_23, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L73_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                }
              } else {
                __pyx_t_9 = __pyx_t_22(__pyx_t_23);
                if (unlikely(!__pyx_t_9)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 387, __pyx_L73_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_9);
              }
              __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_matlin, __pyx_t_9);
              __pyx_t_9 = 0;
              __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_matlin, __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 387, __pyx_L73_error)
              __Pyx_GOTREF(__pyx_t_15);
              __pyx_t_26 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
                __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_15);
                if (likely(__pyx_t_26)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                  __Pyx_INCREF(__pyx_t_26);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_15, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_15)) {
                PyObject *__pyx_temp[3] = {__pyx_t_26, __pyx_v_pcount, __pyx_v_pcount};
                __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L73_error)
                __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
                __Pyx_GOTREF(__pyx_t_9);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
                PyObject *__pyx_temp[3] = {__pyx_t_26, __pyx_v_pcount, __pyx_v_pcount};
                __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L73_error)
                __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
                __Pyx_GOTREF(__pyx_t_9);
              } else
              #endif
              {
                __pyx_t_16 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 387, __pyx_L73_error)
                __Pyx_GOTREF(__pyx_t_16);
                if (__pyx_t_26) {
                  __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_26); __pyx_t_26 = NULL;
                }
                __Pyx_INCREF(__pyx_v_pcount);
                __Pyx_GIVEREF(__pyx_v_pcount);
                PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, __pyx_v_pcount);
                __Pyx_INCREF(__pyx_v_pcount);
                __Pyx_GIVEREF(__pyx_v_pcount);
                PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_7, __pyx_v_pcount);
                __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L73_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              }
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 387, __pyx_L73_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_matlin); __pyx_8genexpr5__pyx_v_matlin = 0;
            goto __pyx_L76_exit_scope;
            __pyx_L73_error:;
            __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_matlin); __pyx_8genexpr5__pyx_v_matlin = 0;
            goto __pyx_L3_error;
            __pyx_L76_exit_scope:;
          } /* exit inner scope */
          __Pyx_DECREF_SET(__pyx_v_extradispersions, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "metaphor/monal/driver/_driver.py":384
 *             if (extradispersions is not None) and len(extradispersions):
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])
 *                 if not cond:             # <<<<<<<<<<<<<<
 *                     pcount = self.paramCount
 *                     extradispersions = [asarray(disp.flat, npdouble) for disp in extradispersions]
 */
        }

        /* "metaphor/monal/driver/_driver.py":389
 *                     extradispersions = [matlin.reshape(pcount, pcount) for matlin in extradispersions]
 * 
 *                 self._extradispersions = extradispersions             # <<<<<<<<<<<<<<
 *             return True
 *         except Exception as err: #1 (IOError, ModelLibError), err:
 */
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extradispersions, __pyx_v_extradispersions) < 0) __PYX_ERR(0, 389, __pyx_L3_error)

        /* "metaphor/monal/driver/_driver.py":382
 *             self.weights = params
 *             self._dispersionMatrix = dispersionMatrix
 *             if (extradispersions is not None) and len(extradispersions):             # <<<<<<<<<<<<<<
 *                 cond = (extradispersions[0].ndim == 2) and (extradispersions[0].shape[0] == extradispersions[0].shape[1])
 *                 if not cond:
 */
      }

      /* "metaphor/monal/driver/_driver.py":390
 * 
 *                 self._extradispersions = extradispersions
 *             return True             # <<<<<<<<<<<<<<
 *         except Exception as err: #1 (IOError, ModelLibError), err:
 *             return False
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L7_try_return;

      /* "metaphor/monal/driver/_driver.py":303
 *         outputnorm = None
 *         extradispersions = None
 *         try:             # <<<<<<<<<<<<<<
 *             paramnames = None
 *             dispersionMatrix = None
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":391
 *                 self._extradispersions = extradispersions
 *             return True
 *         except Exception as err: #1 (IOError, ModelLibError), err:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_23, &__pyx_t_9) < 0) __PYX_ERR(0, 391, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_23);
      __pyx_v_err = __pyx_t_23;
      /*try:*/ {

        /* "metaphor/monal/driver/_driver.py":392
 *             return True
 *         except Exception as err: #1 (IOError, ModelLibError), err:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def loadWeightsBinary(self, source):  # DriverBase
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        goto __pyx_L81_return;
      }

      /* "metaphor/monal/driver/_driver.py":391
 *                 self._extradispersions = extradispersions
 *             return True
 *         except Exception as err: #1 (IOError, ModelLibError), err:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
      /*finally:*/ {
        __pyx_L81_return: {
          __pyx_t_13 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err);
          __pyx_v_err = NULL;
          __pyx_r = __pyx_t_13;
          __pyx_t_13 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":303
 *         outputnorm = None
 *         extradispersions = None
 *         try:             # <<<<<<<<<<<<<<
 *             paramnames = None
 *             dispersionMatrix = None
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":295
 *         self._stdtrain = value
 * 
 *     def loadFromDict(self, source, givetime=False): # ModelLib             # <<<<<<<<<<<<<<
 *         self._extradispersions = None
 *         self._extraweights = None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_inputnorm);
  __Pyx_XDECREF(__pyx_v_outputnorm);
  __Pyx_XDECREF(__pyx_v_extradispersions);
  __Pyx_XDECREF(__pyx_v_paramnames);
  __Pyx_XDECREF(__pyx_v_dispersionMatrix);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_ndim);
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_nbmulti);
  __Pyx_XDECREF(__pyx_v_rootdic);
  __Pyx_XDECREF(__pyx_v_subkey);
  __Pyx_XDECREF(__pyx_v_subval);
  __Pyx_XDECREF(__pyx_v_inputnamelist);
  __Pyx_XDECREF(__pyx_v_indloc);
  __Pyx_XDECREF(__pyx_v_valloc);
  __Pyx_XDECREF(__pyx_v_cond);
  __Pyx_XDECREF(__pyx_v_pcount);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_disp);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_matlin);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":394
 *             return False
 * 
 *     def loadWeightsBinary(self, source):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = False
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_37loadWeightsBinary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_37loadWeightsBinary = {"loadWeightsBinary", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_37loadWeightsBinary, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_37loadWeightsBinary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadWeightsBinary (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadWeightsBinary", 1, 2, 2, 1); __PYX_ERR(0, 394, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadWeightsBinary") < 0)) __PYX_ERR(0, 394, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadWeightsBinary", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_36loadWeightsBinary(__pyx_self, __pyx_v_self, __pyx_v_source);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_36loadWeightsBinary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_sourceopen = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  __Pyx_RefNannySetupContext("loadWeightsBinary", 0);

  /* "metaphor/monal/driver/_driver.py":395
 * 
 *     def loadWeightsBinary(self, source):  # DriverBase
 *         res = False             # <<<<<<<<<<<<<<
 *         try:
 *             if isinstance(source, NpzFile):
 */
  __Pyx_INCREF(Py_False);
  __pyx_v_res = Py_False;

  /* "metaphor/monal/driver/_driver.py":396
 *     def loadWeightsBinary(self, source):  # DriverBase
 *         res = False
 *         try:             # <<<<<<<<<<<<<<
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":397
 *         res = False
 *         try:
 *             if isinstance(source, NpzFile):             # <<<<<<<<<<<<<<
 *                 return self.loadFromDict(source)
 *             with load(source, allow_pickle=True) as sourceopen:
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NpzFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_IsInstance(__pyx_v_source, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 397, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = (__pyx_t_5 != 0);
      if (__pyx_t_6) {

        /* "metaphor/monal/driver/_driver.py":398
 *         try:
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)             # <<<<<<<<<<<<<<
 *             with load(source, allow_pickle=True) as sourceopen:
 *                 res = self.loadFromDict(sourceopen)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadFromDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 398, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_source};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L3_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_4);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_source};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L3_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_4);
          } else
          #endif
          {
            __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 398, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
            __Pyx_INCREF(__pyx_v_source);
            __Pyx_GIVEREF(__pyx_v_source);
            PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_source);
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L7_try_return;

        /* "metaphor/monal/driver/_driver.py":397
 *         res = False
 *         try:
 *             if isinstance(source, NpzFile):             # <<<<<<<<<<<<<<
 *                 return self.loadFromDict(source)
 *             with load(source, allow_pickle=True) as sourceopen:
 */
      }

      /* "metaphor/monal/driver/_driver.py":399
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)
 *             with load(source, allow_pickle=True) as sourceopen:             # <<<<<<<<<<<<<<
 *                 res = self.loadFromDict(sourceopen)
 *             return res
 */
      /*with:*/ {
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_load); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_source);
        __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_allow_pickle, Py_True) < 0) __PYX_ERR(0, 399, __pyx_L3_error)
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 399, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L10_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L10_error)
        }
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __pyx_t_9;
        __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        /*try:*/ {
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_11);
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_13);
            /*try:*/ {
              __pyx_v_sourceopen = __pyx_t_7;
              __pyx_t_7 = 0;

              /* "metaphor/monal/driver/_driver.py":400
 *                 return self.loadFromDict(source)
 *             with load(source, allow_pickle=True) as sourceopen:
 *                 res = self.loadFromDict(sourceopen)             # <<<<<<<<<<<<<<
 *             return res
 *         except IOError:
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadFromDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 400, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_9 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                }
              }
              if (!__pyx_t_9) {
                __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_sourceopen); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_7);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_8)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_sourceopen};
                  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L14_error)
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                  __Pyx_GOTREF(__pyx_t_7);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_sourceopen};
                  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L14_error)
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                  __Pyx_GOTREF(__pyx_t_7);
                } else
                #endif
                {
                  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L14_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL;
                  __Pyx_INCREF(__pyx_v_sourceopen);
                  __Pyx_GIVEREF(__pyx_v_sourceopen);
                  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_sourceopen);
                  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L14_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_7);
              __pyx_t_7 = 0;

              /* "metaphor/monal/driver/_driver.py":399
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)
 *             with load(source, allow_pickle=True) as sourceopen:             # <<<<<<<<<<<<<<
 *                 res = self.loadFromDict(sourceopen)
 *             return res
 */
            }
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L19_try_end;
            __pyx_L14_error:;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            /*except:*/ {
              __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_4) < 0) __PYX_ERR(0, 399, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_9 = PyTuple_Pack(3, __pyx_t_7, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 399, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_14);
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              if (__pyx_t_6 < 0) __PYX_ERR(0, 399, __pyx_L16_except_error)
              __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
              if (__pyx_t_5) {
                __Pyx_GIVEREF(__pyx_t_7);
                __Pyx_GIVEREF(__pyx_t_8);
                __Pyx_XGIVEREF(__pyx_t_4);
                __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_8, __pyx_t_4);
                __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_4 = 0; 
                __PYX_ERR(0, 399, __pyx_L16_except_error)
              }
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              goto __pyx_L15_exception_handled;
            }
            __pyx_L16_except_error:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            goto __pyx_L3_error;
            __pyx_L15_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            __pyx_L19_try_end:;
          }
        }
        /*finally:*/ {
          /*normal exit:*/{
            if (__pyx_t_10) {
              __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__12, NULL);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 399, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            }
            goto __pyx_L13;
          }
          __pyx_L13:;
        }
        goto __pyx_L23;
        __pyx_L10_error:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L3_error;
        __pyx_L23:;
      }

      /* "metaphor/monal/driver/_driver.py":401
 *             with load(source, allow_pickle=True) as sourceopen:
 *                 res = self.loadFromDict(sourceopen)
 *             return res             # <<<<<<<<<<<<<<
 *         except IOError:
 *             return res
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      goto __pyx_L7_try_return;

      /* "metaphor/monal/driver/_driver.py":396
 *     def loadWeightsBinary(self, source):  # DriverBase
 *         res = False
 *         try:             # <<<<<<<<<<<<<<
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":402
 *                 res = self.loadFromDict(sourceopen)
 *             return res
 *         except IOError:             # <<<<<<<<<<<<<<
 *             return res
 * 
 */
    __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IOError);
    if (__pyx_t_15) {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 402, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);

      /* "metaphor/monal/driver/_driver.py":403
 *             return res
 *         except IOError:
 *             return res             # <<<<<<<<<<<<<<
 * 
 *     def loadWeightsASCII(self, source, target):  # DriverBase
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":396
 *     def loadWeightsBinary(self, source):  # DriverBase
 *         res = False
 *         try:             # <<<<<<<<<<<<<<
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":394
 *             return False
 * 
 *     def loadWeightsBinary(self, source):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = False
 *         try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_sourceopen);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":405
 *             return res
 * 
 *     def loadWeightsASCII(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         #res = False
 *         #dim = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_39loadWeightsASCII(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_39loadWeightsASCII = {"loadWeightsASCII", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_39loadWeightsASCII, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_39loadWeightsASCII(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadWeightsASCII (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,&__pyx_n_s_target,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadWeightsASCII", 1, 3, 3, 1); __PYX_ERR(0, 405, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadWeightsASCII", 1, 3, 3, 2); __PYX_ERR(0, 405, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadWeightsASCII") < 0)) __PYX_ERR(0, 405, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
    __pyx_v_target = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadWeightsASCII", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 405, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsASCII", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_38loadWeightsASCII(__pyx_self, __pyx_v_self, __pyx_v_source, __pyx_v_target);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_38loadWeightsASCII(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_target) {
  PyObject *__pyx_v_ff = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  __Pyx_RefNannySetupContext("loadWeightsASCII", 0);

  /* "metaphor/monal/driver/_driver.py":408
 *         #res = False
 *         #dim = 0
 *         try:             # <<<<<<<<<<<<<<
 *             if os.path.exists(source):
 *                 with open(source) as ff:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":409
 *         #dim = 0
 *         try:
 *             if os.path.exists(source):             # <<<<<<<<<<<<<<
 *                 with open(source) as ff:
 *                     lst = ff.readlines()
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exists); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_source);
          __Pyx_GIVEREF(__pyx_v_source);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_source);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 409, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_8) {

        /* "metaphor/monal/driver/_driver.py":410
 *         try:
 *             if os.path.exists(source):
 *                 with open(source) as ff:             # <<<<<<<<<<<<<<
 *                     lst = ff.readlines()
 *             else:
 */
        /*with:*/ {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 410, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 410, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L10_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L10_error)
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __pyx_t_5;
          __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          /*try:*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
              __Pyx_XGOTREF(__pyx_t_10);
              __Pyx_XGOTREF(__pyx_t_11);
              __Pyx_XGOTREF(__pyx_t_12);
              /*try:*/ {
                __pyx_v_ff = __pyx_t_7;
                __pyx_t_7 = 0;

                /* "metaphor/monal/driver/_driver.py":411
 *             if os.path.exists(source):
 *                 with open(source) as ff:
 *                     lst = ff.readlines()             # <<<<<<<<<<<<<<
 *             else:
 *                 lst = source.splitlines(False)
 */
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_readlines); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_5 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_5)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_5);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                  }
                }
                if (__pyx_t_5) {
                  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L14_error)
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else {
                  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L14_error)
                }
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_lst = __pyx_t_7;
                __pyx_t_7 = 0;

                /* "metaphor/monal/driver/_driver.py":410
 *         try:
 *             if os.path.exists(source):
 *                 with open(source) as ff:             # <<<<<<<<<<<<<<
 *                     lst = ff.readlines()
 *             else:
 */
              }
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              goto __pyx_L19_try_end;
              __pyx_L14_error:;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsASCII", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 410, __pyx_L16_except_error)
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_6 = PyTuple_Pack(3, __pyx_t_7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L16_except_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 410, __pyx_L16_except_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                if (__pyx_t_8 < 0) __PYX_ERR(0, 410, __pyx_L16_except_error)
                __pyx_t_14 = ((!(__pyx_t_8 != 0)) != 0);
                if (__pyx_t_14) {
                  __Pyx_GIVEREF(__pyx_t_7);
                  __Pyx_GIVEREF(__pyx_t_4);
                  __Pyx_XGIVEREF(__pyx_t_5);
                  __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_5);
                  __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; 
                  __PYX_ERR(0, 410, __pyx_L16_except_error)
                }
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                goto __pyx_L15_exception_handled;
              }
              __pyx_L16_except_error:;
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
              goto __pyx_L3_error;
              __pyx_L15_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
              __pyx_L19_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_9) {
                __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__13, NULL);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 410, __pyx_L3_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              goto __pyx_L13;
            }
            __pyx_L13:;
          }
          goto __pyx_L23;
          __pyx_L10_error:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L3_error;
          __pyx_L23:;
        }

        /* "metaphor/monal/driver/_driver.py":409
 *         #dim = 0
 *         try:
 *             if os.path.exists(source):             # <<<<<<<<<<<<<<
 *                 with open(source) as ff:
 *                     lst = ff.readlines()
 */
        goto __pyx_L9;
      }

      /* "metaphor/monal/driver/_driver.py":413
 *                     lst = ff.readlines()
 *             else:
 *                 lst = source.splitlines(False)             # <<<<<<<<<<<<<<
 *         except:
 *             lst = None
 */
      /*else*/ {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_splitlines); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_lst = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L9:;

      /* "metaphor/monal/driver/_driver.py":408
 *         #res = False
 *         #dim = 0
 *         try:             # <<<<<<<<<<<<<<
 *             if os.path.exists(source):
 *                 with open(source) as ff:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":414
 *             else:
 *                 lst = source.splitlines(False)
 *         except:             # <<<<<<<<<<<<<<
 *             lst = None
 *         res = bool(lst)
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsASCII", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "metaphor/monal/driver/_driver.py":415
 *                 lst = source.splitlines(False)
 *         except:
 *             lst = None             # <<<<<<<<<<<<<<
 *         res = bool(lst)
 *         if res:
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_lst, Py_None);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":408
 *         #res = False
 *         #dim = 0
 *         try:             # <<<<<<<<<<<<<<
 *             if os.path.exists(source):
 *                 with open(source) as ff:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":416
 *         except:
 *             lst = None
 *         res = bool(lst)             # <<<<<<<<<<<<<<
 *         if res:
 *             ind = 0
 */
  if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 416, __pyx_L1_error) }
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_lst); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyBool_FromLong((!(!__pyx_t_14))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_res = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":417
 *             lst = None
 *         res = bool(lst)
 *         if res:             # <<<<<<<<<<<<<<
 *             ind = 0
 *             self.propertyName = ""
 */
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 417, __pyx_L1_error)
  if (__pyx_t_14) {

    /* "metaphor/monal/driver/_driver.py":418
 *         res = bool(lst)
 *         if res:
 *             ind = 0             # <<<<<<<<<<<<<<
 *             self.propertyName = ""
 *             while ind < len(lst):
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_ind = __pyx_int_0;

    /* "metaphor/monal/driver/_driver.py":419
 *         if res:
 *             ind = 0
 *             self.propertyName = ""             # <<<<<<<<<<<<<<
 *             while ind < len(lst):
 *             #for ind in range(len(lst)):
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2, __pyx_kp_u__2) < 0) __PYX_ERR(0, 419, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":420
 *             ind = 0
 *             self.propertyName = ""
 *             while ind < len(lst):             # <<<<<<<<<<<<<<
 *             #for ind in range(len(lst)):
 *                 st = lst[ind].strip()
 */
    while (1) {
      if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 420, __pyx_L1_error) }
      __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 420, __pyx_L1_error)
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 420, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 420, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!__pyx_t_14) break;

      /* "metaphor/monal/driver/_driver.py":422
 *             while ind < len(lst):
 *             #for ind in range(len(lst)):
 *                 st = lst[ind].strip()             # <<<<<<<<<<<<<<
 *                 if (len(st) > 1) and (st[0]=="#"):
 *                     self.propertyName = st[1:].strip()
 */
      if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 422, __pyx_L1_error) }
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (__pyx_t_7) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 422, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 422, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":423
 *             #for ind in range(len(lst)):
 *                 st = lst[ind].strip()
 *                 if (len(st) > 1) and (st[0]=="#"):             # <<<<<<<<<<<<<<
 *                     self.propertyName = st[1:].strip()
 *                     ind += 1
 */
      __pyx_t_15 = PyObject_Length(__pyx_v_st); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 423, __pyx_L1_error)
      __pyx_t_8 = ((__pyx_t_15 > 1) != 0);
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L30_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_st, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u__15, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 423, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_14 = __pyx_t_8;
      __pyx_L30_bool_binop_done:;
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":424
 *                 st = lst[ind].strip()
 *                 if (len(st) > 1) and (st[0]=="#"):
 *                     self.propertyName = st[1:].strip()             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_st, 1, 0, NULL, NULL, &__pyx_slice__16, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2, __pyx_t_5) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":425
 *                 if (len(st) > 1) and (st[0]=="#"):
 *                     self.propertyName = st[1:].strip()
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip()
 */
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":426
 *                     self.propertyName = st[1:].strip()
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 426, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 426, __pyx_L1_error)
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_14) {

          /* "metaphor/monal/driver/_driver.py":427
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 427, __pyx_L1_error) }
          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (__pyx_t_5) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":426
 *                     self.propertyName = st[1:].strip()
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip()
 *                     else:
 */
          goto __pyx_L32;
        }

        /* "metaphor/monal/driver/_driver.py":429
 *                         st = lst[ind].strip()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 st = st.lower()
 *                 if not st in ["weights", "parameters", "outnorm", "baselen", "student", "stddev", "dispersion"]:  #, "halfdispersion"
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L32:;

        /* "metaphor/monal/driver/_driver.py":423
 *             #for ind in range(len(lst)):
 *                 st = lst[ind].strip()
 *                 if (len(st) > 1) and (st[0]=="#"):             # <<<<<<<<<<<<<<
 *                     self.propertyName = st[1:].strip()
 *                     ind += 1
 */
      }

      /* "metaphor/monal/driver/_driver.py":430
 *                     else:
 *                         st = ""
 *                 st = st.lower()             # <<<<<<<<<<<<<<
 *                 if not st in ["weights", "parameters", "outnorm", "baselen", "student", "stddev", "dispersion"]:  #, "halfdispersion"
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":431
 *                         st = ""
 *                 st = st.lower()
 *                 if not st in ["weights", "parameters", "outnorm", "baselen", "student", "stddev", "dispersion"]:  #, "halfdispersion"             # <<<<<<<<<<<<<<
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 */
      __Pyx_INCREF(__pyx_v_st);
      __pyx_t_7 = __pyx_v_st;
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_weights, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_parameters, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_outnorm, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_baselen, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_student, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_stddev, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_14 = __pyx_t_8;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_dispersion, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_8;
      __pyx_L34_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = (__pyx_t_14 != 0);
      if (__pyx_t_8) {

        /* "metaphor/monal/driver/_driver.py":432
 *                 st = st.lower()
 *                 if not st in ["weights", "parameters", "outnorm", "baselen", "student", "stddev", "dispersion"]:  #, "halfdispersion"
 *                     ind += self.loadFromASCIIStrList(lst, ind)             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadFromASCIIStrList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 432, __pyx_L1_error) }
        __pyx_t_5 = NULL;
        __pyx_t_16 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_16 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_lst);
          __Pyx_GIVEREF(__pyx_v_lst);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_16, __pyx_v_lst);
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_16, __pyx_v_ind);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_ind, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":433
 *                 if not st in ["weights", "parameters", "outnorm", "baselen", "student", "stddev", "dispersion"]:  #, "halfdispersion"
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()
 */
        __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":434
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 434, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 434, __pyx_L1_error)
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_8) {

          /* "metaphor/monal/driver/_driver.py":435
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 435, __pyx_L1_error) }
          __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (__pyx_t_4) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":434
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
          goto __pyx_L41;
        }

        /* "metaphor/monal/driver/_driver.py":437
 *                         st = lst[ind].strip().lower()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 if st in ["weights", "parameters"]:
 *                     ind += 1
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L41:;

        /* "metaphor/monal/driver/_driver.py":431
 *                         st = ""
 *                 st = st.lower()
 *                 if not st in ["weights", "parameters", "outnorm", "baselen", "student", "stddev", "dispersion"]:  #, "halfdispersion"             # <<<<<<<<<<<<<<
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 */
      }

      /* "metaphor/monal/driver/_driver.py":438
 *                     else:
 *                         st = ""
 *                 if st in ["weights", "parameters"]:             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 */
      __Pyx_INCREF(__pyx_v_st);
      __pyx_t_7 = __pyx_v_st;
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_weights, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 438, __pyx_L1_error)
      if (!__pyx_t_14) {
      } else {
        __pyx_t_8 = __pyx_t_14;
        goto __pyx_L43_bool_binop_done;
      }
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_parameters, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 438, __pyx_L1_error)
      __pyx_t_8 = __pyx_t_14;
      __pyx_L43_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_14 = (__pyx_t_8 != 0);
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":439
 *                         st = ""
 *                 if st in ["weights", "parameters"]:
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 */
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":440
 *                 if st in ["weights", "parameters"]:
 *                     ind += 1
 *                     ind += self.loadFromASCIIStrList(lst, ind)             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadFromASCIIStrList); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 440, __pyx_L1_error) }
        __pyx_t_4 = NULL;
        __pyx_t_16 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_16 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_lst);
          __Pyx_GIVEREF(__pyx_v_lst);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_16, __pyx_v_lst);
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_16, __pyx_v_ind);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_ind, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":441
 *                     ind += 1
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()
 */
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":442
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 442, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 442, __pyx_L1_error)
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 442, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_14) {

          /* "metaphor/monal/driver/_driver.py":443
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 443, __pyx_L1_error) }
          __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (__pyx_t_5) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 443, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 443, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":442
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
          goto __pyx_L45;
        }

        /* "metaphor/monal/driver/_driver.py":445
 *                         st = lst[ind].strip().lower()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 if st == "outnorm":
 *                     ind += 1
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L45:;

        /* "metaphor/monal/driver/_driver.py":438
 *                     else:
 *                         st = ""
 *                 if st in ["weights", "parameters"]:             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     ind += self.loadFromASCIIStrList(lst, ind)
 */
      }

      /* "metaphor/monal/driver/_driver.py":446
 *                     else:
 *                         st = ""
 *                 if st == "outnorm":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)
 */
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_st, __pyx_n_u_outnorm, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 446, __pyx_L1_error)
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":447
 *                         st = ""
 *                 if st == "outnorm":
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)
 *                     ind += 1
 */
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":448
 *                 if st == "outnorm":
 *                     ind += 1
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadNormFromASCIIStrList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 448, __pyx_L1_error) }
        __pyx_t_5 = NULL;
        __pyx_t_16 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_16 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_lst);
          __Pyx_GIVEREF(__pyx_v_lst);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_16, __pyx_v_lst);
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_16, __pyx_v_ind);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_ind, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":449
 *                     ind += 1
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()
 */
        __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":450
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 450, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 450, __pyx_L1_error)
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 450, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_14) {

          /* "metaphor/monal/driver/_driver.py":451
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 451, __pyx_L1_error) }
          __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (__pyx_t_4) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":450
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
          goto __pyx_L47;
        }

        /* "metaphor/monal/driver/_driver.py":453
 *                         st = lst[ind].strip().lower()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 #if st == "fr eedom":
 *                 #    ind += 1
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L47:;

        /* "metaphor/monal/driver/_driver.py":446
 *                     else:
 *                         st = ""
 *                 if st == "outnorm":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     ind += self.loadNormFromASCIIStrList(lst, ind)
 */
      }

      /* "metaphor/monal/driver/_driver.py":462
 *                 #    else:
 *                 #        st = ""
 *                 if st == "baselen":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     self._baselen = int(lst[ind])
 */
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_st, __pyx_n_u_baselen, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 462, __pyx_L1_error)
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":463
 *                 #        st = ""
 *                 if st == "baselen":
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     self._baselen = int(lst[ind])
 *                     ind += 1
 */
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":464
 *                 if st == "baselen":
 *                     ind += 1
 *                     self._baselen = int(lst[ind])             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 464, __pyx_L1_error) }
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2, __pyx_t_5) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":465
 *                     ind += 1
 *                     self._baselen = int(lst[ind])
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()
 */
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":466
 *                     self._baselen = int(lst[ind])
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 466, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 466, __pyx_L1_error)
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 466, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_14) {

          /* "metaphor/monal/driver/_driver.py":467
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 467, __pyx_L1_error) }
          __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_4) {
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_5) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 467, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 467, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":466
 *                     self._baselen = int(lst[ind])
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
          goto __pyx_L49;
        }

        /* "metaphor/monal/driver/_driver.py":469
 *                         st = lst[ind].strip().lower()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 if st == "student":
 *                     ind += 1
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L49:;

        /* "metaphor/monal/driver/_driver.py":462
 *                 #    else:
 *                 #        st = ""
 *                 if st == "baselen":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     self._baselen = int(lst[ind])
 */
      }

      /* "metaphor/monal/driver/_driver.py":470
 *                     else:
 *                         st = ""
 *                 if st == "student":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     self._studentvariable = nntb.floatEx(lst[ind])
 */
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_st, __pyx_n_u_student, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 470, __pyx_L1_error)
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":471
 *                         st = ""
 *                 if st == "student":
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     self._studentvariable = nntb.floatEx(lst[ind])
 *                     ind += 1
 */
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":472
 *                 if st == "student":
 *                     ind += 1
 *                     self._studentvariable = nntb.floatEx(lst[ind])             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 472, __pyx_L1_error) }
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
            __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
            __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          {
            __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 472, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_4); __pyx_t_4 = NULL;
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_t_6);
            __pyx_t_6 = 0;
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_17, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable, __pyx_t_7) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":473
 *                     ind += 1
 *                     self._studentvariable = nntb.floatEx(lst[ind])
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()
 */
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 473, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":474
 *                     self._studentvariable = nntb.floatEx(lst[ind])
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 474, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 474, __pyx_L1_error)
        __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 474, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 474, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_14) {

          /* "metaphor/monal/driver/_driver.py":475
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 475, __pyx_L1_error) }
          __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __pyx_t_17 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_17)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_17);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_17) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_7) {
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else {
            __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "metaphor/monal/driver/_driver.py":474
 *                     self._studentvariable = nntb.floatEx(lst[ind])
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
          goto __pyx_L51;
        }

        /* "metaphor/monal/driver/_driver.py":477
 *                         st = lst[ind].strip().lower()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 if st == "stddev":
 *                     ind += 1
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L51:;

        /* "metaphor/monal/driver/_driver.py":470
 *                     else:
 *                         st = ""
 *                 if st == "student":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     self._studentvariable = nntb.floatEx(lst[ind])
 */
      }

      /* "metaphor/monal/driver/_driver.py":478
 *                     else:
 *                         st = ""
 *                 if st == "stddev":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     target._stdtrain = nntb.floatEx(lst[ind])
 */
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_st, __pyx_n_u_stddev, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 478, __pyx_L1_error)
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":479
 *                         st = ""
 *                 if st == "stddev":
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     target._stdtrain = nntb.floatEx(lst[ind])
 *                     ind += 1
 */
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 479, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":480
 *                 if st == "stddev":
 *                     ind += 1
 *                     target._stdtrain = nntb.floatEx(lst[ind])             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 480, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 480, __pyx_L1_error) }
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_17 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_17) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_6};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_6};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_17); __pyx_t_17 = NULL;
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
            __pyx_t_6 = 0;
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_target, __pyx_n_s_stdtrain, __pyx_t_5) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":481
 *                     ind += 1
 *                     target._stdtrain = nntb.floatEx(lst[ind])
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()
 */
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":482
 *                     target._stdtrain = nntb.floatEx(lst[ind])
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 482, __pyx_L1_error) }
        __pyx_t_15 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 482, __pyx_L1_error)
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_ind, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_14) {

          /* "metaphor/monal/driver/_driver.py":483
 *                     ind += 1
 *                     if ind < len(lst):
 *                         st = lst[ind].strip().lower()             # <<<<<<<<<<<<<<
 *                     else:
 *                         st = ""
 */
          if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 483, __pyx_L1_error) }
          __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_4) {
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_5) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 483, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 483, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":482
 *                     target._stdtrain = nntb.floatEx(lst[ind])
 *                     ind += 1
 *                     if ind < len(lst):             # <<<<<<<<<<<<<<
 *                         st = lst[ind].strip().lower()
 *                     else:
 */
          goto __pyx_L53;
        }

        /* "metaphor/monal/driver/_driver.py":485
 *                         st = lst[ind].strip().lower()
 *                     else:
 *                         st = ""             # <<<<<<<<<<<<<<
 *                 if st == "dispersion":
 *                     ind += 1
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_u__2);
          __Pyx_DECREF_SET(__pyx_v_st, __pyx_kp_u__2);
        }
        __pyx_L53:;

        /* "metaphor/monal/driver/_driver.py":478
 *                     else:
 *                         st = ""
 *                 if st == "stddev":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     target._stdtrain = nntb.floatEx(lst[ind])
 */
      }

      /* "metaphor/monal/driver/_driver.py":486
 *                     else:
 *                         st = ""
 *                 if st == "dispersion":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     ind += self.loadASCIIDispersion(lst, ind)
 */
      __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_st, __pyx_n_u_dispersion, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 486, __pyx_L1_error)
      if (__pyx_t_14) {

        /* "metaphor/monal/driver/_driver.py":487
 *                         st = ""
 *                 if st == "dispersion":
 *                     ind += 1             # <<<<<<<<<<<<<<
 *                     ind += self.loadASCIIDispersion(lst, ind)
 *                 ind += 1
 */
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":488
 *                 if st == "dispersion":
 *                     ind += 1
 *                     ind += self.loadASCIIDispersion(lst, ind)             # <<<<<<<<<<<<<<
 *                 ind += 1
 *         return res
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadASCIIDispersion); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(!__pyx_v_lst)) { __Pyx_RaiseUnboundLocalError("lst"); __PYX_ERR(0, 488, __pyx_L1_error) }
        __pyx_t_5 = NULL;
        __pyx_t_16 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_16 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_lst, __pyx_v_ind};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_lst);
          __Pyx_GIVEREF(__pyx_v_lst);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_16, __pyx_v_lst);
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_16, __pyx_v_ind);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_ind, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "metaphor/monal/driver/_driver.py":486
 *                     else:
 *                         st = ""
 *                 if st == "dispersion":             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     ind += self.loadASCIIDispersion(lst, ind)
 */
      }

      /* "metaphor/monal/driver/_driver.py":489
 *                     ind += 1
 *                     ind += self.loadASCIIDispersion(lst, ind)
 *                 ind += 1             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_6);
      __pyx_t_6 = 0;
    }

    /* "metaphor/monal/driver/_driver.py":417
 *             lst = None
 *         res = bool(lst)
 *         if res:             # <<<<<<<<<<<<<<
 *             ind = 0
 *             self.propertyName = ""
 */
  }

  /* "metaphor/monal/driver/_driver.py":490
 *                     ind += self.loadASCIIDispersion(lst, ind)
 *                 ind += 1
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":405
 *             return res
 * 
 *     def loadWeightsASCII(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         #res = False
 *         #dim = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadWeightsASCII", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ff);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":492
 *         return res
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         outnorm = zeros((2,))
 *         for _ in range(2):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_41loadNormFromASCIIStrList(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_41loadNormFromASCIIStrList = {"loadNormFromASCIIStrList", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_41loadNormFromASCIIStrList, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_41loadNormFromASCIIStrList(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_lst = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadNormFromASCIIStrList (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_lst,&__pyx_n_s_index,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lst)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadNormFromASCIIStrList", 1, 3, 3, 1); __PYX_ERR(0, 492, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadNormFromASCIIStrList", 1, 3, 3, 2); __PYX_ERR(0, 492, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadNormFromASCIIStrList") < 0)) __PYX_ERR(0, 492, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_lst = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadNormFromASCIIStrList", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 492, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadNormFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_40loadNormFromASCIIStrList(__pyx_self, __pyx_v_self, __pyx_v_lst, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_40loadNormFromASCIIStrList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_outnorm = NULL;
  CYTHON_UNUSED long __pyx_v__;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_oname = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("loadNormFromASCIIStrList", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "metaphor/monal/driver/_driver.py":493
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase
 *         outnorm = zeros((2,))             # <<<<<<<<<<<<<<
 *         for _ in range(2):
 *             st = lst[index]
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_outnorm = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":494
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase
 *         outnorm = zeros((2,))
 *         for _ in range(2):             # <<<<<<<<<<<<<<
 *             st = lst[index]
 *             index += 1
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
    __pyx_v__ = __pyx_t_3;

    /* "metaphor/monal/driver/_driver.py":495
 *         outnorm = zeros((2,))
 *         for _ in range(2):
 *             st = lst[index]             # <<<<<<<<<<<<<<
 *             index += 1
 *             (oname, value) = tuple(st.split(";"))
 */
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":496
 *         for _ in range(2):
 *             st = lst[index]
 *             index += 1             # <<<<<<<<<<<<<<
 *             (oname, value) = tuple(st.split(";"))
 *             if oname == "Pi":
 */
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":497
 *             st = lst[index]
 *             index += 1
 *             (oname, value) = tuple(st.split(";"))             # <<<<<<<<<<<<<<
 *             if oname == "Pi":
 *                 outnorm[0] = nntb.floatEx(value)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (1) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 497, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_oname, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":498
 *             index += 1
 *             (oname, value) = tuple(st.split(";"))
 *             if oname == "Pi":             # <<<<<<<<<<<<<<
 *                 outnorm[0] = nntb.floatEx(value)
 *             elif oname == "Sigma":
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_oname, __pyx_n_u_Pi, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 498, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "metaphor/monal/driver/_driver.py":499
 *             (oname, value) = tuple(st.split(";"))
 *             if oname == "Pi":
 *                 outnorm[0] = nntb.floatEx(value)             # <<<<<<<<<<<<<<
 *             elif oname == "Sigma":
 *                 outnorm[1] = nntb.floatEx(value)
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 499, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__Pyx_SetItemInt(__pyx_v_outnorm, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":498
 *             index += 1
 *             (oname, value) = tuple(st.split(";"))
 *             if oname == "Pi":             # <<<<<<<<<<<<<<
 *                 outnorm[0] = nntb.floatEx(value)
 *             elif oname == "Sigma":
 */
      goto __pyx_L5;
    }

    /* "metaphor/monal/driver/_driver.py":500
 *             if oname == "Pi":
 *                 outnorm[0] = nntb.floatEx(value)
 *             elif oname == "Sigma":             # <<<<<<<<<<<<<<
 *                 outnorm[1] = nntb.floatEx(value)
 *             else:
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_oname, __pyx_n_u_Sigma, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 500, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "metaphor/monal/driver/_driver.py":501
 *                 outnorm[0] = nntb.floatEx(value)
 *             elif oname == "Sigma":
 *                 outnorm[1] = nntb.floatEx(value)             # <<<<<<<<<<<<<<
 *             else:
 *                 pass # generer exception ici
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_SetItemInt(__pyx_v_outnorm, 1, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":500
 *             if oname == "Pi":
 *                 outnorm[0] = nntb.floatEx(value)
 *             elif oname == "Sigma":             # <<<<<<<<<<<<<<
 *                 outnorm[1] = nntb.floatEx(value)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "metaphor/monal/driver/_driver.py":503
 *                 outnorm[1] = nntb.floatEx(value)
 *             else:
 *                 pass # generer exception ici             # <<<<<<<<<<<<<<
 *         try:
 *             self.outputnorm = outnorm
 */
    /*else*/ {
    }
    __pyx_L5:;
  }

  /* "metaphor/monal/driver/_driver.py":504
 *             else:
 *                 pass # generer exception ici
 *         try:             # <<<<<<<<<<<<<<
 *             self.outputnorm = outnorm
 *         except AttributeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":505
 *                 pass # generer exception ici
 *         try:
 *             self.outputnorm = outnorm             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             self.outputnorm = outnorm
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputnorm, __pyx_v_outnorm) < 0) __PYX_ERR(0, 505, __pyx_L6_error)

      /* "metaphor/monal/driver/_driver.py":504
 *             else:
 *                 pass # generer exception ici
 *         try:             # <<<<<<<<<<<<<<
 *             self.outputnorm = outnorm
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":506
 *         try:
 *             self.outputnorm = outnorm
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             self.outputnorm = outnorm
 *         return 2
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadNormFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(0, 506, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_4);

      /* "metaphor/monal/driver/_driver.py":507
 *             self.outputnorm = outnorm
 *         except AttributeError:
 *             self.outputnorm = outnorm             # <<<<<<<<<<<<<<
 *         return 2
 * 
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputnorm, __pyx_v_outnorm) < 0) __PYX_ERR(0, 507, __pyx_L8_except_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;
    __pyx_L8_except_error:;

    /* "metaphor/monal/driver/_driver.py":504
 *             else:
 *                 pass # generer exception ici
 *         try:             # <<<<<<<<<<<<<<
 *             self.outputnorm = outnorm
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    __pyx_L11_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":508
 *         except AttributeError:
 *             self.outputnorm = outnorm
 *         return 2             # <<<<<<<<<<<<<<
 * 
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_2);
  __pyx_r = __pyx_int_2;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":492
 *         return res
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         outnorm = zeros((2,))
 *         for _ in range(2):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadNormFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outnorm);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_oname);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":510
 *         return 2
 * 
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = bool(lst)
 *         if not res:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_43loadFromASCIIStrList(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_43loadFromASCIIStrList = {"loadFromASCIIStrList", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_43loadFromASCIIStrList, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_43loadFromASCIIStrList(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_lst = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadFromASCIIStrList (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_lst,&__pyx_n_s_index,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lst)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadFromASCIIStrList", 1, 3, 3, 1); __PYX_ERR(0, 510, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadFromASCIIStrList", 1, 3, 3, 2); __PYX_ERR(0, 510, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadFromASCIIStrList") < 0)) __PYX_ERR(0, 510, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_lst = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadFromASCIIStrList", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 510, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_42loadFromASCIIStrList(__pyx_self, __pyx_v_self, __pyx_v_lst, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_42loadFromASCIIStrList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_v_wformat = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_llst = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_locallst = NULL;
  PyObject *__pyx_v_locrow = NULL;
  PyObject *__pyx_v_wname = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  Py_ssize_t __pyx_t_21;
  int __pyx_t_22;
  __Pyx_RefNannySetupContext("loadFromASCIIStrList", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "metaphor/monal/driver/_driver.py":511
 * 
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase
 *         res = bool(lst)             # <<<<<<<<<<<<<<
 *         if not res:
 *             return 0
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lst); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":512
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase
 *         res = bool(lst)
 *         if not res:             # <<<<<<<<<<<<<<
 *             return 0
 *         dim = self.dimension
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 512, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_1) != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":513
 *         res = bool(lst)
 *         if not res:
 *             return 0             # <<<<<<<<<<<<<<
 *         dim = self.dimension
 *         if self.weights is None:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":512
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase
 *         res = bool(lst)
 *         if not res:             # <<<<<<<<<<<<<<
 *             return 0
 *         dim = self.dimension
 */
  }

  /* "metaphor/monal/driver/_driver.py":514
 *         if not res:
 *             return 0
 *         dim = self.dimension             # <<<<<<<<<<<<<<
 *         if self.weights is None:
 *             self.weights = zeros((dim,))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dim = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":515
 *             return 0
 *         dim = self.dimension
 *         if self.weights is None:             # <<<<<<<<<<<<<<
 *             self.weights = zeros((dim,))
 *         wformat = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":516
 *         dim = self.dimension
 *         if self.weights is None:
 *             self.weights = zeros((dim,))             # <<<<<<<<<<<<<<
 *         wformat = []
 *         st= lst[index]
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_dim);
    __Pyx_GIVEREF(__pyx_v_dim);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_dim);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights, __pyx_t_2) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":515
 *             return 0
 *         dim = self.dimension
 *         if self.weights is None:             # <<<<<<<<<<<<<<
 *             self.weights = zeros((dim,))
 *         wformat = []
 */
  }

  /* "metaphor/monal/driver/_driver.py":517
 *         if self.weights is None:
 *             self.weights = zeros((dim,))
 *         wformat = []             # <<<<<<<<<<<<<<
 *         st= lst[index]
 *         llst = st.split('=')
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_wformat = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":518
 *             self.weights = zeros((dim,))
 *         wformat = []
 *         st= lst[index]             # <<<<<<<<<<<<<<
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":
 */
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_st = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":519
 *         wformat = []
 *         st= lst[index]
 *         llst = st.split('=')             # <<<<<<<<<<<<<<
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_llst = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":520
 *         st= lst[index]
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":             # <<<<<<<<<<<<<<
 *             dim = int(llst[1].strip())
 *             index += 1
 */
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_llst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_7) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_count, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":521
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())             # <<<<<<<<<<<<<<
 *             index += 1
 *         try:
 */
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_llst, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_dim, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":522
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())
 *             index += 1             # <<<<<<<<<<<<<<
 *         try:
 *             for row in range(dim):
 */
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":520
 *         st= lst[index]
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":             # <<<<<<<<<<<<<<
 *             dim = int(llst[1].strip())
 *             index += 1
 */
  }

  /* "metaphor/monal/driver/_driver.py":523
 *             dim = int(llst[1].strip())
 *             index += 1
 *         try:             # <<<<<<<<<<<<<<
 *             for row in range(dim):
 *                 st = lst[index + row]
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":524
 *             index += 1
 *         try:
 *             for row in range(dim):             # <<<<<<<<<<<<<<
 *                 st = lst[index + row]
 *                 locallst = st.strip().split(";")
 */
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_dim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 524, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 524, __pyx_L6_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 524, __pyx_L6_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_12(__pyx_t_4);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 524, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "metaphor/monal/driver/_driver.py":525
 *         try:
 *             for row in range(dim):
 *                 st = lst[index + row]             # <<<<<<<<<<<<<<
 *                 locallst = st.strip().split(";")
 *                 if mtb.isStrNum(locallst[0]):
 */
        __pyx_t_2 = PyNumber_Add(__pyx_v_index, __pyx_v_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":526
 *             for row in range(dim):
 *                 st = lst[index + row]
 *                 locallst = st.strip().split(";")             # <<<<<<<<<<<<<<
 *                 if mtb.isStrNum(locallst[0]):
 *                     try:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        if (__pyx_t_7) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L6_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_locallst, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":527
 *                 st = lst[index + row]
 *                 locallst = st.strip().split(";")
 *                 if mtb.isStrNum(locallst[0]):             # <<<<<<<<<<<<<<
 *                     try:
 *                         locrow = int(locallst[0])
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isStrNum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 527, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_locallst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_6) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 527, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __pyx_t_6 = NULL;
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 527, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_1) {

          /* "metaphor/monal/driver/_driver.py":528
 *                 locallst = st.strip().split(";")
 *                 if mtb.isStrNum(locallst[0]):
 *                     try:             # <<<<<<<<<<<<<<
 *                         locrow = int(locallst[0])
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_16);
            /*try:*/ {

              /* "metaphor/monal/driver/_driver.py":529
 *                 if mtb.isStrNum(locallst[0]):
 *                     try:
 *                         locrow = int(locallst[0])             # <<<<<<<<<<<<<<
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])
 *                         wformat.append(locrow)
 */
              __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_locallst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF_SET(__pyx_v_locrow, __pyx_t_7);
              __pyx_t_7 = 0;

              /* "metaphor/monal/driver/_driver.py":530
 *                     try:
 *                         locrow = int(locallst[0])
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])             # <<<<<<<<<<<<<<
 *                         wformat.append(locrow)
 *                     except:
 */
              __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 530, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_locallst, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_2 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_13);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_13, function);
                }
              }
              if (!__pyx_t_2) {
                __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L15_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_7);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_13)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
                  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L15_error)
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
                  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L15_error)
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else
                #endif
                {
                  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 530, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
                  __Pyx_GIVEREF(__pyx_t_5);
                  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
                  __pyx_t_5 = 0;
                  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 530, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_13);
              if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_v_locrow, __pyx_t_7) < 0)) __PYX_ERR(0, 530, __pyx_L15_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "metaphor/monal/driver/_driver.py":531
 *                         locrow = int(locallst[0])
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])
 *                         wformat.append(locrow)             # <<<<<<<<<<<<<<
 *                     except:
 *                         self.weights[row] = nntb.floatEx(locallst[0])
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_wformat, __pyx_v_locrow); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 531, __pyx_L15_error)

              /* "metaphor/monal/driver/_driver.py":528
 *                 locallst = st.strip().split(";")
 *                 if mtb.isStrNum(locallst[0]):
 *                     try:             # <<<<<<<<<<<<<<
 *                         locrow = int(locallst[0])
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])
 */
            }
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            goto __pyx_L22_try_end;
            __pyx_L15_error:;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "metaphor/monal/driver/_driver.py":532
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])
 *                         wformat.append(locrow)
 *                     except:             # <<<<<<<<<<<<<<
 *                         self.weights[row] = nntb.floatEx(locallst[0])
 *                         wformat.append(row)
 */
            /*except:*/ {
              __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_13, &__pyx_t_6) < 0) __PYX_ERR(0, 532, __pyx_L17_except_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_GOTREF(__pyx_t_6);

              /* "metaphor/monal/driver/_driver.py":533
 *                         wformat.append(locrow)
 *                     except:
 *                         self.weights[row] = nntb.floatEx(locallst[0])             # <<<<<<<<<<<<<<
 *                         wformat.append(row)
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):
 */
              __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L17_except_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 533, __pyx_L17_except_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_locallst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L17_except_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_19 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
                __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_18);
                if (likely(__pyx_t_19)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                  __Pyx_INCREF(__pyx_t_19);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_18, function);
                }
              }
              if (!__pyx_t_19) {
                __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L17_except_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_GOTREF(__pyx_t_5);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_18)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_2};
                  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L17_except_error)
                  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_2};
                  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L17_except_error)
                  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                } else
                #endif
                {
                  __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 533, __pyx_L17_except_error)
                  __Pyx_GOTREF(__pyx_t_20);
                  __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19); __pyx_t_19 = NULL;
                  __Pyx_GIVEREF(__pyx_t_2);
                  PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_t_2);
                  __pyx_t_2 = 0;
                  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_20, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L17_except_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 533, __pyx_L17_except_error)
              __Pyx_GOTREF(__pyx_t_18);
              if (unlikely(PyObject_SetItem(__pyx_t_18, __pyx_v_row, __pyx_t_5) < 0)) __PYX_ERR(0, 533, __pyx_L17_except_error)
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

              /* "metaphor/monal/driver/_driver.py":534
 *                     except:
 *                         self.weights[row] = nntb.floatEx(locallst[0])
 *                         wformat.append(row)             # <<<<<<<<<<<<<<
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):
 *                     wname = locallst[0]
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_wformat, __pyx_v_row); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 534, __pyx_L17_except_error)
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              goto __pyx_L16_exception_handled;
            }
            __pyx_L17_except_error:;

            /* "metaphor/monal/driver/_driver.py":528
 *                 locallst = st.strip().split(";")
 *                 if mtb.isStrNum(locallst[0]):
 *                     try:             # <<<<<<<<<<<<<<
 *                         locrow = int(locallst[0])
 *                         self.weights[locrow] = nntb.floatEx(locallst[1])
 */
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
            goto __pyx_L6_error;
            __pyx_L16_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
            __pyx_L22_try_end:;
          }

          /* "metaphor/monal/driver/_driver.py":527
 *                 st = lst[index + row]
 *                 locallst = st.strip().split(";")
 *                 if mtb.isStrNum(locallst[0]):             # <<<<<<<<<<<<<<
 *                     try:
 *                         locrow = int(locallst[0])
 */
          goto __pyx_L14;
        }

        /* "metaphor/monal/driver/_driver.py":535
 *                         self.weights[row] = nntb.floatEx(locallst[0])
 *                         wformat.append(row)
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):             # <<<<<<<<<<<<<<
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):
 */
        __pyx_t_21 = PyObject_Length(__pyx_v_locallst); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 535, __pyx_L6_error)
        __pyx_t_3 = ((__pyx_t_21 >= 2) != 0);
        if (__pyx_t_3) {
        } else {
          __pyx_t_1 = __pyx_t_3;
          goto __pyx_L25_bool_binop_done;
        }
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 535, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_isStrNum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_locallst, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 535, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_5) {
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_13};
            __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_13};
            __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          } else
          #endif
          {
            __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 535, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5); __pyx_t_5 = NULL;
            __Pyx_GIVEREF(__pyx_t_13);
            PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_13);
            __pyx_t_13 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 535, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_1 = __pyx_t_3;
        __pyx_L25_bool_binop_done:;
        if (__pyx_t_1) {

          /* "metaphor/monal/driver/_driver.py":536
 *                         wformat.append(row)
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):
 *                     wname = locallst[0]             # <<<<<<<<<<<<<<
 *                     if isinstance(wname, str):
 *                         try:
 */
          __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_locallst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 536, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_XDECREF_SET(__pyx_v_wname, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "metaphor/monal/driver/_driver.py":537
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):             # <<<<<<<<<<<<<<
 *                         try:
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 */
          __pyx_t_1 = PyUnicode_Check(__pyx_v_wname); 
          __pyx_t_3 = (__pyx_t_1 != 0);
          if (__pyx_t_3) {

            /* "metaphor/monal/driver/_driver.py":538
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):
 *                         try:             # <<<<<<<<<<<<<<
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 *                         except AttributeError:
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_14);
              /*try:*/ {

                /* "metaphor/monal/driver/_driver.py":539
 *                     if isinstance(wname, str):
 *                         try:
 *                             ind = self.mainModel.getIndexWeightOfName(wname)             # <<<<<<<<<<<<<<
 *                         except AttributeError:
 *                             ind = self.getIndexWeightOfName(wname)
 */
                __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 539, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_7);
                __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getIndexWeightOfName); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 539, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_18);
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                __pyx_t_7 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
                  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_18);
                  if (likely(__pyx_t_7)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                    __Pyx_INCREF(__pyx_t_7);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_18, function);
                  }
                }
                if (!__pyx_t_7) {
                  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_wname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_6);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_18)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_wname};
                    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L28_error)
                    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_GOTREF(__pyx_t_6);
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_wname};
                    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L28_error)
                    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_GOTREF(__pyx_t_6);
                  } else
                  #endif
                  {
                    __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 539, __pyx_L28_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL;
                    __Pyx_INCREF(__pyx_v_wname);
                    __Pyx_GIVEREF(__pyx_v_wname);
                    PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_wname);
                    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L28_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
                __pyx_t_6 = 0;

                /* "metaphor/monal/driver/_driver.py":538
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):
 *                         try:             # <<<<<<<<<<<<<<
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 *                         except AttributeError:
 */
              }
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              goto __pyx_L35_try_end;
              __pyx_L28_error:;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "metaphor/monal/driver/_driver.py":540
 *                         try:
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 *                         except AttributeError:             # <<<<<<<<<<<<<<
 *                             ind = self.getIndexWeightOfName(wname)
 *                     else:
 */
              __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
              if (__pyx_t_22) {
                __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_18, &__pyx_t_13) < 0) __PYX_ERR(0, 540, __pyx_L30_except_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_GOTREF(__pyx_t_18);
                __Pyx_GOTREF(__pyx_t_13);

                /* "metaphor/monal/driver/_driver.py":541
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 *                         except AttributeError:
 *                             ind = self.getIndexWeightOfName(wname)             # <<<<<<<<<<<<<<
 *                     else:
 *                         ind = wname
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getIndexWeightOfName); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L30_except_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_20 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
                  __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_5);
                  if (likely(__pyx_t_20)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_20);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_5, function);
                  }
                }
                if (!__pyx_t_20) {
                  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_wname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L30_except_error)
                  __Pyx_GOTREF(__pyx_t_7);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_5)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_v_wname};
                    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L30_except_error)
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_GOTREF(__pyx_t_7);
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_v_wname};
                    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L30_except_error)
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_GOTREF(__pyx_t_7);
                  } else
                  #endif
                  {
                    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L30_except_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_20); __pyx_t_20 = NULL;
                    __Pyx_INCREF(__pyx_v_wname);
                    __Pyx_GIVEREF(__pyx_v_wname);
                    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_wname);
                    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L30_except_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_7);
                __pyx_t_7 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                goto __pyx_L29_exception_handled;
              }
              goto __pyx_L30_except_error;
              __pyx_L30_except_error:;

              /* "metaphor/monal/driver/_driver.py":538
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):
 *                         try:             # <<<<<<<<<<<<<<
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 *                         except AttributeError:
 */
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
              goto __pyx_L6_error;
              __pyx_L29_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
              __pyx_L35_try_end:;
            }

            /* "metaphor/monal/driver/_driver.py":537
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):             # <<<<<<<<<<<<<<
 *                         try:
 *                             ind = self.mainModel.getIndexWeightOfName(wname)
 */
            goto __pyx_L27;
          }

          /* "metaphor/monal/driver/_driver.py":543
 *                             ind = self.getIndexWeightOfName(wname)
 *                     else:
 *                         ind = wname             # <<<<<<<<<<<<<<
 *                     if ind >= 0:
 *                         self.weights[ind] = nntb.floatEx(locallst[1])
 */
          /*else*/ {
            __Pyx_INCREF(__pyx_v_wname);
            __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_v_wname);
          }
          __pyx_L27:;

          /* "metaphor/monal/driver/_driver.py":544
 *                     else:
 *                         ind = wname
 *                     if ind >= 0:             # <<<<<<<<<<<<<<
 *                         self.weights[ind] = nntb.floatEx(locallst[1])
 *                         wformat.append(ind)
 */
          __pyx_t_13 = PyObject_RichCompare(__pyx_v_ind, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 544, __pyx_L6_error)
          __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 544, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_3) {

            /* "metaphor/monal/driver/_driver.py":545
 *                         ind = wname
 *                     if ind >= 0:
 *                         self.weights[ind] = nntb.floatEx(locallst[1])             # <<<<<<<<<<<<<<
 *                         wformat.append(ind)
 *         except:
 */
            __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 545, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_locallst, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 545, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            if (!__pyx_t_7) {
              __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 545, __pyx_L6_error)
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_GOTREF(__pyx_t_13);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_6)) {
                PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_18};
                __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 545, __pyx_L6_error)
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
                PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_18};
                __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 545, __pyx_L6_error)
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
                __Pyx_GIVEREF(__pyx_t_18);
                PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_18);
                __pyx_t_18 = 0;
                __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 545, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_ind, __pyx_t_13) < 0)) __PYX_ERR(0, 545, __pyx_L6_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

            /* "metaphor/monal/driver/_driver.py":546
 *                     if ind >= 0:
 *                         self.weights[ind] = nntb.floatEx(locallst[1])
 *                         wformat.append(ind)             # <<<<<<<<<<<<<<
 *         except:
 *             dim = 0
 */
            __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_wformat, __pyx_v_ind); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 546, __pyx_L6_error)

            /* "metaphor/monal/driver/_driver.py":544
 *                     else:
 *                         ind = wname
 *                     if ind >= 0:             # <<<<<<<<<<<<<<
 *                         self.weights[ind] = nntb.floatEx(locallst[1])
 *                         wformat.append(ind)
 */
          }

          /* "metaphor/monal/driver/_driver.py":535
 *                         self.weights[row] = nntb.floatEx(locallst[0])
 *                         wformat.append(row)
 *                 elif (len(locallst) >= 2) and mtb.isStrNum(locallst[1]):             # <<<<<<<<<<<<<<
 *                     wname = locallst[0]
 *                     if isinstance(wname, str):
 */
        }
        __pyx_L14:;

        /* "metaphor/monal/driver/_driver.py":524
 *             index += 1
 *         try:
 *             for row in range(dim):             # <<<<<<<<<<<<<<
 *                 st = lst[index + row]
 *                 locallst = st.strip().split(";")
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":523
 *             dim = int(llst[1].strip())
 *             index += 1
 *         try:             # <<<<<<<<<<<<<<
 *             for row in range(dim):
 *                 st = lst[index + row]
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":547
 *                         self.weights[ind] = nntb.floatEx(locallst[1])
 *                         wformat.append(ind)
 *         except:             # <<<<<<<<<<<<<<
 *             dim = 0
 *         return dim
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_13, &__pyx_t_6) < 0) __PYX_ERR(0, 547, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/monal/driver/_driver.py":548
 *                         wformat.append(ind)
 *         except:
 *             dim = 0             # <<<<<<<<<<<<<<
 *         return dim
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_dim, __pyx_int_0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_exception_handled;
    }
    __pyx_L8_except_error:;

    /* "metaphor/monal/driver/_driver.py":523
 *             dim = int(llst[1].strip())
 *             index += 1
 *         try:             # <<<<<<<<<<<<<<
 *             for row in range(dim):
 *                 st = lst[index + row]
 */
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L11_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":549
 *         except:
 *             dim = 0
 *         return dim             # <<<<<<<<<<<<<<
 * 
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dim);
  __pyx_r = __pyx_v_dim;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":510
 *         return 2
 * 
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = bool(lst)
 *         if not res:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadFromASCIIStrList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_wformat);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_llst);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_locallst);
  __Pyx_XDECREF(__pyx_v_locrow);
  __Pyx_XDECREF(__pyx_v_wname);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":551
 *         return dim
 * 
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_45loadASCIIDispersion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_45loadASCIIDispersion = {"loadASCIIDispersion", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_45loadASCIIDispersion, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_45loadASCIIDispersion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_lst = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadASCIIDispersion (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_lst,&__pyx_n_s_index,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lst)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadASCIIDispersion", 1, 3, 3, 1); __PYX_ERR(0, 551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadASCIIDispersion", 1, 3, 3, 2); __PYX_ERR(0, 551, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadASCIIDispersion") < 0)) __PYX_ERR(0, 551, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_lst = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadASCIIDispersion", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 551, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadASCIIDispersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_44loadASCIIDispersion(__pyx_self, __pyx_v_self, __pyx_v_lst, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_44loadASCIIDispersion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_llst = NULL;
  PyObject *__pyx_v_i1 = NULL;
  PyObject *__pyx_v_i2 = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_mat = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_ww = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannySetupContext("loadASCIIDispersion", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "metaphor/monal/driver/_driver.py":552
 * 
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase
 *         dim = (self.dimension * (self.dimension + 1)) / 2             # <<<<<<<<<<<<<<
 *         st= lst[index]
 *         llst = st.split('=')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_2, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dim = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":553
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]             # <<<<<<<<<<<<<<
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":
 */
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_st = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":554
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]
 *         llst = st.split('=')             # <<<<<<<<<<<<<<
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_llst = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":555
 *         st= lst[index]
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":             # <<<<<<<<<<<<<<
 *             dim = int(llst[1].strip())
 *             index += 1
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_llst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_count, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":556
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())             # <<<<<<<<<<<<<<
 *             index += 1
 *         i1 = 0
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_llst, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_dim, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":557
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())
 *             index += 1             # <<<<<<<<<<<<<<
 *         i1 = 0
 *         i2 = 0
 */
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":555
 *         st= lst[index]
 *         llst = st.split('=')
 *         if llst[0].strip().lower() == "count":             # <<<<<<<<<<<<<<
 *             dim = int(llst[1].strip())
 *             index += 1
 */
  }

  /* "metaphor/monal/driver/_driver.py":558
 *             dim = int(llst[1].strip())
 *             index += 1
 *         i1 = 0             # <<<<<<<<<<<<<<
 *         i2 = 0
 *         nd = self.dimension
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_i1 = __pyx_int_0;

  /* "metaphor/monal/driver/_driver.py":559
 *             index += 1
 *         i1 = 0
 *         i2 = 0             # <<<<<<<<<<<<<<
 *         nd = self.dimension
 *         mat = zeros((nd, nd))  #[0]
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_i2 = __pyx_int_0;

  /* "metaphor/monal/driver/_driver.py":560
 *         i1 = 0
 *         i2 = 0
 *         nd = self.dimension             # <<<<<<<<<<<<<<
 *         mat = zeros((nd, nd))  #[0]
 *         for ind in range(dim):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_nd = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":561
 *         i2 = 0
 *         nd = self.dimension
 *         mat = zeros((nd, nd))  #[0]             # <<<<<<<<<<<<<<
 *         for ind in range(dim):
 *             st= lst[index + ind]
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_nd);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nd);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_mat = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":562
 *         nd = self.dimension
 *         mat = zeros((nd, nd))  #[0]
 *         for ind in range(dim):             # <<<<<<<<<<<<<<
 *             st= lst[index + ind]
 *             ww = nntb.floatEx(st)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 562, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 562, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 562, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_8(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 562, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":563
 *         mat = zeros((nd, nd))  #[0]
 *         for ind in range(dim):
 *             st= lst[index + ind]             # <<<<<<<<<<<<<<
 *             ww = nntb.floatEx(st)
 *             mat[i1, i2] = ww
 */
    __pyx_t_3 = PyNumber_Add(__pyx_v_index, __pyx_v_ind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":564
 *         for ind in range(dim):
 *             st= lst[index + ind]
 *             ww = nntb.floatEx(st)             # <<<<<<<<<<<<<<
 *             mat[i1, i2] = ww
 *             mat[i2, i1] = ww
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_st); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_st};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_st};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_st);
        __Pyx_GIVEREF(__pyx_v_st);
        PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_st);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ww, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":565
 *             st= lst[index + ind]
 *             ww = nntb.floatEx(st)
 *             mat[i1, i2] = ww             # <<<<<<<<<<<<<<
 *             mat[i2, i1] = ww
 *             if i2 < i1:
 */
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_i1);
    __Pyx_GIVEREF(__pyx_v_i1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_i1);
    __Pyx_INCREF(__pyx_v_i2);
    __Pyx_GIVEREF(__pyx_v_i2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i2);
    if (unlikely(PyObject_SetItem(__pyx_v_mat, __pyx_t_6, __pyx_v_ww) < 0)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":566
 *             ww = nntb.floatEx(st)
 *             mat[i1, i2] = ww
 *             mat[i2, i1] = ww             # <<<<<<<<<<<<<<
 *             if i2 < i1:
 *                 i2 += 1
 */
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_i2);
    __Pyx_GIVEREF(__pyx_v_i2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_i2);
    __Pyx_INCREF(__pyx_v_i1);
    __Pyx_GIVEREF(__pyx_v_i1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i1);
    if (unlikely(PyObject_SetItem(__pyx_v_mat, __pyx_t_6, __pyx_v_ww) < 0)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":567
 *             mat[i1, i2] = ww
 *             mat[i2, i1] = ww
 *             if i2 < i1:             # <<<<<<<<<<<<<<
 *                 i2 += 1
 *             else:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_i2, __pyx_v_i1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 567, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_5) {

      /* "metaphor/monal/driver/_driver.py":568
 *             mat[i2, i1] = ww
 *             if i2 < i1:
 *                 i2 += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 i1 += 1
 */
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i2, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_i2, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":567
 *             mat[i1, i2] = ww
 *             mat[i2, i1] = ww
 *             if i2 < i1:             # <<<<<<<<<<<<<<
 *                 i2 += 1
 *             else:
 */
      goto __pyx_L6;
    }

    /* "metaphor/monal/driver/_driver.py":570
 *                 i2 += 1
 *             else:
 *                 i1 += 1             # <<<<<<<<<<<<<<
 *                 i2 = 0
 *             ind += 1
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_i1, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":571
 *             else:
 *                 i1 += 1
 *                 i2 = 0             # <<<<<<<<<<<<<<
 *             ind += 1
 *         self._dispersionMatrix = mat
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_i2, __pyx_int_0);
    }
    __pyx_L6:;

    /* "metaphor/monal/driver/_driver.py":572
 *                 i1 += 1
 *                 i2 = 0
 *             ind += 1             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = mat
 *         return dim
 */
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_ind, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":562
 *         nd = self.dimension
 *         mat = zeros((nd, nd))  #[0]
 *         for ind in range(dim):             # <<<<<<<<<<<<<<
 *             st= lst[index + ind]
 *             ww = nntb.floatEx(st)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":573
 *                 i2 = 0
 *             ind += 1
 *         self._dispersionMatrix = mat             # <<<<<<<<<<<<<<
 *         return dim
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_v_mat) < 0) __PYX_ERR(0, 573, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":574
 *             ind += 1
 *         self._dispersionMatrix = mat
 *         return dim             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dim);
  __pyx_r = __pyx_v_dim;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":551
 *         return dim
 * 
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.loadASCIIDispersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_llst);
  __Pyx_XDECREF(__pyx_v_i1);
  __Pyx_XDECREF(__pyx_v_i2);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_mat);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_ww);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":577
 * 
 *     @Property
 *     def extraCount(self):             # <<<<<<<<<<<<<<
 *         if self._extraweights is None:
 *             return 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_47extraCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_47extraCount = {"extraCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_47extraCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_47extraCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extraCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_46extraCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_46extraCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("extraCount", 0);

  /* "metaphor/monal/driver/_driver.py":578
 *     @Property
 *     def extraCount(self):
 *         if self._extraweights is None:             # <<<<<<<<<<<<<<
 *             return 0
 *         return self._extraweights.shape[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":579
 *     def extraCount(self):
 *         if self._extraweights is None:
 *             return 0             # <<<<<<<<<<<<<<
 *         return self._extraweights.shape[0]
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":578
 *     @Property
 *     def extraCount(self):
 *         if self._extraweights is None:             # <<<<<<<<<<<<<<
 *             return 0
 *         return self._extraweights.shape[0]
 */
  }

  /* "metaphor/monal/driver/_driver.py":580
 *         if self._extraweights is None:
 *             return 0
 *         return self._extraweights.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":577
 * 
 *     @Property
 *     def extraCount(self):             # <<<<<<<<<<<<<<
 *         if self._extraweights is None:
 *             return 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.extraCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":583
 * 
 *     @Property
 *     def action(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._lastaction
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_49action(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_49action = {"action", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_49action, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_49action(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("action (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_48action(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_48action(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("action", 0);

  /* "metaphor/monal/driver/_driver.py":584
 *     @Property
 *     def action(self):  # DriverBase
 *         return self._lastaction             # <<<<<<<<<<<<<<
 * 
 *     @action.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lastaction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":583
 * 
 *     @Property
 *     def action(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._lastaction
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.action", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":587
 * 
 *     @action.setter
 *     def _setaction(self, value):  # DriverBase             # <<<<<<<<<<<<<<
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_51_setaction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_51_setaction = {"_setaction", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_51_setaction, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_51_setaction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_setaction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_setaction", 1, 2, 2, 1); __PYX_ERR(0, 587, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setaction") < 0)) __PYX_ERR(0, 587, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_setaction", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 587, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase._setaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_50_setaction(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_50_setaction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_setaction", 0);

  /* "metaphor/monal/driver/_driver.py":589
 *     def _setaction(self, value):  # DriverBase
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:             # <<<<<<<<<<<<<<
 *             self._lastaction = value
 *             self.getTransferResults()
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MA_CONFIDENCE_COMPUTATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":590
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:
 *             self._lastaction = value             # <<<<<<<<<<<<<<
 *             self.getTransferResults()
 *             return
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lastaction, __pyx_v_value) < 0) __PYX_ERR(0, 590, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":591
 *         if value == C.MA_CONFIDENCE_COMPUTATION:
 *             self._lastaction = value
 *             self.getTransferResults()             # <<<<<<<<<<<<<<
 *             return
 *         self._lastaction = None
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTransferResults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":592
 *             self._lastaction = value
 *             self.getTransferResults()
 *             return             # <<<<<<<<<<<<<<
 *         self._lastaction = None
 *         raise NotImplementedError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":589
 *     def _setaction(self, value):  # DriverBase
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:             # <<<<<<<<<<<<<<
 *             self._lastaction = value
 *             self.getTransferResults()
 */
  }

  /* "metaphor/monal/driver/_driver.py":593
 *             self.getTransferResults()
 *             return
 *         self._lastaction = None             # <<<<<<<<<<<<<<
 *         raise NotImplementedError()
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lastaction, Py_None) < 0) __PYX_ERR(0, 593, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":594
 *             return
 *         self._lastaction = None
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 594, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":587
 * 
 *     @action.setter
 *     def _setaction(self, value):  # DriverBase             # <<<<<<<<<<<<<<
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase._setaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":596
 *         raise NotImplementedError()
 * 
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_method);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_method);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_method);
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_False));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_53computeFromJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_53computeFromJacobian = {"computeFromJacobian", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_53computeFromJacobian, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_53computeFromJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_jacob = 0;
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_full = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeFromJacobian (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_jacob,&__pyx_n_s_method,&__pyx_n_s_full,0};
    PyObject* values[4] = {0,0,0,0};
    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_method;
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacob)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("computeFromJacobian", 0, 2, 4, 1); __PYX_ERR(0, 596, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_full);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeFromJacobian") < 0)) __PYX_ERR(0, 596, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_jacob = values[1];
    __pyx_v_method = values[2];
    __pyx_v_full = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeFromJacobian", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 596, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeFromJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_52computeFromJacobian(__pyx_self, __pyx_v_self, __pyx_v_jacob, __pyx_v_method, __pyx_v_full);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_52computeFromJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacob, PyObject *__pyx_v_method, PyObject *__pyx_v_full) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_halfDispersionMatrix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("computeFromJacobian", 0);

  /* "metaphor/monal/driver/_driver.py":597
 * 
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase
 *         res = sp.getSVDChildren(jacob, method=method)             # <<<<<<<<<<<<<<
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 *             self._determinant, self.eigval, self._rank = res
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getSVDChildren); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_jacob);
  __Pyx_GIVEREF(__pyx_v_jacob);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_jacob);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_method, __pyx_v_method) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_res = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":599
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 *             self._determinant, self.eigval, self._rank = res             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)
 *         if full:
 */
  if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
    PyObject* sequence = __pyx_v_res;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 7)) {
      if (size > 7) __Pyx_RaiseTooManyValuesError(7);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 598, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 4); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 5); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 6); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 4); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 5); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 6); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[7] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_1,&__pyx_t_2,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
      for (i=0; i < 7; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 598, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[7] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_1,&__pyx_t_2,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
    __pyx_t_8 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
    for (index=0; index < 7; index++) {
      PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 7) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
    __pyx_t_9 = NULL;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 598, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }

  /* "metaphor/monal/driver/_driver.py":598
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \             # <<<<<<<<<<<<<<
 *             self._determinant, self.eigval, self._rank = res
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)
 */
  __pyx_v_halfDispersionMatrix = __pyx_t_4;
  __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_leverages, __pyx_t_3) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_usageleverages, __pyx_t_1) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_correlMatrix, __pyx_t_2) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":599
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 *             self._determinant, self.eigval, self._rank = res             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)
 *         if full:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_determinant, __pyx_t_5) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eigval, __pyx_t_6) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rank, __pyx_t_7) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":600
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 *             self._determinant, self.eigval, self._rank = res
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)             # <<<<<<<<<<<<<<
 *         if full:
 *             return self._leverages, self._usageleverages
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_halfDispersionMatrix, __pyx_n_s_dot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_halfDispersionMatrix, __pyx_n_s_T); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_t_7) < 0) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":601
 *             self._determinant, self.eigval, self._rank = res
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)
 *         if full:             # <<<<<<<<<<<<<<
 *             return self._leverages, self._usageleverages
 *         return self._leverages
 */
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
  if (__pyx_t_10) {

    /* "metaphor/monal/driver/_driver.py":602
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)
 *         if full:
 *             return self._leverages, self._usageleverages             # <<<<<<<<<<<<<<
 *         return self._leverages
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_leverages); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_usageleverages); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":601
 *             self._determinant, self.eigval, self._rank = res
 *         self._dispersionMatrix = halfDispersionMatrix.dot(halfDispersionMatrix.T)
 *         if full:             # <<<<<<<<<<<<<<
 *             return self._leverages, self._usageleverages
 *         return self._leverages
 */
  }

  /* "metaphor/monal/driver/_driver.py":603
 *         if full:
 *             return self._leverages, self._usageleverages
 *         return self._leverages             # <<<<<<<<<<<<<<
 * 
 *     def computeUsageLeverages(self, params=None):# DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_leverages); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":596
 *         raise NotImplementedError()
 * 
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeFromJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_halfDispersionMatrix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":605
 *         return self._leverages
 * 
 *     def computeUsageLeverages(self, params=None):# DriverBase             # <<<<<<<<<<<<<<
 *         dispersion = self._dispersionMatrix
 *         levs = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_55computeUsageLeverages(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_55computeUsageLeverages = {"computeUsageLeverages", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_55computeUsageLeverages, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_55computeUsageLeverages(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_params = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeUsageLeverages (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_params,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_params);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeUsageLeverages") < 0)) __PYX_ERR(0, 605, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_params = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeUsageLeverages", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeUsageLeverages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_54computeUsageLeverages(__pyx_self, __pyx_v_self, __pyx_v_params);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_54computeUsageLeverages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params) {
  PyObject *__pyx_v_dispersion = NULL;
  PyObject *__pyx_v_levs = NULL;
  PyObject *__pyx_v_index = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_grad = NULL;
  PyObject *__pyx_v_lev = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("computeUsageLeverages", 0);

  /* "metaphor/monal/driver/_driver.py":606
 * 
 *     def computeUsageLeverages(self, params=None):# DriverBase
 *         dispersion = self._dispersionMatrix             # <<<<<<<<<<<<<<
 *         levs = []
 *         for index in range(self.dataCount):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dispersion = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":607
 *     def computeUsageLeverages(self, params=None):# DriverBase
 *         dispersion = self._dispersionMatrix
 *         levs = []             # <<<<<<<<<<<<<<
 *         for index in range(self.dataCount):
 *             _, grad = self.transfergradientindex(params=params, index=index)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_levs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":608
 *         dispersion = self._dispersionMatrix
 *         levs = []
 *         for index in range(self.dataCount):             # <<<<<<<<<<<<<<
 *             _, grad = self.transfergradientindex(params=params, index=index)
 *             lev = grad.T.dot(dispersion.dot(grad))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 608, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":609
 *         levs = []
 *         for index in range(self.dataCount):
 *             _, grad = self.transfergradientindex(params=params, index=index)             # <<<<<<<<<<<<<<
 *             lev = grad.T.dot(dispersion.dot(grad))
 *             levs.append(lev)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfergradientindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_params, __pyx_v_params) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index, __pyx_v_index) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 609, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 609, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_grad, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":610
 *         for index in range(self.dataCount):
 *             _, grad = self.transfergradientindex(params=params, index=index)
 *             lev = grad.T.dot(dispersion.dot(grad))             # <<<<<<<<<<<<<<
 *             levs.append(lev)
 *         return asarray(levs)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grad, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dispersion, __pyx_n_s_dot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_grad); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_grad};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_grad};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_INCREF(__pyx_v_grad);
        __Pyx_GIVEREF(__pyx_v_grad);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_grad);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_lev, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":611
 *             _, grad = self.transfergradientindex(params=params, index=index)
 *             lev = grad.T.dot(dispersion.dot(grad))
 *             levs.append(lev)             # <<<<<<<<<<<<<<
 *         return asarray(levs)
 * 
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_levs, __pyx_v_lev); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":608
 *         dispersion = self._dispersionMatrix
 *         levs = []
 *         for index in range(self.dataCount):             # <<<<<<<<<<<<<<
 *             _, grad = self.transfergradientindex(params=params, index=index)
 *             lev = grad.T.dot(dispersion.dot(grad))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":612
 *             lev = grad.T.dot(dispersion.dot(grad))
 *             levs.append(lev)
 *         return asarray(levs)             # <<<<<<<<<<<<<<
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_levs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_levs};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_levs};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_levs);
      __Pyx_GIVEREF(__pyx_v_levs);
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_levs);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":605
 *         return self._leverages
 * 
 *     def computeUsageLeverages(self, params=None):# DriverBase             # <<<<<<<<<<<<<<
 *         dispersion = self._dispersionMatrix
 *         levs = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeUsageLeverages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dispersion);
  __Pyx_XDECREF(__pyx_v_levs);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_grad);
  __Pyx_XDECREF(__pyx_v_lev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":614
 *         return asarray(levs)
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase             # <<<<<<<<<<<<<<
 *         if curw is None:
 *             curw = self.weights
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_57getTransferResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_57getTransferResults = {"getTransferResults", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_57getTransferResults, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_57getTransferResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_curw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTransferResults (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_curw,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_curw);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTransferResults") < 0)) __PYX_ERR(0, 614, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_curw = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTransferResults", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 614, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.getTransferResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_56getTransferResults(__pyx_self, __pyx_v_self, __pyx_v_curw);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_56getTransferResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_restable = NULL;
  PyObject *__pyx_v_leverages = NULL;
  PyObject *__pyx_v_targets = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getTransferResults", 0);
  __Pyx_INCREF(__pyx_v_curw);

  /* "metaphor/monal/driver/_driver.py":615
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase
 *         if curw is None:             # <<<<<<<<<<<<<<
 *             curw = self.weights
 *         out, jacob = self.getjacobian(curw, style=2)  #mainModule.
 */
  __pyx_t_1 = (__pyx_v_curw == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":616
 *     def getTransferResults(self, curw=None):  # DriverBase
 *         if curw is None:
 *             curw = self.weights             # <<<<<<<<<<<<<<
 *         out, jacob = self.getjacobian(curw, style=2)  #mainModule.
 *         restable = zeros((self.modelCount, 5*self.outputCount))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_curw, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":615
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase
 *         if curw is None:             # <<<<<<<<<<<<<<
 *             curw = self.weights
 *         out, jacob = self.getjacobian(curw, style=2)  #mainModule.
 */
  }

  /* "metaphor/monal/driver/_driver.py":617
 *         if curw is None:
 *             curw = self.weights
 *         out, jacob = self.getjacobian(curw, style=2)  #mainModule.             # <<<<<<<<<<<<<<
 *         restable = zeros((self.modelCount, 5*self.outputCount))
 *         leverages = self.computeFromJacobian(jacob, method=C.LEV_METHOD)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getjacobian); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_curw);
  __Pyx_GIVEREF(__pyx_v_curw);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_curw);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_style, __pyx_int_2) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
    PyObject* sequence = __pyx_t_6;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 617, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 617, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_out = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_jacob = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":618
 *             curw = self.weights
 *         out, jacob = self.getjacobian(curw, style=2)  #mainModule.
 *         restable = zeros((self.modelCount, 5*self.outputCount))             # <<<<<<<<<<<<<<
 *         leverages = self.computeFromJacobian(jacob, method=C.LEV_METHOD)
 *         targets = self.gettargets()  #mainModule.
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyNumber_Multiply(__pyx_int_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
  __pyx_t_5 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_restable = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":619
 *         out, jacob = self.getjacobian(curw, style=2)  #mainModule.
 *         restable = zeros((self.modelCount, 5*self.outputCount))
 *         leverages = self.computeFromJacobian(jacob, method=C.LEV_METHOD)             # <<<<<<<<<<<<<<
 *         targets = self.gettargets()  #mainModule.
 *         residuals = out - targets
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeFromJacobian); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_jacob);
  __Pyx_GIVEREF(__pyx_v_jacob);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_jacob);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LEV_METHOD); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_method, __pyx_t_8) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_leverages = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":620
 *         restable = zeros((self.modelCount, 5*self.outputCount))
 *         leverages = self.computeFromJacobian(jacob, method=C.LEV_METHOD)
 *         targets = self.gettargets()  #mainModule.             # <<<<<<<<<<<<<<
 *         residuals = out - targets
 *         restable[:, self.inputCount] = targets
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gettargets); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 620, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 620, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_targets = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":621
 *         leverages = self.computeFromJacobian(jacob, method=C.LEV_METHOD)
 *         targets = self.gettargets()  #mainModule.
 *         residuals = out - targets             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount] = targets
 *         restable[:, self.inputCount + self.outputCount] = out
 */
  __pyx_t_8 = PyNumber_Subtract(__pyx_v_out, __pyx_v_targets); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_residuals = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":622
 *         targets = self.gettargets()  #mainModule.
 *         residuals = out - targets
 *         restable[:, self.inputCount] = targets             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + self.outputCount] = out
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_slice__24);
  __Pyx_GIVEREF(__pyx_slice__24);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_slice__24);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
  __pyx_t_8 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_restable, __pyx_t_5, __pyx_v_targets) < 0)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":623
 *         residuals = out - targets
 *         restable[:, self.inputCount] = targets
 *         restable[:, self.inputCount + self.outputCount] = out             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_slice__25);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_restable, __pyx_t_8, __pyx_v_out) < 0)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":624
 *         restable[:, self.inputCount] = targets
 *         restable[:, self.inputCount + self.outputCount] = out
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Multiply(__pyx_int_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_slice__26);
  __Pyx_GIVEREF(__pyx_slice__26);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_slice__26);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_restable, __pyx_t_5, __pyx_v_leverages) < 0)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":625
 *         restable[:, self.inputCount + self.outputCount] = out
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2
 *         return restable, jacob
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_slice__27);
  __Pyx_GIVEREF(__pyx_slice__27);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_slice__27);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_restable, __pyx_t_8, __pyx_v_residuals) < 0)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":626
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2             # <<<<<<<<<<<<<<
 *         return restable, jacob
 * 
 */
  __pyx_t_8 = PyNumber_Power(__pyx_v_residuals, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Multiply(__pyx_int_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_slice__28);
  __Pyx_GIVEREF(__pyx_slice__28);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_slice__28);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_restable, __pyx_t_6, __pyx_t_8) < 0)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":627
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2
 *         return restable, jacob             # <<<<<<<<<<<<<<
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_restable);
  __Pyx_GIVEREF(__pyx_v_restable);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_restable);
  __Pyx_INCREF(__pyx_v_jacob);
  __Pyx_GIVEREF(__pyx_v_jacob);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_jacob);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":614
 *         return asarray(levs)
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase             # <<<<<<<<<<<<<<
 *         if curw is None:
 *             curw = self.weights
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.getTransferResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_restable);
  __Pyx_XDECREF(__pyx_v_leverages);
  __Pyx_XDECREF(__pyx_v_targets);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_v_curw);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":629
 *         return restable, jacob
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         if C.USE_INTEGRATED_LEVERAGE:
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_59computeTrainingResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_59computeTrainingResults = {"computeTrainingResults", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_59computeTrainingResults, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_59computeTrainingResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_curw = 0;
  PyObject *__pyx_v_restable = 0;
  PyObject *__pyx_v_outputs = 0;
  PyObject *__pyx_v_jacobians = 0;
  PyObject *__pyx_v_actualepochs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainingResults (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_curw,&__pyx_n_s_restable,&__pyx_n_s_outputs,&__pyx_n_s_jacobians,&__pyx_n_s_actualepochs,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_curw);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restable);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobians);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_actualepochs);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainingResults") < 0)) __PYX_ERR(0, 629, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_curw = values[1];
    __pyx_v_restable = values[2];
    __pyx_v_outputs = values[3];
    __pyx_v_jacobians = values[4];
    __pyx_v_actualepochs = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainingResults", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 629, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_58computeTrainingResults(__pyx_self, __pyx_v_self, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_58computeTrainingResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, PyObject *__pyx_v_jacobians, PyObject *__pyx_v_actualepochs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("computeTrainingResults", 0);

  /* "metaphor/monal/driver/_driver.py":630
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase
 *         if C.USE_INTEGRATED_LEVERAGE:             # <<<<<<<<<<<<<<
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 *         else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_USE_INTEGRATED_LEVERAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":631
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase
 *         if C.USE_INTEGRATED_LEVERAGE:
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)             # <<<<<<<<<<<<<<
 *         else:
 *             return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainingResultsIntegrated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_curw);
      __Pyx_GIVEREF(__pyx_v_curw);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_curw);
      __Pyx_INCREF(__pyx_v_restable);
      __Pyx_GIVEREF(__pyx_v_restable);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_restable);
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_outputs);
      __Pyx_INCREF(__pyx_v_jacobians);
      __Pyx_GIVEREF(__pyx_v_jacobians);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_jacobians);
      __Pyx_INCREF(__pyx_v_actualepochs);
      __Pyx_GIVEREF(__pyx_v_actualepochs);
      PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_actualepochs);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":630
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase
 *         if C.USE_INTEGRATED_LEVERAGE:             # <<<<<<<<<<<<<<
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 *         else:
 */
  }

  /* "metaphor/monal/driver/_driver.py":633
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 *         else:
 *             return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)             # <<<<<<<<<<<<<<
 * 
 *     def computeTrainingResultsIntegrated(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainingResultsOld); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_curw);
      __Pyx_GIVEREF(__pyx_v_curw);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_curw);
      __Pyx_INCREF(__pyx_v_restable);
      __Pyx_GIVEREF(__pyx_v_restable);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_restable);
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_outputs);
      __Pyx_INCREF(__pyx_v_jacobians);
      __Pyx_GIVEREF(__pyx_v_jacobians);
      PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_5, __pyx_v_jacobians);
      __Pyx_INCREF(__pyx_v_actualepochs);
      __Pyx_GIVEREF(__pyx_v_actualepochs);
      PyTuple_SET_ITEM(__pyx_t_4, 4+__pyx_t_5, __pyx_v_actualepochs);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":629
 *         return restable, jacob
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         if C.USE_INTEGRATED_LEVERAGE:
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":635
 *             return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 *     def computeTrainingResultsIntegrated(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_61computeTrainingResultsIntegrated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_61computeTrainingResultsIntegrated = {"computeTrainingResultsIntegrated", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_61computeTrainingResultsIntegrated, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_61computeTrainingResultsIntegrated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_curw = 0;
  PyObject *__pyx_v_restable = 0;
  PyObject *__pyx_v_outputs = 0;
  CYTHON_UNUSED PyObject *__pyx_v_jacobians = 0;
  PyObject *__pyx_v_actualepochs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainingResultsIntegrated (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_curw,&__pyx_n_s_restable,&__pyx_n_s_outputs,&__pyx_n_s_jacobians,&__pyx_n_s_actualepochs,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_curw);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restable);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobians);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_actualepochs);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainingResultsIntegrated") < 0)) __PYX_ERR(0, 635, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_curw = values[1];
    __pyx_v_restable = values[2];
    __pyx_v_outputs = values[3];
    __pyx_v_jacobians = values[4];
    __pyx_v_actualepochs = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainingResultsIntegrated", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 635, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResultsIntegrated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_60computeTrainingResultsIntegrated(__pyx_self, __pyx_v_self, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_60computeTrainingResultsIntegrated(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, CYTHON_UNUSED PyObject *__pyx_v_jacobians, PyObject *__pyx_v_actualepochs) {
  PyObject *__pyx_v_press = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_v_singular = NULL;
  PyObject *__pyx_v_leverages = NULL;
  PyObject *__pyx_v_deltash = NULL;
  PyObject *__pyx_v_cost = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_sing = NULL;
  PyObject *__pyx_v_results = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_q = NULL;
  PyObject *__pyx_v_correlflat = NULL;
  PyObject *__pyx_v_maxcorrel = NULL;
  PyObject *__pyx_v_meancorrel = NULL;
  PyObject *__pyx_v_maxindex = NULL;
  PyObject *__pyx_v_correl = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  __Pyx_RefNannySetupContext("computeTrainingResultsIntegrated", 0);
  __Pyx_INCREF(__pyx_v_outputs);

  /* "metaphor/monal/driver/_driver.py":638
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 *             self._rank, deltash = self.getPRESS(curw, donorm=True, root=True,             # <<<<<<<<<<<<<<
 *             full=True, trainstyle=0)
 *         cost = self.getCost(curw, trainstyle=0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getPRESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_curw);
  __Pyx_GIVEREF(__pyx_v_curw);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_curw);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_donorm, Py_True) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_root, Py_True) < 0) __PYX_ERR(0, 638, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":639
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 *             self._rank, deltash = self.getPRESS(curw, donorm=True, root=True,
 *             full=True, trainstyle=0)             # <<<<<<<<<<<<<<
 *         cost = self.getCost(curw, trainstyle=0)
 *         self.determinant = 1
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_full, Py_True) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_trainstyle, __pyx_int_0) < 0) __PYX_ERR(0, 638, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":638
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 *             self._rank, deltash = self.getPRESS(curw, donorm=True, root=True,             # <<<<<<<<<<<<<<
 *             full=True, trainstyle=0)
 *         cost = self.getCost(curw, trainstyle=0)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 7)) {
      if (size > 7) __Pyx_RaiseTooManyValuesError(7);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 637, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 4); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 5); 
      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 6); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 4); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 5); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 6); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[7] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_1,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
      for (i=0; i < 7; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 637, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[7] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_1,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8};
    __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
    for (index=0; index < 7; index++) {
      PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 7) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 637, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }

  /* "metaphor/monal/driver/_driver.py":637
 *     def computeTrainingResultsIntegrated(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \             # <<<<<<<<<<<<<<
 *             self._rank, deltash = self.getPRESS(curw, donorm=True, root=True,
 *             full=True, trainstyle=0)
 */
  __pyx_v_press = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_residuals = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_singular = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_leverages = __pyx_t_5;
  __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_t_6) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":638
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 *             self._rank, deltash = self.getPRESS(curw, donorm=True, root=True,             # <<<<<<<<<<<<<<
 *             full=True, trainstyle=0)
 *         cost = self.getCost(curw, trainstyle=0)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rank, __pyx_t_7) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_deltash = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":640
 *             self._rank, deltash = self.getPRESS(curw, donorm=True, root=True,
 *             full=True, trainstyle=0)
 *         cost = self.getCost(curw, trainstyle=0)             # <<<<<<<<<<<<<<
 *         self.determinant = 1
 *         self.eigval = zeros((self.paramCount,))
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getCost); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_curw);
  __Pyx_GIVEREF(__pyx_v_curw);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_curw);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_trainstyle, __pyx_int_0) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cost = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":641
 *             full=True, trainstyle=0)
 *         cost = self.getCost(curw, trainstyle=0)
 *         self.determinant = 1             # <<<<<<<<<<<<<<
 *         self.eigval = zeros((self.paramCount,))
 *         for ind, sing in enumerate(singular):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_determinant_2, __pyx_int_1) < 0) __PYX_ERR(0, 641, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":642
 *         cost = self.getCost(curw, trainstyle=0)
 *         self.determinant = 1
 *         self.eigval = zeros((self.paramCount,))             # <<<<<<<<<<<<<<
 *         for ind, sing in enumerate(singular):
 *             if sing:
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eigval, __pyx_t_6) < 0) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":643
 *         self.determinant = 1
 *         self.eigval = zeros((self.paramCount,))
 *         for ind, sing in enumerate(singular):             # <<<<<<<<<<<<<<
 *             if sing:
 *                 self.eigval[ind] = sing**-2
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_6 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_singular)) || PyTuple_CheckExact(__pyx_v_singular)) {
    __pyx_t_7 = __pyx_v_singular; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0;
    __pyx_t_12 = NULL;
  } else {
    __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_singular); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 643, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_12)) {
      if (likely(PyList_CheckExact(__pyx_t_7))) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_12(__pyx_t_7);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 643, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_sing, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":644
 *         self.eigval = zeros((self.paramCount,))
 *         for ind, sing in enumerate(singular):
 *             if sing:             # <<<<<<<<<<<<<<
 *                 self.eigval[ind] = sing**-2
 *                 self.determinant *= sing
 */
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_sing); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 644, __pyx_L1_error)
    if (__pyx_t_13) {

      /* "metaphor/monal/driver/_driver.py":645
 *         for ind, sing in enumerate(singular):
 *             if sing:
 *                 self.eigval[ind] = sing**-2             # <<<<<<<<<<<<<<
 *                 self.determinant *= sing
 *             else:
 */
      __pyx_t_5 = PyNumber_Power(__pyx_v_sing, __pyx_int_neg_2, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eigval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_ind, __pyx_t_5) < 0)) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":646
 *             if sing:
 *                 self.eigval[ind] = sing**-2
 *                 self.determinant *= sing             # <<<<<<<<<<<<<<
 *             else:
 *                 self.eigval[ind] = NaN
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_determinant_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_t_5, __pyx_v_sing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_determinant_2, __pyx_t_4) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":644
 *         self.eigval = zeros((self.paramCount,))
 *         for ind, sing in enumerate(singular):
 *             if sing:             # <<<<<<<<<<<<<<
 *                 self.eigval[ind] = sing**-2
 *                 self.determinant *= sing
 */
      goto __pyx_L7;
    }

    /* "metaphor/monal/driver/_driver.py":648
 *                 self.determinant *= sing
 *             else:
 *                 self.eigval[ind] = NaN             # <<<<<<<<<<<<<<
 * 
 *         #self.determinant = prod(singular)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eigval); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_ind, __pyx_t_4) < 0)) __PYX_ERR(0, 648, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L7:;

    /* "metaphor/monal/driver/_driver.py":643
 *         self.determinant = 1
 *         self.eigval = zeros((self.paramCount,))
 *         for ind, sing in enumerate(singular):             # <<<<<<<<<<<<<<
 *             if sing:
 *                 self.eigval[ind] = sing**-2
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":652
 *         #self.determinant = prod(singular)
 *         #self.eigval = singular**-2
 *         outputs = residuals + self.targets if outputs is None else outputs             # <<<<<<<<<<<<<<
 *         self._correlMatrix = sp.getCorrelFromDispersion(self._dispersionMatrix)
 *         self.confidenceLevel = 0.95
 */
  __pyx_t_13 = (__pyx_v_outputs == Py_None);
  if ((__pyx_t_13 != 0)) {
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_targets); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = PyNumber_Add(__pyx_v_residuals, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_outputs);
    __pyx_t_6 = __pyx_v_outputs;
  }
  __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":653
 *         #self.eigval = singular**-2
 *         outputs = residuals + self.targets if outputs is None else outputs
 *         self._correlMatrix = sp.getCorrelFromDispersion(self._dispersionMatrix)             # <<<<<<<<<<<<<<
 *         self.confidenceLevel = 0.95
 *         #results = target if target is not None else zeros((C.TCR_COUNT,))
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getCorrelFromDispersion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_correlMatrix, __pyx_t_6) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":654
 *         outputs = residuals + self.targets if outputs is None else outputs
 *         self._correlMatrix = sp.getCorrelFromDispersion(self._dispersionMatrix)
 *         self.confidenceLevel = 0.95             # <<<<<<<<<<<<<<
 *         #results = target if target is not None else zeros((C.TCR_COUNT,))
 *         results = zeros((C.TCR_COUNT,))
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_confidenceLevel, __pyx_float_0_95) < 0) __PYX_ERR(0, 654, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":656
 *         self.confidenceLevel = 0.95
 *         #results = target if target is not None else zeros((C.TCR_COUNT,))
 *         results = zeros((C.TCR_COUNT,))             # <<<<<<<<<<<<<<
 *         N = self._baselen = self.dataCount
 *         q = self.paramCount
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_results = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":657
 *         #results = target if target is not None else zeros((C.TCR_COUNT,))
 *         results = zeros((C.TCR_COUNT,))
 *         N = self._baselen = self.dataCount             # <<<<<<<<<<<<<<
 *         q = self.paramCount
 *         if N > q:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_v_N = __pyx_t_6;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2, __pyx_t_6) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":658
 *         results = zeros((C.TCR_COUNT,))
 *         N = self._baselen = self.dataCount
 *         q = self.paramCount             # <<<<<<<<<<<<<<
 *         if N > q:
 *             self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_q = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":659
 *         N = self._baselen = self.dataCount
 *         q = self.paramCount
 *         if N > q:             # <<<<<<<<<<<<<<
 *             self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)
 * 
 */
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_N, __pyx_v_q, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_13) {

    /* "metaphor/monal/driver/_driver.py":660
 *         q = self.paramCount
 *         if N > q:
 *             self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)             # <<<<<<<<<<<<<<
 * 
 *         correlflat = absolute(self._correlMatrix.flat)
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_InverseStudent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_confidenceLevel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyNumber_Subtract(__pyx_v_N, __pyx_v_q); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = NULL;
    __pyx_t_14 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_14 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_t_8);
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable, __pyx_t_6) < 0) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":659
 *         N = self._baselen = self.dataCount
 *         q = self.paramCount
 *         if N > q:             # <<<<<<<<<<<<<<
 *             self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)
 * 
 */
  }

  /* "metaphor/monal/driver/_driver.py":662
 *             self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)
 * 
 *         correlflat = absolute(self._correlMatrix.flat)             # <<<<<<<<<<<<<<
 *         maxcorrel = max(correlflat)
 *         meancorrel = npsum(correlflat)/(q*q)
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_absolute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_correlMatrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 662, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_correlflat = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":663
 * 
 *         correlflat = absolute(self._correlMatrix.flat)
 *         maxcorrel = max(correlflat)             # <<<<<<<<<<<<<<
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax()
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_correlflat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_maxcorrel = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":664
 *         correlflat = absolute(self._correlMatrix.flat)
 *         maxcorrel = max(correlflat)
 *         meancorrel = npsum(correlflat)/(q*q)             # <<<<<<<<<<<<<<
 *         maxindex = correlflat.argmax()
 *         try:
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_correlflat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_correlflat};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_correlflat};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_correlflat);
      __Pyx_GIVEREF(__pyx_v_correlflat);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_correlflat);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Multiply(__pyx_v_q, __pyx_v_q); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_meancorrel = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":665
 *         maxcorrel = max(correlflat)
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax()             # <<<<<<<<<<<<<<
 *         try:
 *             maxindex = maxindex[0][0]
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_correlflat, __pyx_n_s_argmax); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 665, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_maxindex = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":666
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax()
 *         try:             # <<<<<<<<<<<<<<
 *             maxindex = maxindex[0][0]
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":667
 *         maxindex = correlflat.argmax()
 *         try:
 *             maxindex = maxindex[0][0]             # <<<<<<<<<<<<<<
 *         except:
 *             try:
 */
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_maxindex, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 667, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_maxindex, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":666
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax()
 *         try:             # <<<<<<<<<<<<<<
 *             maxindex = maxindex[0][0]
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    goto __pyx_L14_try_end;
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":668
 *         try:
 *             maxindex = maxindex[0][0]
 *         except:             # <<<<<<<<<<<<<<
 *             try:
 *                 maxindex = maxindex[0]
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResultsIntegrated", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 668, __pyx_L11_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/monal/driver/_driver.py":669
 *             maxindex = maxindex[0][0]
 *         except:
 *             try:             # <<<<<<<<<<<<<<
 *                 maxindex = maxindex[0]
 *             except: pass
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
        __Pyx_XGOTREF(__pyx_t_18);
        __Pyx_XGOTREF(__pyx_t_19);
        __Pyx_XGOTREF(__pyx_t_20);
        /*try:*/ {

          /* "metaphor/monal/driver/_driver.py":670
 *         except:
 *             try:
 *                 maxindex = maxindex[0]             # <<<<<<<<<<<<<<
 *             except: pass
 *         #leverageUsages = self.computeUsageLeverages(curw)
 */
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_maxindex, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_maxindex, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":669
 *             maxindex = maxindex[0][0]
 *         except:
 *             try:             # <<<<<<<<<<<<<<
 *                 maxindex = maxindex[0]
 *             except: pass
 */
        }
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
        goto __pyx_L24_try_end;
        __pyx_L17_error:;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "metaphor/monal/driver/_driver.py":671
 *             try:
 *                 maxindex = maxindex[0]
 *             except: pass             # <<<<<<<<<<<<<<
 *         #leverageUsages = self.computeUsageLeverages(curw)
 *         correl = corrcoef(outputs, self.gettargets())[0,1]
 */
        /*except:*/ {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L18_exception_handled;
        }
        __pyx_L18_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
        __pyx_L24_try_end:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L10_exception_handled;
    }
    __pyx_L11_except_error:;

    /* "metaphor/monal/driver/_driver.py":666
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax()
 *         try:             # <<<<<<<<<<<<<<
 *             maxindex = maxindex[0][0]
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
    goto __pyx_L1_error;
    __pyx_L10_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
    __pyx_L14_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":673
 *             except: pass
 *         #leverageUsages = self.computeUsageLeverages(curw)
 *         correl = corrcoef(outputs, self.gettargets())[0,1]             # <<<<<<<<<<<<<<
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_corrcoef); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gettargets); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_14 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_14 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_outputs, __pyx_t_5};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_outputs, __pyx_t_5};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__29); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_correl = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":675
 *         correl = corrcoef(outputs, self.gettargets())[0,1]
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)             # <<<<<<<<<<<<<<
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))
 *         results[C.TCR_R2] = correl*correl
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_v_cost, __pyx_v_N); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_8);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_COST); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_7, __pyx_t_8) < 0)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":676
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))             # <<<<<<<<<<<<<<
 *         results[C.TCR_R2] = correl*correl
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyNumber_Subtract(__pyx_v_N, __pyx_v_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_v_cost, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_8);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_STD_DEV_BIAS_LESS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_t_8) < 0)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":677
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))
 *         results[C.TCR_R2] = correl*correl             # <<<<<<<<<<<<<<
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 *         results[C.TCR_CORREL] = correl
 */
  __pyx_t_8 = PyNumber_Multiply(__pyx_v_correl, __pyx_v_correl); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_R2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_1, __pyx_t_8) < 0)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":678
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))
 *         results[C.TCR_R2] = correl*correl
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL] = correl
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 */
  __pyx_t_8 = PyNumber_Multiply(__pyx_v_correl, __pyx_v_N); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_N, __pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_R2_ADJUST); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_8, __pyx_t_5) < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":679
 *         results[C.TCR_R2] = correl*correl
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 *         results[C.TCR_CORREL] = correl             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_CORREL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_8, __pyx_v_correl) < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":680
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 *         results[C.TCR_CORREL] = correl
 *         results[C.TCR_CORREL_MAX] = maxcorrel             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_CORREL_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_v_maxcorrel) < 0)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":681
 *         results[C.TCR_CORREL] = correl
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 *         results[C.TCR_CORREL_MEAN] = meancorrel             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 *         results[C.TCR_HIDDEN] = self.hidden
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_CORREL_MEAN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_8, __pyx_v_meancorrel) < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":682
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex             # <<<<<<<<<<<<<<
 *         results[C.TCR_HIDDEN] = self.hidden
 *         results[C.TCR_EPOCHS] = actualepochs if actualepochs >= 0 else self.actualepochs
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_CORREL_MAX_ADDR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_v_maxindex) < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":683
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 *         results[C.TCR_HIDDEN] = self.hidden             # <<<<<<<<<<<<<<
 *         results[C.TCR_EPOCHS] = actualepochs if actualepochs >= 0 else self.actualepochs
 *         delta = q - self.rank
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hidden); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_HIDDEN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_1, __pyx_t_5) < 0)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":684
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 *         results[C.TCR_HIDDEN] = self.hidden
 *         results[C.TCR_EPOCHS] = actualepochs if actualepochs >= 0 else self.actualepochs             # <<<<<<<<<<<<<<
 *         delta = q - self.rank
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_actualepochs, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_13) {
    __Pyx_INCREF(__pyx_v_actualepochs);
    __pyx_t_5 = __pyx_v_actualepochs;
  } else {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_actualepochs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_EPOCHS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_8, __pyx_t_5) < 0)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":685
 *         results[C.TCR_HIDDEN] = self.hidden
 *         results[C.TCR_EPOCHS] = actualepochs if actualepochs >= 0 else self.actualepochs
 *         delta = q - self.rank             # <<<<<<<<<<<<<<
 * 
 *         if 0 <= delta < q:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rank_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyNumber_Subtract(__pyx_v_q, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_delta = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":687
 *         delta = q - self.rank
 * 
 *         if 0 <= delta < q:             # <<<<<<<<<<<<<<
 *             #if leverageUsages is not None:
 *             #    test = leverageUsages - leverages
 */
  __pyx_t_8 = PyObject_RichCompare(__pyx_int_0, __pyx_v_delta, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_8)) {
    __Pyx_DECREF(__pyx_t_8);
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_delta, __pyx_v_q, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_13) {

    /* "metaphor/monal/driver/_driver.py":690
 *             #if leverageUsages is not None:
 *             #    test = leverageUsages - leverages
 *             results[C.TCR_SHII]  = deltash  #math.fsum(test)             # <<<<<<<<<<<<<<
 *             results[C.TCR_PRESS] = press
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_SHII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_v_deltash) < 0)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":691
 *             #    test = leverageUsages - leverages
 *             results[C.TCR_SHII]  = deltash  #math.fsum(test)
 *             results[C.TCR_PRESS] = press             # <<<<<<<<<<<<<<
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 *             results[C.TCR_DELTA_RANK] = delta
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_PRESS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_8, __pyx_v_press) < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":692
 *             results[C.TCR_SHII]  = deltash  #math.fsum(test)
 *             results[C.TCR_PRESS] = press
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N             # <<<<<<<<<<<<<<
 *             results[C.TCR_DELTA_RANK] = delta
 *             results[C.TCR_DETERMINANT] = self.determinant
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fsum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyNumber_Multiply(__pyx_v_leverages, __pyx_v_N); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_v_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_MU); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":693
 *             results[C.TCR_PRESS] = press
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 *             results[C.TCR_DELTA_RANK] = delta             # <<<<<<<<<<<<<<
 *             results[C.TCR_DETERMINANT] = self.determinant
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_DELTA_RANK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_2, __pyx_v_delta) < 0)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":694
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 *             results[C.TCR_DELTA_RANK] = delta
 *             results[C.TCR_DETERMINANT] = self.determinant             # <<<<<<<<<<<<<<
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_determinant_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_DETERMINANT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_8, __pyx_t_2) < 0)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":695
 *             results[C.TCR_DELTA_RANK] = delta
 *             results[C.TCR_DETERMINANT] = self.determinant
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)             # <<<<<<<<<<<<<<
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eigval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TCR_EIGEN_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_1, __pyx_t_8) < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":696
 *             results[C.TCR_DETERMINANT] = self.determinant
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)             # <<<<<<<<<<<<<<
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eigval); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCR_EIGEN_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":697
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]             # <<<<<<<<<<<<<<
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)
 * 
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_EIGEN_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_results, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TCR_EIGEN_MIN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_results, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TCR_CONDITIONNING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_1, __pyx_t_8) < 0)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":698
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)             # <<<<<<<<<<<<<<
 * 
 *         if restable is None:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_6, __pyx_t_8) < 0)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":687
 *         delta = q - self.rank
 * 
 *         if 0 <= delta < q:             # <<<<<<<<<<<<<<
 *             #if leverageUsages is not None:
 *             #    test = leverageUsages - leverages
 */
  }

  /* "metaphor/monal/driver/_driver.py":700
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)
 * 
 *         if restable is None:             # <<<<<<<<<<<<<<
 *             return results
 *         return results, restable
 */
  __pyx_t_13 = (__pyx_v_restable == Py_None);
  __pyx_t_21 = (__pyx_t_13 != 0);
  if (__pyx_t_21) {

    /* "metaphor/monal/driver/_driver.py":701
 * 
 *         if restable is None:
 *             return results             # <<<<<<<<<<<<<<
 *         return results, restable
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_results);
    __pyx_r = __pyx_v_results;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":700
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)
 * 
 *         if restable is None:             # <<<<<<<<<<<<<<
 *             return results
 *         return results, restable
 */
  }

  /* "metaphor/monal/driver/_driver.py":702
 *         if restable is None:
 *             return results
 *         return results, restable             # <<<<<<<<<<<<<<
 * 
 * #     def computeTrainingResultsFrom(self, residuals=None, jacobians=None, leverages=None, cost=0, press=0, singular=None, deltash=0):  #dispersionMat=None,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_results);
  __Pyx_GIVEREF(__pyx_v_results);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_results);
  __Pyx_INCREF(__pyx_v_restable);
  __Pyx_GIVEREF(__pyx_v_restable);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_restable);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":635
 *             return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 *     def computeTrainingResultsIntegrated(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResultsIntegrated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_press);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_v_singular);
  __Pyx_XDECREF(__pyx_v_leverages);
  __Pyx_XDECREF(__pyx_v_deltash);
  __Pyx_XDECREF(__pyx_v_cost);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_sing);
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_q);
  __Pyx_XDECREF(__pyx_v_correlflat);
  __Pyx_XDECREF(__pyx_v_maxcorrel);
  __Pyx_XDECREF(__pyx_v_meancorrel);
  __Pyx_XDECREF(__pyx_v_maxindex);
  __Pyx_XDECREF(__pyx_v_correl);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":773
 * #         return results
 * 
 *     def computeTrainingResultsOld(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode externe
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_63computeTrainingResultsOld(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_63computeTrainingResultsOld = {"computeTrainingResultsOld", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_63computeTrainingResultsOld, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_63computeTrainingResultsOld(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_curw = 0;
  PyObject *__pyx_v_restable = 0;
  PyObject *__pyx_v_outputs = 0;
  PyObject *__pyx_v_jacobians = 0;
  CYTHON_UNUSED PyObject *__pyx_v_actualepochs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainingResultsOld (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_curw,&__pyx_n_s_restable,&__pyx_n_s_outputs,&__pyx_n_s_jacobians,&__pyx_n_s_actualepochs,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_curw);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restable);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobians);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_actualepochs);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainingResultsOld") < 0)) __PYX_ERR(0, 773, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_curw = values[1];
    __pyx_v_restable = values[2];
    __pyx_v_outputs = values[3];
    __pyx_v_jacobians = values[4];
    __pyx_v_actualepochs = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainingResultsOld", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 773, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResultsOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_62computeTrainingResultsOld(__pyx_self, __pyx_v_self, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_62computeTrainingResultsOld(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, PyObject *__pyx_v_jacobians, CYTHON_UNUSED PyObject *__pyx_v_actualepochs) {
  PyObject *__pyx_v_results = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_leverages = NULL;
  PyObject *__pyx_v_leverageUsages = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_q = NULL;
  PyObject *__pyx_v_cost = NULL;
  PyObject *__pyx_v_vec = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_lev = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_press = NULL;
  PyObject *__pyx_v_correlflat = NULL;
  PyObject *__pyx_v_maxcorrel = NULL;
  PyObject *__pyx_v_meancorrel = NULL;
  PyObject *__pyx_v_maxindex = NULL;
  PyObject *__pyx_v_correl = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_RefNannySetupContext("computeTrainingResultsOld", 0);
  __Pyx_INCREF(__pyx_v_outputs);

  /* "metaphor/monal/driver/_driver.py":780
 *         #if (curw is not None) and (outputs is None):
 *         #    outputs = self.transfer(curw)
 *         outputs = outputs if outputs is not None else self._outputs             # <<<<<<<<<<<<<<
 *         self.confidenceLevel = 0.95
 *         results = zeros((C.TCR_COUNT,))
 */
  __pyx_t_2 = (__pyx_v_outputs != Py_None);
  if ((__pyx_t_2 != 0)) {
    __Pyx_INCREF(__pyx_v_outputs);
    __pyx_t_1 = __pyx_v_outputs;
  } else {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputs_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":781
 *         #    outputs = self.transfer(curw)
 *         outputs = outputs if outputs is not None else self._outputs
 *         self.confidenceLevel = 0.95             # <<<<<<<<<<<<<<
 *         results = zeros((C.TCR_COUNT,))
 *         #residuals = self.getlastresiduals(curw, outputs)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_confidenceLevel, __pyx_float_0_95) < 0) __PYX_ERR(0, 781, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":782
 *         outputs = outputs if outputs is not None else self._outputs
 *         self.confidenceLevel = 0.95
 *         results = zeros((C.TCR_COUNT,))             # <<<<<<<<<<<<<<
 *         #residuals = self.getlastresiduals(curw, outputs)
 *         residuals = self.getresiduals(curw)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TCR_COUNT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_results = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":784
 *         results = zeros((C.TCR_COUNT,))
 *         #residuals = self.getlastresiduals(curw, outputs)
 *         residuals = self.getresiduals(curw)             # <<<<<<<<<<<<<<
 *         jacob = jacobians if jacobians is not None else self._jacobians
 *         leverages, leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_METHOD, full=True)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getresiduals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_curw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_curw};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_curw};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v_curw);
      __Pyx_GIVEREF(__pyx_v_curw);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_curw);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_residuals = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":785
 *         #residuals = self.getlastresiduals(curw, outputs)
 *         residuals = self.getresiduals(curw)
 *         jacob = jacobians if jacobians is not None else self._jacobians             # <<<<<<<<<<<<<<
 *         leverages, leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_METHOD, full=True)
 *         #leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_LATE)
 */
  __pyx_t_2 = (__pyx_v_jacobians != Py_None);
  if ((__pyx_t_2 != 0)) {
    __Pyx_INCREF(__pyx_v_jacobians);
    __pyx_t_1 = __pyx_v_jacobians;
  } else {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_jacob = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":786
 *         residuals = self.getresiduals(curw)
 *         jacob = jacobians if jacobians is not None else self._jacobians
 *         leverages, leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_METHOD, full=True)             # <<<<<<<<<<<<<<
 *         #leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_LATE)
 *         N, q = jacob.shape
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeFromJacobian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_jacob);
  __Pyx_GIVEREF(__pyx_v_jacob);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_jacob);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_LEV_METHOD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_method, __pyx_t_5) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_full, Py_True) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 786, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
    index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 2) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 786, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_leverages = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_leverageUsages = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":788
 *         leverages, leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_METHOD, full=True)
 *         #leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_LATE)
 *         N, q = jacob.shape             # <<<<<<<<<<<<<<
 *         self._baselen = N
 *         #self._f reedom = N - q
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_jacob, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 788, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 2) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 788, __pyx_L1_error)
    __pyx_L6_unpacking_done:;
  }
  __pyx_v_N = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_q = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":789
 *         #leverageUsages = self.computeFromJacobian(jacob, method=C.LEV_LATE)
 *         N, q = jacob.shape
 *         self._baselen = N             # <<<<<<<<<<<<<<
 *         #self._f reedom = N - q
 *         self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2, __pyx_v_N) < 0) __PYX_ERR(0, 789, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":791
 *         self._baselen = N
 *         #self._f reedom = N - q
 *         self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)             # <<<<<<<<<<<<<<
 * 
 *         cost = math.fsum(residuals**2)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InverseStudent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_confidenceLevel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_N, __pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable, __pyx_t_5) < 0) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":793
 *         self._studentvariable = mtb.InverseStudent(self.confidenceLevel, N-q)
 * 
 *         cost = math.fsum(residuals**2)             # <<<<<<<<<<<<<<
 *         vec = zeros((N,))
 *         for ind, (res, lev) in enumerate(zip(residuals, leverages)):
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fsum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Power(__pyx_v_residuals, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_cost = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":794
 * 
 *         cost = math.fsum(residuals**2)
 *         vec = zeros((N,))             # <<<<<<<<<<<<<<
 *         for ind, (res, lev) in enumerate(zip(residuals, leverages)):
 *             #if (1 - lev) < 1E-3*q/N:
 */
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_N);
  __Pyx_GIVEREF(__pyx_v_N);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_N);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_vec = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":795
 *         cost = math.fsum(residuals**2)
 *         vec = zeros((N,))
 *         for ind, (res, lev) in enumerate(zip(residuals, leverages)):             # <<<<<<<<<<<<<<
 *             #if (1 - lev) < 1E-3*q/N:
 *             #    lev = q/N
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_5 = __pyx_int_0;
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_residuals);
  __Pyx_GIVEREF(__pyx_v_residuals);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_residuals);
  __Pyx_INCREF(__pyx_v_leverages);
  __Pyx_GIVEREF(__pyx_v_leverages);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_leverages);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_9))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_11(__pyx_t_9);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 795, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 795, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 795, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 795, __pyx_L1_error)
      __pyx_L10_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_lev, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_5);
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5);
    __pyx_t_5 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":798
 *             #if (1 - lev) < 1E-3*q/N:
 *             #    lev = q/N
 *             val = res/(1 - lev)             # <<<<<<<<<<<<<<
 *             vec[ind] = val*val
 *         press = math.sqrt(math.fsum(vec)/N)
 */
    __pyx_t_1 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_v_lev, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_res, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":799
 *             #    lev = q/N
 *             val = res/(1 - lev)
 *             vec[ind] = val*val             # <<<<<<<<<<<<<<
 *         press = math.sqrt(math.fsum(vec)/N)
 *         #vec = (residuals/(1 - leverages))**2
 */
    __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyObject_SetItem(__pyx_v_vec, __pyx_v_ind, __pyx_t_3) < 0)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":795
 *         cost = math.fsum(residuals**2)
 *         vec = zeros((N,))
 *         for ind, (res, lev) in enumerate(zip(residuals, leverages)):             # <<<<<<<<<<<<<<
 *             #if (1 - lev) < 1E-3*q/N:
 *             #    lev = q/N
 */
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":800
 *             val = res/(1 - lev)
 *             vec[ind] = val*val
 *         press = math.sqrt(math.fsum(vec)/N)             # <<<<<<<<<<<<<<
 *         #vec = (residuals/(1 - leverages))**2
 *         #vecs ort = np .s ort(vec)
 */
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fsum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_vec); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_vec};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_9);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_vec};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_9);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_INCREF(__pyx_v_vec);
      __Pyx_GIVEREF(__pyx_v_vec);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_vec);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_9, __pyx_v_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_press = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":806
 *         #press3 = self.getPRESS_(curw, donorm=True, root=True)
 *         #press2 = self.getPRESS(curw, donorm=True, root=True)
 *         correlflat = absolute(self._correlMatrix.flat)   #list(abs(x) for x in self._correlMatrix.flat)             # <<<<<<<<<<<<<<
 *         maxcorrel = max(correlflat)
 *         meancorrel = npsum(correlflat)/(q*q)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_absolute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_correlMatrix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_correlflat = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":807
 *         #press2 = self.getPRESS(curw, donorm=True, root=True)
 *         correlflat = absolute(self._correlMatrix.flat)   #list(abs(x) for x in self._correlMatrix.flat)
 *         maxcorrel = max(correlflat)             # <<<<<<<<<<<<<<
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_correlflat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_maxcorrel = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":808
 *         correlflat = absolute(self._correlMatrix.flat)   #list(abs(x) for x in self._correlMatrix.flat)
 *         maxcorrel = max(correlflat)
 *         meancorrel = npsum(correlflat)/(q*q)             # <<<<<<<<<<<<<<
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)
 *         try:
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_correlflat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_correlflat};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_correlflat};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_INCREF(__pyx_v_correlflat);
      __Pyx_GIVEREF(__pyx_v_correlflat);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_correlflat);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_q, __pyx_v_q); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_meancorrel = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":809
 *         maxcorrel = max(correlflat)
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)             # <<<<<<<<<<<<<<
 *         try:
 *             maxindex = maxindex[0][0]
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_correlflat, __pyx_n_s_argmax); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 809, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 809, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_maxindex = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":810
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)
 *         try:             # <<<<<<<<<<<<<<
 *             maxindex = maxindex[0][0]
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":811
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)
 *         try:
 *             maxindex = maxindex[0][0]             # <<<<<<<<<<<<<<
 *         except:
 *             try:
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_maxindex, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_maxindex, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":810
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)
 *         try:             # <<<<<<<<<<<<<<
 *             maxindex = maxindex[0][0]
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    goto __pyx_L16_try_end;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":812
 *         try:
 *             maxindex = maxindex[0][0]
 *         except:             # <<<<<<<<<<<<<<
 *             try:
 *                 maxindex = maxindex[0]
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResultsOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 812, __pyx_L13_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);

      /* "metaphor/monal/driver/_driver.py":813
 *             maxindex = maxindex[0][0]
 *         except:
 *             try:             # <<<<<<<<<<<<<<
 *                 maxindex = maxindex[0]
 *             except: pass
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_16);
        __Pyx_XGOTREF(__pyx_t_17);
        /*try:*/ {

          /* "metaphor/monal/driver/_driver.py":814
 *         except:
 *             try:
 *                 maxindex = maxindex[0]             # <<<<<<<<<<<<<<
 *             except: pass
 *         #leverageUsages = None
 */
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_maxindex, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 814, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF_SET(__pyx_v_maxindex, __pyx_t_9);
          __pyx_t_9 = 0;

          /* "metaphor/monal/driver/_driver.py":813
 *             maxindex = maxindex[0][0]
 *         except:
 *             try:             # <<<<<<<<<<<<<<
 *                 maxindex = maxindex[0]
 *             except: pass
 */
        }
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        goto __pyx_L26_try_end;
        __pyx_L19_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":815
 *             try:
 *                 maxindex = maxindex[0]
 *             except: pass             # <<<<<<<<<<<<<<
 *         #leverageUsages = None
 * #         try:
 */
        /*except:*/ {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L20_exception_handled;
        }
        __pyx_L20_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
        __pyx_L26_try_end:;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L12_exception_handled;
    }
    __pyx_L13_except_error:;

    /* "metaphor/monal/driver/_driver.py":810
 *         meancorrel = npsum(correlflat)/(q*q)
 *         maxindex = correlflat.argmax() #np .where(correlflat==maxcorrel)
 *         try:             # <<<<<<<<<<<<<<
 *             maxindex = maxindex[0][0]
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
    goto __pyx_L1_error;
    __pyx_L12_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
    __pyx_L16_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":829
 * 
 *         #correlflat.index(maxcorrel)
 *         correl = corrcoef(outputs, self.gettargets())[0,1]             # <<<<<<<<<<<<<<
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_corrcoef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gettargets); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_outputs, __pyx_t_3};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_outputs, __pyx_t_3};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_tuple__30); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_correl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":831
 *         correl = corrcoef(outputs, self.gettargets())[0,1]
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)             # <<<<<<<<<<<<<<
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))
 *         results[C.TCR_R2] = correl*correl
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_cost, __pyx_v_N); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TCR_COST); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_9, __pyx_t_4) < 0)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":832
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))             # <<<<<<<<<<<<<<
 *         results[C.TCR_R2] = correl*correl
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 */
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_Subtract(__pyx_v_N, __pyx_v_q); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_cost, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TCR_STD_DEV_BIAS_LESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_3, __pyx_t_4) < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":833
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))
 *         results[C.TCR_R2] = correl*correl             # <<<<<<<<<<<<<<
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 *         results[C.TCR_CORREL] = correl
 */
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_correl, __pyx_v_correl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TCR_R2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_6, __pyx_t_4) < 0)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":834
 *         results[C.TCR_STD_DEV_BIAS_LESS] = math.sqrt(cost/(N-q))
 *         results[C.TCR_R2] = correl*correl
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL] = correl
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 */
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_correl, __pyx_v_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyNumber_Subtract(__pyx_v_N, __pyx_v_q); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TCR_R2_ADJUST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_4, __pyx_t_3) < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":835
 *         results[C.TCR_R2] = correl*correl
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 *         results[C.TCR_CORREL] = correl             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TCR_CORREL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_4, __pyx_v_correl) < 0)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":836
 *         results[C.TCR_R2_ADJUST] = correl*N/(N-q)
 *         results[C.TCR_CORREL] = correl
 *         results[C.TCR_CORREL_MAX] = maxcorrel             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TCR_CORREL_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_3, __pyx_v_maxcorrel) < 0)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":837
 *         results[C.TCR_CORREL] = correl
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 *         results[C.TCR_CORREL_MEAN] = meancorrel             # <<<<<<<<<<<<<<
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 *         results[C.TCR_HIDDEN] = self.hidden  #self.mainModel.models[0].hidden
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TCR_CORREL_MEAN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_4, __pyx_v_meancorrel) < 0)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":838
 *         results[C.TCR_CORREL_MAX] = maxcorrel
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex             # <<<<<<<<<<<<<<
 *         results[C.TCR_HIDDEN] = self.hidden  #self.mainModel.models[0].hidden
 *         results[C.TCR_EPOCHS] = self.actualepochs
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TCR_CORREL_MAX_ADDR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_3, __pyx_v_maxindex) < 0)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":839
 *         results[C.TCR_CORREL_MEAN] = meancorrel
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 *         results[C.TCR_HIDDEN] = self.hidden  #self.mainModel.models[0].hidden             # <<<<<<<<<<<<<<
 *         results[C.TCR_EPOCHS] = self.actualepochs
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hidden); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TCR_HIDDEN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_6, __pyx_t_3) < 0)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":840
 *         results[C.TCR_CORREL_MAX_ADDR] = maxindex
 *         results[C.TCR_HIDDEN] = self.hidden  #self.mainModel.models[0].hidden
 *         results[C.TCR_EPOCHS] = self.actualepochs             # <<<<<<<<<<<<<<
 * 
 *         #self.rank = npsum(leverages)+0.5
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_actualepochs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TCR_EPOCHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_4, __pyx_t_3) < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":843
 * 
 *         #self.rank = npsum(leverages)+0.5
 *         delta = q - int(math.floor(self.rank))  #int(math.floor(npsum(leverages)+0.5))             # <<<<<<<<<<<<<<
 * 
 *         if 0 <= delta < q:
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_floor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rank_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_q, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_delta = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":845
 *         delta = q - int(math.floor(self.rank))  #int(math.floor(npsum(leverages)+0.5))
 * 
 *         if 0 <= delta < q:             # <<<<<<<<<<<<<<
 *             if leverageUsages is not None:
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_int_0, __pyx_v_delta, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_3)) {
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_delta, __pyx_v_q, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":846
 * 
 *         if 0 <= delta < q:
 *             if leverageUsages is not None:             # <<<<<<<<<<<<<<
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)
 *             results[C.TCR_PRESS] = press
 */
    __pyx_t_2 = (__pyx_v_leverageUsages != Py_None);
    __pyx_t_18 = (__pyx_t_2 != 0);
    if (__pyx_t_18) {

      /* "metaphor/monal/driver/_driver.py":847
 *         if 0 <= delta < q:
 *             if leverageUsages is not None:
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)             # <<<<<<<<<<<<<<
 *             results[C.TCR_PRESS] = press
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fsum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Subtract(__pyx_v_leverages, __pyx_v_leverageUsages); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_TCR_SHII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_t_3) < 0)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":846
 * 
 *         if 0 <= delta < q:
 *             if leverageUsages is not None:             # <<<<<<<<<<<<<<
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)
 *             results[C.TCR_PRESS] = press
 */
    }

    /* "metaphor/monal/driver/_driver.py":848
 *             if leverageUsages is not None:
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)
 *             results[C.TCR_PRESS] = press             # <<<<<<<<<<<<<<
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 *             results[C.TCR_DELTA_RANK] = delta
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TCR_PRESS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_v_press) < 0)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":849
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)
 *             results[C.TCR_PRESS] = press
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N             # <<<<<<<<<<<<<<
 *             results[C.TCR_DELTA_RANK] = delta
 *             results[C.TCR_DETERMINANT] = self.determinant  #np .linalg.det(self._dispersionMatrix)
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fsum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_leverages, __pyx_v_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_19 = PyTuple_New(1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_19, 0+1, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_19 = PyTuple_New(1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_19, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_v_N); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_MU); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_19, __pyx_t_9) < 0)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":850
 *             results[C.TCR_PRESS] = press
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 *             results[C.TCR_DELTA_RANK] = delta             # <<<<<<<<<<<<<<
 *             results[C.TCR_DETERMINANT] = self.determinant  #np .linalg.det(self._dispersionMatrix)
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_TCR_DELTA_RANK); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_19, __pyx_v_delta) < 0)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    /* "metaphor/monal/driver/_driver.py":851
 *             results[C.TCR_MU] =  math.fsum(sqrt(leverages*N/q))/N
 *             results[C.TCR_DELTA_RANK] = delta
 *             results[C.TCR_DETERMINANT] = self.determinant  #np .linalg.det(self._dispersionMatrix)             # <<<<<<<<<<<<<<
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 */
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_determinant_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_TCR_DETERMINANT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_5, __pyx_t_19) < 0)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    /* "metaphor/monal/driver/_driver.py":852
 *             results[C.TCR_DELTA_RANK] = delta
 *             results[C.TCR_DETERMINANT] = self.determinant  #np .linalg.det(self._dispersionMatrix)
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)             # <<<<<<<<<<<<<<
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]
 */
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eigval); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_TCR_EIGEN_MIN); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_9, __pyx_t_5) < 0)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":853
 *             results[C.TCR_DETERMINANT] = self.determinant  #np .linalg.det(self._dispersionMatrix)
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)             # <<<<<<<<<<<<<<
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eigval); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_EIGEN_MAX); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_19, __pyx_t_9) < 0)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":854
 *             results[C.TCR_EIGEN_MIN] = min(self.eigval)
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]             # <<<<<<<<<<<<<<
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)
 *         #if restable is not None:
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_TCR_EIGEN_MAX); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_results, __pyx_t_19); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_TCR_EIGEN_MIN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = __Pyx_PyObject_GetItem(__pyx_v_results, __pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_9, __pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_TCR_CONDITIONNING); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_9, __pyx_t_5) < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":855
 *             results[C.TCR_EIGEN_MAX] = max(self.eigval)
 *             results[C.TCR_CONDITIONNING] = results[C.TCR_EIGEN_MAX]/results[C.TCR_EIGEN_MIN]
 *             results[C.TCR_TRACE] = trace(self._dispersionMatrix)             # <<<<<<<<<<<<<<
 *         #if restable is not None:
 * 
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_trace); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_19};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_19};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_19);
        __pyx_t_19 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_TCR_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_t_6, __pyx_t_5) < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":845
 *         delta = q - int(math.floor(self.rank))  #int(math.floor(npsum(leverages)+0.5))
 * 
 *         if 0 <= delta < q:             # <<<<<<<<<<<<<<
 *             if leverageUsages is not None:
 *                 results[C.TCR_SHII]  = math.fsum(leverages - leverageUsages)
 */
  }

  /* "metaphor/monal/driver/_driver.py":858
 *         #if restable is not None:
 * 
 *         if restable is None:             # <<<<<<<<<<<<<<
 *             return results
 *         return results, restable
 */
  __pyx_t_18 = (__pyx_v_restable == Py_None);
  __pyx_t_2 = (__pyx_t_18 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":859
 * 
 *         if restable is None:
 *             return results             # <<<<<<<<<<<<<<
 *         return results, restable
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_results);
    __pyx_r = __pyx_v_results;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":858
 *         #if restable is not None:
 * 
 *         if restable is None:             # <<<<<<<<<<<<<<
 *             return results
 *         return results, restable
 */
  }

  /* "metaphor/monal/driver/_driver.py":860
 *         if restable is None:
 *             return results
 *         return results, restable             # <<<<<<<<<<<<<<
 * 
 * #     def computeTrainingResults_test(self, target=None, curw=None, restable=None, outputs=None, jacobians=None):  # DriverBase
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_results);
  __Pyx_GIVEREF(__pyx_v_results);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_results);
  __Pyx_INCREF(__pyx_v_restable);
  __Pyx_GIVEREF(__pyx_v_restable);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_restable);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":773
 * #         return results
 * 
 *     def computeTrainingResultsOld(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode externe
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.computeTrainingResultsOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_leverages);
  __Pyx_XDECREF(__pyx_v_leverageUsages);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_q);
  __Pyx_XDECREF(__pyx_v_cost);
  __Pyx_XDECREF(__pyx_v_vec);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_lev);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_press);
  __Pyx_XDECREF(__pyx_v_correlflat);
  __Pyx_XDECREF(__pyx_v_maxcorrel);
  __Pyx_XDECREF(__pyx_v_meancorrel);
  __Pyx_XDECREF(__pyx_v_maxindex);
  __Pyx_XDECREF(__pyx_v_correl);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":935
 * #         return results, restable
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase             # <<<<<<<<<<<<<<
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_savingformat);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_savingformat);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_savingformat);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_65saveParameters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_65saveParameters = {"saveParameters", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_65saveParameters, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_10DriverBase_65saveParameters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_savingformat = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveParameters (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,&__pyx_n_s_savingformat,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_savingformat;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("saveParameters", 0, 2, 3, 1); __PYX_ERR(0, 935, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_savingformat);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveParameters") < 0)) __PYX_ERR(0, 935, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_filename = values[1];
    __pyx_v_savingformat = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveParameters", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 935, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.saveParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_64saveParameters(__pyx_self, __pyx_v_self, __pyx_v_filename, __pyx_v_savingformat);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_10DriverBase_64saveParameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat) {
  PyObject *__pyx_v_ff = NULL;
  PyObject *__pyx_v_nm = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_norm = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  PyObject *(*__pyx_t_17)(PyObject *);
  Py_ssize_t __pyx_t_18;
  PyObject *(*__pyx_t_19)(PyObject *);
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  __Pyx_RefNannySetupContext("saveParameters", 0);

  /* "metaphor/monal/driver/_driver.py":936
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:             # <<<<<<<<<<<<<<
 *             return -1
 *         if savingformat == C.SF_BINARY:
 */
  __Pyx_INCREF(__pyx_v_savingformat);
  __pyx_t_1 = __pyx_v_savingformat;
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SF_ASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SF_BINARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SF_JSON); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_2 != 0);
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":937
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1             # <<<<<<<<<<<<<<
 *         if savingformat == C.SF_BINARY:
 *             return savez_compressed(filename, propertyname=self.propertyName,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":936
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:             # <<<<<<<<<<<<<<
 *             return -1
 *         if savingformat == C.SF_BINARY:
 */
  }

  /* "metaphor/monal/driver/_driver.py":938
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1
 *         if savingformat == C.SF_BINARY:             # <<<<<<<<<<<<<<
 *             return savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SF_BINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":939
 *             return -1
 *         if savingformat == C.SF_BINARY:
 *             return savez_compressed(filename, propertyname=self.propertyName,             # <<<<<<<<<<<<<<
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_savez_compressed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_propertyname, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":940
 *         if savingformat == C.SF_BINARY:
 *             return savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,             # <<<<<<<<<<<<<<
 *                 innorm=self.inputnorm,
 *                 outnorm=self.outputnorm, baselen=self._baselen,  #f reedom=self._f reedom,
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_params, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameterNames); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_paramnames, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":941
 *             return savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,             # <<<<<<<<<<<<<<
 *                 outnorm=self.outputnorm, baselen=self._baselen,  #f reedom=self._f reedom,
 *                 stddev=self._stdtrain, halfdispersion=None, dispersion=self._dispersionMatrix)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputnorm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_innorm, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":942
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,
 *                 outnorm=self.outputnorm, baselen=self._baselen,  #f reedom=self._f reedom,             # <<<<<<<<<<<<<<
 *                 stddev=self._stdtrain, halfdispersion=None, dispersion=self._dispersionMatrix)
 *         else:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputnorm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_outnorm, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_baselen, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":943
 *                 innorm=self.inputnorm,
 *                 outnorm=self.outputnorm, baselen=self._baselen,  #f reedom=self._f reedom,
 *                 stddev=self._stdtrain, halfdispersion=None, dispersion=self._dispersionMatrix)             # <<<<<<<<<<<<<<
 *         else:
 *             with open(filename, "w") as ff:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_stddev, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_halfdispersion, Py_None) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dispersion, __pyx_t_6) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":939
 *             return -1
 *         if savingformat == C.SF_BINARY:
 *             return savez_compressed(filename, propertyname=self.propertyName,             # <<<<<<<<<<<<<<
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":938
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1
 *         if savingformat == C.SF_BINARY:             # <<<<<<<<<<<<<<
 *             return savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,
 */
  }

  /* "metaphor/monal/driver/_driver.py":945
 *                 stddev=self._stdtrain, halfdispersion=None, dispersion=self._dispersionMatrix)
 *         else:
 *             with open(filename, "w") as ff:             # <<<<<<<<<<<<<<
 *                 if savingformat != C.SF_ASCII:
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 */
  /*else*/ {
    /*with:*/ {
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
      __Pyx_INCREF(__pyx_n_u_w);
      __Pyx_GIVEREF(__pyx_n_u_w);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_w);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_1) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L9_error)
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          /*try:*/ {
            __pyx_v_ff = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "metaphor/monal/driver/_driver.py":946
 *         else:
 *             with open(filename, "w") as ff:
 *                 if savingformat != C.SF_ASCII:             # <<<<<<<<<<<<<<
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 *                 else:
 */
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SF_ASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L13_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 946, __pyx_L13_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_5) {

              /* "metaphor/monal/driver/_driver.py":947
 *             with open(filename, "w") as ff:
 *                 if savingformat != C.SF_ASCII:
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant             # <<<<<<<<<<<<<<
 *                 else:
 *                     if self.propertyName:
 */
              __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_saveObj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 947, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_1 = NULL;
              __pyx_t_11 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_4, function);
                  __pyx_t_11 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_ff, __pyx_t_6, __pyx_v_savingformat};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L13_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_ff, __pyx_t_6, __pyx_v_savingformat};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L13_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 947, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_1) {
                  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __pyx_t_1 = NULL;
                }
                __Pyx_INCREF(__pyx_v_ff);
                __Pyx_GIVEREF(__pyx_v_ff);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_ff);
                __Pyx_GIVEREF(__pyx_t_6);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_6);
                __Pyx_INCREF(__pyx_v_savingformat);
                __Pyx_GIVEREF(__pyx_v_savingformat);
                PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_v_savingformat);
                __pyx_t_6 = 0;
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "metaphor/monal/driver/_driver.py":946
 *         else:
 *             with open(filename, "w") as ff:
 *                 if savingformat != C.SF_ASCII:             # <<<<<<<<<<<<<<
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 *                 else:
 */
              goto __pyx_L19;
            }

            /* "metaphor/monal/driver/_driver.py":949
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 *                 else:
 *                     if self.propertyName:             # <<<<<<<<<<<<<<
 *                         ff.write("#{0}\n".format(self.propertyName))
 *                     ff.write("weights\n")
 */
            /*else*/ {
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 949, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_5) {

                /* "metaphor/monal/driver/_driver.py":950
 *                 else:
 *                     if self.propertyName:
 *                         ff.write("#{0}\n".format(self.propertyName))             # <<<<<<<<<<<<<<
 *                     ff.write("weights\n")
 *                     ff.write("count={0}\n".format(self.paramCount))
 */
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 950, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_13 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
                  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
                  if (likely(__pyx_t_13)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                    __Pyx_INCREF(__pyx_t_13);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_6, function);
                  }
                }
                if (!__pyx_t_13) {
                  __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 950, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_12);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_6)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_1};
                    __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_1};
                    __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
                    __Pyx_GIVEREF(__pyx_t_1);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_1);
                    __pyx_t_1 = 0;
                    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __pyx_t_6 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_6)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_6);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                  }
                }
                if (!__pyx_t_6) {
                  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12};
                    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12};
                    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
                    __Pyx_GIVEREF(__pyx_t_12);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12);
                    __pyx_t_12 = 0;
                    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":949
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 *                 else:
 *                     if self.propertyName:             # <<<<<<<<<<<<<<
 *                         ff.write("#{0}\n".format(self.propertyName))
 *                     ff.write("weights\n")
 */
              }

              /* "metaphor/monal/driver/_driver.py":951
 *                     if self.propertyName:
 *                         ff.write("#{0}\n".format(self.propertyName))
 *                     ff.write("weights\n")             # <<<<<<<<<<<<<<
 *                     ff.write("count={0}\n".format(self.paramCount))
 *                     for nm, val in zip(self.parameterNames, self.weights):
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "metaphor/monal/driver/_driver.py":952
 *                         ff.write("#{0}\n".format(self.propertyName))
 *                     ff.write("weights\n")
 *                     ff.write("count={0}\n".format(self.paramCount))             # <<<<<<<<<<<<<<
 *                     for nm, val in zip(self.parameterNames, self.weights):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_count_0, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 952, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_1 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                }
              }
              if (!__pyx_t_1) {
                __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 952, __pyx_L13_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_GOTREF(__pyx_t_14);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
                  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_14);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
                  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_14);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                } else
                #endif
                {
                  __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_13);
                  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __pyx_t_1 = NULL;
                  __Pyx_GIVEREF(__pyx_t_6);
                  PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_6);
                  __pyx_t_6 = 0;
                  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_14);
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                }
              }
              if (!__pyx_t_12) {
                __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L13_error)
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_14};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_14};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                } else
                #endif
                {
                  __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_13);
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  __Pyx_GIVEREF(__pyx_t_14);
                  PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_14);
                  __pyx_t_14 = 0;
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "metaphor/monal/driver/_driver.py":953
 *                     ff.write("weights\n")
 *                     ff.write("count={0}\n".format(self.paramCount))
 *                     for nm, val in zip(self.parameterNames, self.weights):             # <<<<<<<<<<<<<<
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if not self.inputnorm is None:
 */
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameterNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 953, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_GIVEREF(__pyx_t_4);
              PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_3);
              PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3);
              __pyx_t_4 = 0;
              __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                __pyx_t_13 = __pyx_t_3; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0;
                __pyx_t_16 = NULL;
              } else {
                __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 953, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 953, __pyx_L13_error)
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              for (;;) {
                if (likely(!__pyx_t_16)) {
                  if (likely(PyList_CheckExact(__pyx_t_13))) {
                    if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 953, __pyx_L13_error)
                    #else
                    __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    #endif
                  } else {
                    if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 953, __pyx_L13_error)
                    #else
                    __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    #endif
                  }
                } else {
                  __pyx_t_3 = __pyx_t_16(__pyx_t_13);
                  if (unlikely(!__pyx_t_3)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 953, __pyx_L13_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_3);
                }
                if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
                  PyObject* sequence = __pyx_t_3;
                  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                  if (unlikely(size != 2)) {
                    if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                    else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                    __PYX_ERR(0, 953, __pyx_L13_error)
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  if (likely(PyTuple_CheckExact(sequence))) {
                    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
                    __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); 
                  } else {
                    __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
                    __pyx_t_14 = PyList_GET_ITEM(sequence, 1); 
                  }
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_14);
                  #else
                  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 953, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_14);
                  #endif
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                } else {
                  Py_ssize_t index = -1;
                  __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 953, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_17 = Py_TYPE(__pyx_t_12)->tp_iternext;
                  index = 0; __pyx_t_4 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L23_unpacking_failed;
                  __Pyx_GOTREF(__pyx_t_4);
                  index = 1; __pyx_t_14 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_14)) goto __pyx_L23_unpacking_failed;
                  __Pyx_GOTREF(__pyx_t_14);
                  if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_12), 2) < 0) __PYX_ERR(0, 953, __pyx_L13_error)
                  __pyx_t_17 = NULL;
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  goto __pyx_L24_unpacking_done;
                  __pyx_L23_unpacking_failed:;
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __pyx_t_17 = NULL;
                  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                  __PYX_ERR(0, 953, __pyx_L13_error)
                  __pyx_L24_unpacking_done:;
                }
                __Pyx_XDECREF_SET(__pyx_v_nm, __pyx_t_4);
                __pyx_t_4 = 0;
                __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_14);
                __pyx_t_14 = 0;

                /* "metaphor/monal/driver/_driver.py":954
 *                     ff.write("count={0}\n".format(self.paramCount))
 *                     for nm, val in zip(self.parameterNames, self.weights):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))             # <<<<<<<<<<<<<<
 *                     if not self.inputnorm is None:
 *                         ff.write("outnorm\n")
 */
                __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 954, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_14);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 954, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_6 = NULL;
                __pyx_t_11 = 0;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_6)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_6);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_11 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_nm, __pyx_v_val};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_nm, __pyx_v_val};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  if (__pyx_t_6) {
                    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_nm);
                  __Pyx_GIVEREF(__pyx_v_nm);
                  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_v_nm);
                  __Pyx_INCREF(__pyx_v_val);
                  __Pyx_GIVEREF(__pyx_v_val);
                  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_val);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_14);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_14, function);
                  }
                }
                if (!__pyx_t_12) {
                  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_14)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __pyx_t_12 = NULL;
                    __Pyx_GIVEREF(__pyx_t_4);
                    PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_4);
                    __pyx_t_4 = 0;
                    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":953
 *                     ff.write("weights\n")
 *                     ff.write("count={0}\n".format(self.paramCount))
 *                     for nm, val in zip(self.parameterNames, self.weights):             # <<<<<<<<<<<<<<
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if not self.inputnorm is None:
 */
              }
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

              /* "metaphor/monal/driver/_driver.py":955
 *                     for nm, val in zip(self.parameterNames, self.weights):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if not self.inputnorm is None:             # <<<<<<<<<<<<<<
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:
 */
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputnorm); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 955, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_5 = (__pyx_t_13 != Py_None);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_2 = (__pyx_t_5 != 0);
              if (__pyx_t_2) {

                /* "metaphor/monal/driver/_driver.py":956
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if not self.inputnorm is None:
 *                         ff.write("outnorm\n")             # <<<<<<<<<<<<<<
 *                         for norm in self.inputnorm:
 *                             for nm, val in zip(("Pi", "Sigma"), norm):
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 956, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":957
 *                     if not self.inputnorm is None:
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:             # <<<<<<<<<<<<<<
 *                             for nm, val in zip(("Pi", "Sigma"), norm):
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputnorm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                  __pyx_t_13 = __pyx_t_3; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0;
                  __pyx_t_16 = NULL;
                } else {
                  __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 957, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_13);
                  __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 957, __pyx_L13_error)
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                for (;;) {
                  if (likely(!__pyx_t_16)) {
                    if (likely(PyList_CheckExact(__pyx_t_13))) {
                      if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 957, __pyx_L13_error)
                      #else
                      __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      #endif
                    } else {
                      if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 957, __pyx_L13_error)
                      #else
                      __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      #endif
                    }
                  } else {
                    __pyx_t_3 = __pyx_t_16(__pyx_t_13);
                    if (unlikely(!__pyx_t_3)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 957, __pyx_L13_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_3);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_norm, __pyx_t_3);
                  __pyx_t_3 = 0;

                  /* "metaphor/monal/driver/_driver.py":958
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:
 *                             for nm, val in zip(("Pi", "Sigma"), norm):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 * 
 */
                  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_INCREF(__pyx_tuple__33);
                  __Pyx_GIVEREF(__pyx_tuple__33);
                  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_tuple__33);
                  __Pyx_INCREF(__pyx_v_norm);
                  __Pyx_GIVEREF(__pyx_v_norm);
                  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_norm);
                  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 958, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_14);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
                    __pyx_t_3 = __pyx_t_14; __Pyx_INCREF(__pyx_t_3); __pyx_t_18 = 0;
                    __pyx_t_19 = NULL;
                  } else {
                    __pyx_t_18 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_t_19 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 958, __pyx_L13_error)
                  }
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  for (;;) {
                    if (likely(!__pyx_t_19)) {
                      if (likely(PyList_CheckExact(__pyx_t_3))) {
                        if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_3)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_14 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_14); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 958, __pyx_L13_error)
                        #else
                        __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 958, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        #endif
                      } else {
                        if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_14); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 958, __pyx_L13_error)
                        #else
                        __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 958, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        #endif
                      }
                    } else {
                      __pyx_t_14 = __pyx_t_19(__pyx_t_3);
                      if (unlikely(!__pyx_t_14)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                          else __PYX_ERR(0, 958, __pyx_L13_error)
                        }
                        break;
                      }
                      __Pyx_GOTREF(__pyx_t_14);
                    }
                    if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
                      PyObject* sequence = __pyx_t_14;
                      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                      if (unlikely(size != 2)) {
                        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                        __PYX_ERR(0, 958, __pyx_L13_error)
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      if (likely(PyTuple_CheckExact(sequence))) {
                        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
                        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
                      } else {
                        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
                        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
                      }
                      __Pyx_INCREF(__pyx_t_1);
                      __Pyx_INCREF(__pyx_t_4);
                      #else
                      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      #endif
                      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                    } else {
                      Py_ssize_t index = -1;
                      __pyx_t_12 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                      __pyx_t_17 = Py_TYPE(__pyx_t_12)->tp_iternext;
                      index = 0; __pyx_t_1 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L30_unpacking_failed;
                      __Pyx_GOTREF(__pyx_t_1);
                      index = 1; __pyx_t_4 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L30_unpacking_failed;
                      __Pyx_GOTREF(__pyx_t_4);
                      if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_12), 2) < 0) __PYX_ERR(0, 958, __pyx_L13_error)
                      __pyx_t_17 = NULL;
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      goto __pyx_L31_unpacking_done;
                      __pyx_L30_unpacking_failed:;
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __pyx_t_17 = NULL;
                      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                      __PYX_ERR(0, 958, __pyx_L13_error)
                      __pyx_L31_unpacking_done:;
                    }
                    __Pyx_XDECREF_SET(__pyx_v_nm, __pyx_t_1);
                    __pyx_t_1 = 0;
                    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
                    __pyx_t_4 = 0;

                    /* "metaphor/monal/driver/_driver.py":959
 *                         for norm in self.inputnorm:
 *                             for nm, val in zip(("Pi", "Sigma"), norm):
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))             # <<<<<<<<<<<<<<
 * 
 *                     ff.write("outnorm\n")
 */
                    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 959, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __pyx_t_6 = NULL;
                    __pyx_t_11 = 0;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
                      if (likely(__pyx_t_6)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                        __Pyx_INCREF(__pyx_t_6);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_12, function);
                        __pyx_t_11 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_12)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_nm, __pyx_v_val};
                      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L13_error)
                      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_GOTREF(__pyx_t_1);
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_nm, __pyx_v_val};
                      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L13_error)
                      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_GOTREF(__pyx_t_1);
                    } else
                    #endif
                    {
                      __pyx_t_20 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 959, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_20);
                      if (__pyx_t_6) {
                        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_6); __pyx_t_6 = NULL;
                      }
                      __Pyx_INCREF(__pyx_v_nm);
                      __Pyx_GIVEREF(__pyx_v_nm);
                      PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_11, __pyx_v_nm);
                      __Pyx_INCREF(__pyx_v_val);
                      __Pyx_GIVEREF(__pyx_v_val);
                      PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_11, __pyx_v_val);
                      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __pyx_t_12 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
                      if (likely(__pyx_t_12)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_12);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_4, function);
                      }
                    }
                    if (!__pyx_t_12) {
                      __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 959, __pyx_L13_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_GOTREF(__pyx_t_14);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_4)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_1};
                        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 959, __pyx_L13_error)
                        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_1};
                        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 959, __pyx_L13_error)
                        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 959, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_20);
                        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_12); __pyx_t_12 = NULL;
                        __Pyx_GIVEREF(__pyx_t_1);
                        PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_t_1);
                        __pyx_t_1 = 0;
                        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_20, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 959, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

                    /* "metaphor/monal/driver/_driver.py":958
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:
 *                             for nm, val in zip(("Pi", "Sigma"), norm):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 * 
 */
                  }
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                  /* "metaphor/monal/driver/_driver.py":957
 *                     if not self.inputnorm is None:
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:             # <<<<<<<<<<<<<<
 *                             for nm, val in zip(("Pi", "Sigma"), norm):
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 */
                }
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                /* "metaphor/monal/driver/_driver.py":955
 *                     for nm, val in zip(self.parameterNames, self.weights):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if not self.inputnorm is None:             # <<<<<<<<<<<<<<
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:
 */
              }

              /* "metaphor/monal/driver/_driver.py":961
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 * 
 *                     ff.write("outnorm\n")             # <<<<<<<<<<<<<<
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 */
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 961, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "metaphor/monal/driver/_driver.py":962
 * 
 *                     ff.write("outnorm\n")
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):             # <<<<<<<<<<<<<<
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputnorm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 962, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_INCREF(__pyx_tuple__35);
              __Pyx_GIVEREF(__pyx_tuple__35);
              PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_tuple__35);
              __Pyx_GIVEREF(__pyx_t_3);
              PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3);
              __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                __pyx_t_13 = __pyx_t_3; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0;
                __pyx_t_16 = NULL;
              } else {
                __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 962, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 962, __pyx_L13_error)
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              for (;;) {
                if (likely(!__pyx_t_16)) {
                  if (likely(PyList_CheckExact(__pyx_t_13))) {
                    if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 962, __pyx_L13_error)
                    #else
                    __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    #endif
                  } else {
                    if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 962, __pyx_L13_error)
                    #else
                    __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    #endif
                  }
                } else {
                  __pyx_t_3 = __pyx_t_16(__pyx_t_13);
                  if (unlikely(!__pyx_t_3)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 962, __pyx_L13_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_3);
                }
                if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
                  PyObject* sequence = __pyx_t_3;
                  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                  if (unlikely(size != 2)) {
                    if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                    else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                    __PYX_ERR(0, 962, __pyx_L13_error)
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  if (likely(PyTuple_CheckExact(sequence))) {
                    __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
                    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
                  } else {
                    __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
                    __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
                  }
                  __Pyx_INCREF(__pyx_t_14);
                  __Pyx_INCREF(__pyx_t_4);
                  #else
                  __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 962, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_14);
                  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                } else {
                  Py_ssize_t index = -1;
                  __pyx_t_20 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 962, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_20);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_17 = Py_TYPE(__pyx_t_20)->tp_iternext;
                  index = 0; __pyx_t_14 = __pyx_t_17(__pyx_t_20); if (unlikely(!__pyx_t_14)) goto __pyx_L34_unpacking_failed;
                  __Pyx_GOTREF(__pyx_t_14);
                  index = 1; __pyx_t_4 = __pyx_t_17(__pyx_t_20); if (unlikely(!__pyx_t_4)) goto __pyx_L34_unpacking_failed;
                  __Pyx_GOTREF(__pyx_t_4);
                  if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_20), 2) < 0) __PYX_ERR(0, 962, __pyx_L13_error)
                  __pyx_t_17 = NULL;
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                  goto __pyx_L35_unpacking_done;
                  __pyx_L34_unpacking_failed:;
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                  __pyx_t_17 = NULL;
                  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                  __PYX_ERR(0, 962, __pyx_L13_error)
                  __pyx_L35_unpacking_done:;
                }
                __Pyx_XDECREF_SET(__pyx_v_nm, __pyx_t_14);
                __pyx_t_14 = 0;
                __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
                __pyx_t_4 = 0;

                /* "metaphor/monal/driver/_driver.py":963
 *                     ff.write("outnorm\n")
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))             # <<<<<<<<<<<<<<
 *                     if self._baselen:
 *                         ff.write("baselen\n")
 */
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 963, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_20);
                __pyx_t_1 = NULL;
                __pyx_t_11 = 0;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_20))) {
                  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_20);
                  if (likely(__pyx_t_1)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
                    __Pyx_INCREF(__pyx_t_1);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_20, function);
                    __pyx_t_11 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_20)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_nm, __pyx_v_val};
                  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 963, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_14);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_nm, __pyx_v_val};
                  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 963, __pyx_L13_error)
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_14);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 963, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_1) {
                    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __pyx_t_1 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_nm);
                  __Pyx_GIVEREF(__pyx_v_nm);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_nm);
                  __Pyx_INCREF(__pyx_v_val);
                  __Pyx_GIVEREF(__pyx_v_val);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_val);
                  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_12, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 963, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_14);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                __pyx_t_20 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_20)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_20);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                  }
                }
                if (!__pyx_t_20) {
                  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_t_14};
                    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_t_14};
                    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 963, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_20); __pyx_t_20 = NULL;
                    __Pyx_GIVEREF(__pyx_t_14);
                    PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_14);
                    __pyx_t_14 = 0;
                    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":962
 * 
 *                     ff.write("outnorm\n")
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):             # <<<<<<<<<<<<<<
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:
 */
              }
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

              /* "metaphor/monal/driver/_driver.py":964
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:             # <<<<<<<<<<<<<<
 *                         ff.write("baselen\n")
 *                         ff.write("{0}".format(self._baselen))
 */
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 964, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 964, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (__pyx_t_2) {

                /* "metaphor/monal/driver/_driver.py":965
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:
 *                         ff.write("baselen\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{0}".format(self._baselen))
 *                     #===========================================================
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 965, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":966
 *                     if self._baselen:
 *                         ff.write("baselen\n")
 *                         ff.write("{0}".format(self._baselen))             # <<<<<<<<<<<<<<
 *                     #===========================================================
 *                     # if self._studentvariable:
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 966, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 966, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 966, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_14);
                __pyx_t_20 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_20)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_20);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                  }
                }
                if (!__pyx_t_20) {
                  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_12)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_t_14};
                    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_t_14};
                    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_20); __pyx_t_20 = NULL;
                    __Pyx_GIVEREF(__pyx_t_14);
                    PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_14);
                    __pyx_t_14 = 0;
                    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_13, function);
                  }
                }
                if (!__pyx_t_12) {
                  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_13)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __pyx_t_12 = NULL;
                    __Pyx_GIVEREF(__pyx_t_4);
                    PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_4);
                    __pyx_t_4 = 0;
                    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":964
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:             # <<<<<<<<<<<<<<
 *                         ff.write("baselen\n")
 *                         ff.write("{0}".format(self._baselen))
 */
              }

              /* "metaphor/monal/driver/_driver.py":972
 *                     #    ff.write("%18.15g\n"% self._studentvariable)
 *                     #===========================================================
 *                     if self._stdtrain:             # <<<<<<<<<<<<<<
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 972, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_2) {

                /* "metaphor/monal/driver/_driver.py":973
 *                     #===========================================================
 *                     if self._stdtrain:
 *                         ff.write("stddev\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 973, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                /* "metaphor/monal/driver/_driver.py":974
 *                     if self._stdtrain:
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))             # <<<<<<<<<<<<<<
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 974, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 974, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 974, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_14 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_14)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_14);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                  }
                }
                if (!__pyx_t_14) {
                  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_12};
                    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_12};
                    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_20);
                    __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_14); __pyx_t_14 = NULL;
                    __Pyx_GIVEREF(__pyx_t_12);
                    PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_t_12);
                    __pyx_t_12 = 0;
                    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_4)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                  }
                }
                if (!__pyx_t_4) {
                  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 974, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_13);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_3)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_20);
                    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4); __pyx_t_4 = NULL;
                    __Pyx_GIVEREF(__pyx_t_1);
                    PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_t_1);
                    __pyx_t_1 = 0;
                    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_20, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 974, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                /* "metaphor/monal/driver/_driver.py":972
 *                     #    ff.write("%18.15g\n"% self._studentvariable)
 *                     #===========================================================
 *                     if self._stdtrain:             # <<<<<<<<<<<<<<
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 */
              }

              /* "metaphor/monal/driver/_driver.py":975
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):             # <<<<<<<<<<<<<<
 *                         N = self.dimension
 *                         ff.write("halfdispersion\n")
 */
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_halfDispersionMatrix); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_5 = (__pyx_t_13 != Py_None);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_21 = (__pyx_t_5 != 0);
              if (__pyx_t_21) {
              } else {
                __pyx_t_2 = __pyx_t_21;
                goto __pyx_L39_bool_binop_done;
              }
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_halfDispersionMatrix); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_20 = PyObject_RichCompare(__pyx_t_13, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 975, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
              __pyx_t_2 = __pyx_t_21;
              __pyx_L39_bool_binop_done:;
              if (__pyx_t_2) {

                /* "metaphor/monal/driver/_driver.py":976
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension             # <<<<<<<<<<<<<<
 *                         ff.write("halfdispersion\n")
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 */
                __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 976, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_20);
                __pyx_v_N = __pyx_t_20;
                __pyx_t_20 = 0;

                /* "metaphor/monal/driver/_driver.py":977
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension
 *                         ff.write("halfdispersion\n")             # <<<<<<<<<<<<<<
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 */
                __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 977, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_20);
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":978
 *                         N = self.dimension
 *                         ff.write("halfdispersion\n")
 *                         ff.write("count={0}\n".format(N*(N+1)/2))             # <<<<<<<<<<<<<<
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):
 */
                __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 978, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_20);
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_count_0, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_12 = PyNumber_Multiply(__pyx_v_N, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 978, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_12, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                  }
                }
                if (!__pyx_t_12) {
                  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 978, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_13);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_1)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
                    __Pyx_GIVEREF(__pyx_t_4);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_4);
                    __pyx_t_4 = 0;
                    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_1 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_20))) {
                  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_20);
                  if (likely(__pyx_t_1)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
                    __Pyx_INCREF(__pyx_t_1);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_20, function);
                  }
                }
                if (!__pyx_t_1) {
                  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L13_error)
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_20)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_13};
                    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_13};
                    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL;
                    __Pyx_GIVEREF(__pyx_t_13);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_13);
                    __pyx_t_13 = 0;
                    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":979
 *                         ff.write("halfdispersion\n")
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):             # <<<<<<<<<<<<<<
 *                             for j in range(i+1):
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 979, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_20);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (likely(PyList_CheckExact(__pyx_t_20)) || PyTuple_CheckExact(__pyx_t_20)) {
                  __pyx_t_3 = __pyx_t_20; __Pyx_INCREF(__pyx_t_3); __pyx_t_15 = 0;
                  __pyx_t_16 = NULL;
                } else {
                  __pyx_t_15 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_16 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 979, __pyx_L13_error)
                }
                __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                for (;;) {
                  if (likely(!__pyx_t_16)) {
                    if (likely(PyList_CheckExact(__pyx_t_3))) {
                      if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_3)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_20 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_20); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 979, __pyx_L13_error)
                      #else
                      __pyx_t_20 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 979, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_20);
                      #endif
                    } else {
                      if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_20 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_20); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 979, __pyx_L13_error)
                      #else
                      __pyx_t_20 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 979, __pyx_L13_error)
                      __Pyx_GOTREF(__pyx_t_20);
                      #endif
                    }
                  } else {
                    __pyx_t_20 = __pyx_t_16(__pyx_t_3);
                    if (unlikely(!__pyx_t_20)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 979, __pyx_L13_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_20);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_20);
                  __pyx_t_20 = 0;

                  /* "metaphor/monal/driver/_driver.py":980
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 *                     #===========================================================
 */
                  __pyx_t_20 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 980, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_20);
                  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 980, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_14);
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
                    __pyx_t_20 = __pyx_t_14; __Pyx_INCREF(__pyx_t_20); __pyx_t_18 = 0;
                    __pyx_t_19 = NULL;
                  } else {
                    __pyx_t_18 = -1; __pyx_t_20 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 980, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_20);
                    __pyx_t_19 = Py_TYPE(__pyx_t_20)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 980, __pyx_L13_error)
                  }
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  for (;;) {
                    if (likely(!__pyx_t_19)) {
                      if (likely(PyList_CheckExact(__pyx_t_20))) {
                        if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_20)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_14 = PyList_GET_ITEM(__pyx_t_20, __pyx_t_18); __Pyx_INCREF(__pyx_t_14); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 980, __pyx_L13_error)
                        #else
                        __pyx_t_14 = PySequence_ITEM(__pyx_t_20, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 980, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        #endif
                      } else {
                        if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_20)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_20, __pyx_t_18); __Pyx_INCREF(__pyx_t_14); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 980, __pyx_L13_error)
                        #else
                        __pyx_t_14 = PySequence_ITEM(__pyx_t_20, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 980, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        #endif
                      }
                    } else {
                      __pyx_t_14 = __pyx_t_19(__pyx_t_20);
                      if (unlikely(!__pyx_t_14)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                          else __PYX_ERR(0, 980, __pyx_L13_error)
                        }
                        break;
                      }
                      __Pyx_GOTREF(__pyx_t_14);
                    }
                    __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_14);
                    __pyx_t_14 = 0;

                    /* "metaphor/monal/driver/_driver.py":981
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))             # <<<<<<<<<<<<<<
 *                     #===========================================================
 *                     # if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 */
                    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 981, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 981, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 981, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __Pyx_INCREF(__pyx_v_i);
                    __Pyx_GIVEREF(__pyx_v_i);
                    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_i);
                    __Pyx_INCREF(__pyx_v_j);
                    __Pyx_GIVEREF(__pyx_v_j);
                    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_j);
                    __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 981, __pyx_L13_error)
                    __Pyx_GOTREF(__pyx_t_22);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __pyx_t_6 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
                      if (likely(__pyx_t_6)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_6);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_4, function);
                      }
                    }
                    if (!__pyx_t_6) {
                      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L13_error)
                      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                      __Pyx_GOTREF(__pyx_t_1);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_4)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_22};
                        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_22};
                        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL;
                        __Pyx_GIVEREF(__pyx_t_22);
                        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_22);
                        __pyx_t_22 = 0;
                        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __pyx_t_4 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
                      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13);
                      if (likely(__pyx_t_4)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_13, function);
                      }
                    }
                    if (!__pyx_t_4) {
                      __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 981, __pyx_L13_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_GOTREF(__pyx_t_14);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_13)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
                        __Pyx_GIVEREF(__pyx_t_1);
                        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_1);
                        __pyx_t_1 = 0;
                        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 981, __pyx_L13_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

                    /* "metaphor/monal/driver/_driver.py":980
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 *                     #===========================================================
 */
                  }
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

                  /* "metaphor/monal/driver/_driver.py":979
 *                         ff.write("halfdispersion\n")
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):             # <<<<<<<<<<<<<<
 *                             for j in range(i+1):
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 */
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/monal/driver/_driver.py":975
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):             # <<<<<<<<<<<<<<
 *                         N = self.dimension
 *                         ff.write("halfdispersion\n")
 */
              }
            }
            __pyx_L19:;

            /* "metaphor/monal/driver/_driver.py":945
 *                 stddev=self._stdtrain, halfdispersion=None, dispersion=self._dispersionMatrix)
 *         else:
 *             with open(filename, "w") as ff:             # <<<<<<<<<<<<<<
 *                 if savingformat != C.SF_ASCII:
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 */
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L18_try_end;
          __pyx_L13_error:;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.saveParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_20, &__pyx_t_14) < 0) __PYX_ERR(0, 945, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GOTREF(__pyx_t_20);
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_13 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_20, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 945, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 945, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_23);
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_23);
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
            if (__pyx_t_2 < 0) __PYX_ERR(0, 945, __pyx_L15_except_error)
            __pyx_t_21 = ((!(__pyx_t_2 != 0)) != 0);
            if (__pyx_t_21) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_20, __pyx_t_14);
              __pyx_t_3 = 0; __pyx_t_20 = 0; __pyx_t_14 = 0; 
              __PYX_ERR(0, 945, __pyx_L15_except_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            goto __pyx_L14_exception_handled;
          }
          __pyx_L15_except_error:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          goto __pyx_L1_error;
          __pyx_L14_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          __pyx_L18_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_7) {
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__39, NULL);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 945, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      goto __pyx_L48;
      __pyx_L9_error:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L1_error;
      __pyx_L48:;
    }

    /* "metaphor/monal/driver/_driver.py":991
 *                     #            ff.write("%18.15g\n"% self._dispersionMatrix[i, j])
 *                     #===========================================================
 *             return 0             # <<<<<<<<<<<<<<
 * 
 * #------------------------------------------------------------------------------
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":935
 * #         return results, restable
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase             # <<<<<<<<<<<<<<
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.DriverBase.saveParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ff);
  __Pyx_XDECREF(__pyx_v_nm);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_norm);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1024
 *     _propertyName = ""
 * 
 *     def __init__( self, source="", modeldata=None, trainable=1, modelname=None,             # <<<<<<<<<<<<<<
 *             inputs=1, outputs=1, hidden=2, activfunc="TANH", statelayer=-1,
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_modeldata = 0;
  PyObject *__pyx_v_trainable = 0;
  PyObject *__pyx_v_modelname = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_outputs = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_activfunc = 0;
  CYTHON_UNUSED PyObject *__pyx_v_statelayer = 0;
  CYTHON_UNUSED PyObject *__pyx_v_statenodeindex = 0;
  CYTHON_UNUSED PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_nosynapse = 0;
  CYTHON_UNUSED PyObject *__pyx_v_existingnode = 0;
  CYTHON_UNUSED PyObject *__pyx_v_polytype = 0;
  PyObject *__pyx_v_classif = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_datasource = 0;
  PyObject *__pyx_v_dataformat = 0;
  PyObject *__pyx_v_normalize = 0;
  PyObject *__pyx_v_weights = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwd = PyDict_New(); if (unlikely(!__pyx_v_kwd)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwd);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,&__pyx_n_s_modeldata,&__pyx_n_s_trainable,&__pyx_n_s_modelname,&__pyx_n_s_inputs,&__pyx_n_s_outputs,&__pyx_n_s_hidden,&__pyx_n_s_activfunc,&__pyx_n_s_statelayer,&__pyx_n_s_statenodeindex,&__pyx_n_s_order,&__pyx_n_s_nosynapse,&__pyx_n_s_existingnode,&__pyx_n_s_polytype,&__pyx_n_s_classif,&__pyx_n_s_verbose,&__pyx_n_s_datasource,&__pyx_n_s_dataformat,&__pyx_n_s_normalize,&__pyx_n_s_weights,0};
    PyObject* values[21] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[6] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[7] = ((PyObject *)((PyObject *)__pyx_int_2));
    values[8] = ((PyObject *)((PyObject*)__pyx_n_u_TANH));
    values[9] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[10] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[11] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[12] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[13] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[14] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "metaphor/monal/driver/_driver.py":1027
 *             inputs=1, outputs=1, hidden=2, activfunc="TANH", statelayer=-1,
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 *             classif=False, verbose=0, datasource=None, dataformat=None,             # <<<<<<<<<<<<<<
 *             normalize=False, weights=None, **kwd):
 *         super(Driver, self).__init__(verbose=verbose)
 */
    values[15] = ((PyObject *)((PyObject *)Py_False));
    values[16] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[17] = ((PyObject *)((PyObject *)Py_None));
    values[18] = ((PyObject *)((PyObject *)Py_None));

    /* "metaphor/monal/driver/_driver.py":1028
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 *             classif=False, verbose=0, datasource=None, dataformat=None,
 *             normalize=False, weights=None, **kwd):             # <<<<<<<<<<<<<<
 *         super(Driver, self).__init__(verbose=verbose)
 *         follow = None
 */
    values[19] = ((PyObject *)((PyObject *)Py_False));
    values[20] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        CYTHON_FALLTHROUGH;
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modeldata);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_trainable);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelname);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_activfunc);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statelayer);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statenodeindex);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_order);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nosynapse);
          if (value) { values[12] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_existingnode);
          if (value) { values[13] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_polytype);
          if (value) { values[14] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classif);
          if (value) { values[15] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 16:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[16] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 17:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datasource);
          if (value) { values[17] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 18:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataformat);
          if (value) { values[18] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 19:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[19] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 20:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[20] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwd, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1024, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        CYTHON_FALLTHROUGH;
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
    __pyx_v_modeldata = values[2];
    __pyx_v_trainable = values[3];
    __pyx_v_modelname = values[4];
    __pyx_v_inputs = values[5];
    __pyx_v_outputs = values[6];
    __pyx_v_hidden = values[7];
    __pyx_v_activfunc = values[8];
    __pyx_v_statelayer = values[9];
    __pyx_v_statenodeindex = values[10];
    __pyx_v_order = values[11];
    __pyx_v_nosynapse = values[12];
    __pyx_v_existingnode = values[13];
    __pyx_v_polytype = values[14];
    __pyx_v_classif = values[15];
    __pyx_v_verbose = values[16];
    __pyx_v_datasource = values[17];
    __pyx_v_dataformat = values[18];
    __pyx_v_normalize = values[19];
    __pyx_v_weights = values[20];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 21, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1024, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwd); __pyx_v_kwd = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver___init__(__pyx_self, __pyx_v_self, __pyx_v_source, __pyx_v_modeldata, __pyx_v_trainable, __pyx_v_modelname, __pyx_v_inputs, __pyx_v_outputs, __pyx_v_hidden, __pyx_v_activfunc, __pyx_v_statelayer, __pyx_v_statenodeindex, __pyx_v_order, __pyx_v_nosynapse, __pyx_v_existingnode, __pyx_v_polytype, __pyx_v_classif, __pyx_v_verbose, __pyx_v_datasource, __pyx_v_dataformat, __pyx_v_normalize, __pyx_v_weights, __pyx_v_kwd);

  /* "metaphor/monal/driver/_driver.py":1024
 *     _propertyName = ""
 * 
 *     def __init__( self, source="", modeldata=None, trainable=1, modelname=None,             # <<<<<<<<<<<<<<
 *             inputs=1, outputs=1, hidden=2, activfunc="TANH", statelayer=-1,
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 */

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwd);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_modeldata, PyObject *__pyx_v_trainable, PyObject *__pyx_v_modelname, PyObject *__pyx_v_inputs, PyObject *__pyx_v_outputs, PyObject *__pyx_v_hidden, PyObject *__pyx_v_activfunc, CYTHON_UNUSED PyObject *__pyx_v_statelayer, CYTHON_UNUSED PyObject *__pyx_v_statenodeindex, CYTHON_UNUSED PyObject *__pyx_v_order, PyObject *__pyx_v_nosynapse, CYTHON_UNUSED PyObject *__pyx_v_existingnode, CYTHON_UNUSED PyObject *__pyx_v_polytype, PyObject *__pyx_v_classif, PyObject *__pyx_v_verbose, PyObject *__pyx_v_datasource, PyObject *__pyx_v_dataformat, PyObject *__pyx_v_normalize, PyObject *__pyx_v_weights, CYTHON_UNUSED PyObject *__pyx_v_kwd) {
  PyObject *__pyx_v_follow = NULL;
  PyObject *__pyx_v_obj = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "metaphor/monal/driver/_driver.py":1029
 *             classif=False, verbose=0, datasource=None, dataformat=None,
 *             normalize=False, weights=None, **kwd):
 *         super(Driver, self).__init__(verbose=verbose)             # <<<<<<<<<<<<<<
 *         follow = None
 * #        filename = source
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Driver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1030
 *             normalize=False, weights=None, **kwd):
 *         super(Driver, self).__init__(verbose=verbose)
 *         follow = None             # <<<<<<<<<<<<<<
 * #        filename = source
 *         self._tagname = 'MODEL'
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_follow = Py_None;

  /* "metaphor/monal/driver/_driver.py":1032
 *         follow = None
 * #        filename = source
 *         self._tagname = 'MODEL'             # <<<<<<<<<<<<<<
 *         self.trainable = trainable
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tagname, __pyx_n_u_MODEL) < 0) __PYX_ERR(0, 1032, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1033
 * #        filename = source
 *         self._tagname = 'MODEL'
 *         self.trainable = trainable             # <<<<<<<<<<<<<<
 * 
 *         self.curWeights = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_trainable, __pyx_v_trainable) < 0) __PYX_ERR(0, 1033, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1035
 *         self.trainable = trainable
 * 
 *         self.curWeights = None             # <<<<<<<<<<<<<<
 *         self.costFunction = classCostDict["deltasquare"]()
 *         if source:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curWeights, Py_None) < 0) __PYX_ERR(0, 1035, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1036
 * 
 *         self.curWeights = None
 *         self.costFunction = classCostDict["deltasquare"]()             # <<<<<<<<<<<<<<
 *         if source:
 *             try:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_classCostDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_deltasquare); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_1) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_costFunction, __pyx_t_3) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1037
 *         self.curWeights = None
 *         self.costFunction = classCostDict["deltasquare"]()
 *         if source:             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = pickle.loads(source)
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_source); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1037, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":1038
 *         self.costFunction = classCostDict["deltasquare"]()
 *         if source:
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = pickle.loads(source)
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "metaphor/monal/driver/_driver.py":1039
 *         if source:
 *             try:
 *                 obj = pickle.loads(source)             # <<<<<<<<<<<<<<
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 *                 obj = None
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pickle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (!__pyx_t_2) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_source};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L4_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_source};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L4_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1039, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
            __Pyx_INCREF(__pyx_v_source);
            __Pyx_GIVEREF(__pyx_v_source);
            PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_source);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_obj = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "metaphor/monal/driver/_driver.py":1038
 *         self.costFunction = classCostDict["deltasquare"]()
 *         if source:
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = pickle.loads(source)
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":1040
 *             try:
 *                 obj = pickle.loads(source)
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:             # <<<<<<<<<<<<<<
 *                 obj = None
 *             if not obj:
 */
      __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_1, &__pyx_t_8);
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pickle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_UnpicklingError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1040, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_9) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_builtin_KeyError) || __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_builtin_TypeError);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_3, __pyx_t_1, __pyx_t_8);
      __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_8 = 0;
      if (__pyx_t_10) {
        __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 1040, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_err = __pyx_t_1;
        /*try:*/ {

          /* "metaphor/monal/driver/_driver.py":1041
 *                 obj = pickle.loads(source)
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 *                 obj = None             # <<<<<<<<<<<<<<
 *             if not obj:
 *                 obj = importXML(self, source, quiet=True)
 */
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_obj, Py_None);
        }

        /* "metaphor/monal/driver/_driver.py":1040
 *             try:
 *                 obj = pickle.loads(source)
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:             # <<<<<<<<<<<<<<
 *                 obj = None
 *             if not obj:
 */
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err);
            __pyx_v_err = NULL;
            goto __pyx_L16;
          }
          __pyx_L16:;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "metaphor/monal/driver/_driver.py":1038
 *         self.costFunction = classCostDict["deltasquare"]()
 *         if source:
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = pickle.loads(source)
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 */
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L9_try_end:;
    }

    /* "metaphor/monal/driver/_driver.py":1042
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 *                 obj = None
 *             if not obj:             # <<<<<<<<<<<<<<
 *                 obj = importXML(self, source, quiet=True)
 *             if obj:
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __pyx_t_11 = ((!__pyx_t_4) != 0);
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":1043
 *                 obj = None
 *             if not obj:
 *                 obj = importXML(self, source, quiet=True)             # <<<<<<<<<<<<<<
 *             if obj:
 *                 if isinstance(obj, list) and len(obj) == 2:
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_importXML); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
      __Pyx_INCREF(__pyx_v_source);
      __Pyx_GIVEREF(__pyx_v_source);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_source);
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_quiet, Py_True) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1042
 *             except (pickle.UnpicklingError, KeyError, TypeError) as err:
 *                 obj = None
 *             if not obj:             # <<<<<<<<<<<<<<
 *                 obj = importXML(self, source, quiet=True)
 *             if obj:
 */
    }

    /* "metaphor/monal/driver/_driver.py":1044
 *             if not obj:
 *                 obj = importXML(self, source, quiet=True)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 if isinstance(obj, list) and len(obj) == 2:
 *                     follow = obj[1]
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1044, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":1045
 *                 obj = importXML(self, source, quiet=True)
 *             if obj:
 *                 if isinstance(obj, list) and len(obj) == 2:             # <<<<<<<<<<<<<<
 *                     follow = obj[1]
 *                     obj = obj[0]
 */
      __pyx_t_4 = PyList_Check(__pyx_v_obj); 
      __pyx_t_12 = (__pyx_t_4 != 0);
      if (__pyx_t_12) {
      } else {
        __pyx_t_11 = __pyx_t_12;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_13 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1045, __pyx_L1_error)
      __pyx_t_12 = ((__pyx_t_13 == 2) != 0);
      __pyx_t_11 = __pyx_t_12;
      __pyx_L20_bool_binop_done:;
      if (__pyx_t_11) {

        /* "metaphor/monal/driver/_driver.py":1046
 *             if obj:
 *                 if isinstance(obj, list) and len(obj) == 2:
 *                     follow = obj[1]             # <<<<<<<<<<<<<<
 *                     obj = obj[0]
 *                     #if isinstance(follow, ")
 */
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_obj, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF_SET(__pyx_v_follow, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":1047
 *                 if isinstance(obj, list) and len(obj) == 2:
 *                     follow = obj[1]
 *                     obj = obj[0]             # <<<<<<<<<<<<<<
 *                     #if isinstance(follow, ")
 *                 self.splitModel(obj)
 */
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_obj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":1045
 *                 obj = importXML(self, source, quiet=True)
 *             if obj:
 *                 if isinstance(obj, list) and len(obj) == 2:             # <<<<<<<<<<<<<<
 *                     follow = obj[1]
 *                     obj = obj[0]
 */
      }

      /* "metaphor/monal/driver/_driver.py":1049
 *                     obj = obj[0]
 *                     #if isinstance(follow, ")
 *                 self.splitModel(obj)             # <<<<<<<<<<<<<<
 * #                 if disp:
 * #                     sys.stderr.write('\nInformation: model loading from {0}\n'.format(filename))
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_splitModel); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_obj};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_9);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_obj};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_9);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
          __Pyx_INCREF(__pyx_v_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_obj);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1044
 *             if not obj:
 *                 obj = importXML(self, source, quiet=True)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 if isinstance(obj, list) and len(obj) == 2:
 *                     follow = obj[1]
 */
      goto __pyx_L18;
    }

    /* "metaphor/monal/driver/_driver.py":1053
 * #                     sys.stderr.write('\nInformation: model loading from {0}\n'.format(filename))
 *             else:  # importation XML ratee
 *                 self.mainModel = Multimodel(self, filename=source)             # <<<<<<<<<<<<<<
 * #                 if self.mainModel and disp:
 * #                     sys.stderr.write('\nInformation: multimodel loading from {0}\n'.format( filename))
 */
    /*else*/ {
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Multimodel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_filename, __pyx_v_source) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, __pyx_t_1) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L18:;

    /* "metaphor/monal/driver/_driver.py":1056
 * #                 if self.mainModel and disp:
 * #                     sys.stderr.write('\nInformation: multimodel loading from {0}\n'.format( filename))
 *             if follow:             # <<<<<<<<<<<<<<
 *                 if isinstance(follow, OutputProc):
 *                     self._dispersionMatrix = follow.dispersionMatrix
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_follow); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":1057
 * #                     sys.stderr.write('\nInformation: multimodel loading from {0}\n'.format( filename))
 *             if follow:
 *                 if isinstance(follow, OutputProc):             # <<<<<<<<<<<<<<
 *                     self._dispersionMatrix = follow.dispersionMatrix
 *                     self._stdtrain = follow.trainingStDev
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OutputProc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = PyObject_IsInstance(__pyx_v_follow, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_12 = (__pyx_t_11 != 0);
      if (__pyx_t_12) {

        /* "metaphor/monal/driver/_driver.py":1058
 *             if follow:
 *                 if isinstance(follow, OutputProc):
 *                     self._dispersionMatrix = follow.dispersionMatrix             # <<<<<<<<<<<<<<
 *                     self._stdtrain = follow.trainingStDev
 *                     self._studentvariable = follow.student95
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_follow, __pyx_n_s_dispersionMatrix_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_t_1) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/monal/driver/_driver.py":1059
 *                 if isinstance(follow, OutputProc):
 *                     self._dispersionMatrix = follow.dispersionMatrix
 *                     self._stdtrain = follow.trainingStDev             # <<<<<<<<<<<<<<
 *                     self._studentvariable = follow.student95
 *                     self._mu = follow.mu
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_follow, __pyx_n_s_trainingStDev); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain, __pyx_t_1) < 0) __PYX_ERR(0, 1059, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/monal/driver/_driver.py":1060
 *                     self._dispersionMatrix = follow.dispersionMatrix
 *                     self._stdtrain = follow.trainingStDev
 *                     self._studentvariable = follow.student95             # <<<<<<<<<<<<<<
 *                     self._mu = follow.mu
 *                     #self.outputProcs = [follow]
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_follow, __pyx_n_s_student95); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable, __pyx_t_1) < 0) __PYX_ERR(0, 1060, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/monal/driver/_driver.py":1061
 *                     self._stdtrain = follow.trainingStDev
 *                     self._studentvariable = follow.student95
 *                     self._mu = follow.mu             # <<<<<<<<<<<<<<
 *                     #self.outputProcs = [follow]
 *             pass
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_follow, __pyx_n_s_mu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mu_2, __pyx_t_1) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/monal/driver/_driver.py":1057
 * #                     sys.stderr.write('\nInformation: multimodel loading from {0}\n'.format( filename))
 *             if follow:
 *                 if isinstance(follow, OutputProc):             # <<<<<<<<<<<<<<
 *                     self._dispersionMatrix = follow.dispersionMatrix
 *                     self._stdtrain = follow.trainingStDev
 */
      }

      /* "metaphor/monal/driver/_driver.py":1056
 * #                 if self.mainModel and disp:
 * #                     sys.stderr.write('\nInformation: multimodel loading from {0}\n'.format( filename))
 *             if follow:             # <<<<<<<<<<<<<<
 *                 if isinstance(follow, OutputProc):
 *                     self._dispersionMatrix = follow.dispersionMatrix
 */
    }

    /* "metaphor/monal/driver/_driver.py":1037
 *         self.curWeights = None
 *         self.costFunction = classCostDict["deltasquare"]()
 *         if source:             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = pickle.loads(source)
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1064
 *                     #self.outputProcs = [follow]
 *             pass
 *         elif modeldata or outputs:             # <<<<<<<<<<<<<<
 *             self.mainModel = self._createModel(self, modelname=modelname,
 *                 inputs=inputs, outputs=outputs, hidden=hidden,
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_modeldata); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1064, __pyx_L1_error)
  if (!__pyx_t_11) {
  } else {
    __pyx_t_12 = __pyx_t_11;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_outputs); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_11;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_12) {

    /* "metaphor/monal/driver/_driver.py":1065
 *             pass
 *         elif modeldata or outputs:
 *             self.mainModel = self._createModel(self, modelname=modelname,             # <<<<<<<<<<<<<<
 *                 inputs=inputs, outputs=outputs, hidden=hidden,
 *                 activfunc=activfunc, modelData=modeldata,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_createModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_modelname, __pyx_v_modelname) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1066
 *         elif modeldata or outputs:
 *             self.mainModel = self._createModel(self, modelname=modelname,
 *                 inputs=inputs, outputs=outputs, hidden=hidden,             # <<<<<<<<<<<<<<
 *                 activfunc=activfunc, modelData=modeldata,
 *                 classif=classif, nosynapse=nosynapse, verbose=verbose)
 */
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_inputs, __pyx_v_inputs) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_outputs, __pyx_v_outputs) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_hidden, __pyx_v_hidden) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1067
 *             self.mainModel = self._createModel(self, modelname=modelname,
 *                 inputs=inputs, outputs=outputs, hidden=hidden,
 *                 activfunc=activfunc, modelData=modeldata,             # <<<<<<<<<<<<<<
 *                 classif=classif, nosynapse=nosynapse, verbose=verbose)
 *             self.name = self.mainModel.name
 */
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_activfunc, __pyx_v_activfunc) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_modelData, __pyx_v_modeldata) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1068
 *                 inputs=inputs, outputs=outputs, hidden=hidden,
 *                 activfunc=activfunc, modelData=modeldata,
 *                 classif=classif, nosynapse=nosynapse, verbose=verbose)             # <<<<<<<<<<<<<<
 *             self.name = self.mainModel.name
 *         else:
 */
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_classif, __pyx_v_classif) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_nosynapse, __pyx_v_nosynapse) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1065
 *             pass
 *         elif modeldata or outputs:
 *             self.mainModel = self._createModel(self, modelname=modelname,             # <<<<<<<<<<<<<<
 *                 inputs=inputs, outputs=outputs, hidden=hidden,
 *                 activfunc=activfunc, modelData=modeldata,
 */
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, __pyx_t_9) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":1069
 *                 activfunc=activfunc, modelData=modeldata,
 *                 classif=classif, nosynapse=nosynapse, verbose=verbose)
 *             self.name = self.mainModel.name             # <<<<<<<<<<<<<<
 *         else:
 *             self.mainModel = None
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_t_8) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":1064
 *                     #self.outputProcs = [follow]
 *             pass
 *         elif modeldata or outputs:             # <<<<<<<<<<<<<<
 *             self.mainModel = self._createModel(self, modelname=modelname,
 *                 inputs=inputs, outputs=outputs, hidden=hidden,
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1071
 *             self.name = self.mainModel.name
 *         else:
 *             self.mainModel = None             # <<<<<<<<<<<<<<
 *         if not self.checkModel():
 *             self.mainModel = None
 */
  /*else*/ {
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, Py_None) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1072
 *         else:
 *             self.mainModel = None
 *         if not self.checkModel():             # <<<<<<<<<<<<<<
 *             self.mainModel = None
 *             return
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1072, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = ((!__pyx_t_12) != 0);
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":1073
 *             self.mainModel = None
 *         if not self.checkModel():
 *             self.mainModel = None             # <<<<<<<<<<<<<<
 *             return
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, Py_None) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1074
 *         if not self.checkModel():
 *             self.mainModel = None
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if datasource and self.mainModel:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1072
 *         else:
 *             self.mainModel = None
 *         if not self.checkModel():             # <<<<<<<<<<<<<<
 *             self.mainModel = None
 *             return
 */
  }

  /* "metaphor/monal/driver/_driver.py":1076
 *             return
 * 
 *         if datasource and self.mainModel:             # <<<<<<<<<<<<<<
 *             self.loadTrainingData(datasource=open(datasource), dataformat=dataformat)
 *             if verbose >= 3:
 */
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_datasource); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1076, __pyx_L1_error)
  if (__pyx_t_12) {
  } else {
    __pyx_t_11 = __pyx_t_12;
    goto __pyx_L28_bool_binop_done;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = __pyx_t_12;
  __pyx_L28_bool_binop_done:;
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":1077
 * 
 *         if datasource and self.mainModel:
 *             self.loadTrainingData(datasource=open(datasource), dataformat=dataformat)             # <<<<<<<<<<<<<<
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadTrainingData); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_datasource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_datasource, __pyx_t_3) < 0) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dataformat, __pyx_v_dataformat) < 0) __PYX_ERR(0, 1077, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1078
 *         if datasource and self.mainModel:
 *             self.loadTrainingData(datasource=open(datasource), dataformat=dataformat)
 *             if verbose >= 3:             # <<<<<<<<<<<<<<
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))
 *             if normalize:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":1079
 *             self.loadTrainingData(datasource=open(datasource), dataformat=dataformat)
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))             # <<<<<<<<<<<<<<
 *             if normalize:
 *                 self.normalizeModel()
 */
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_data_loaded_from, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_datasource); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_datasource};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_datasource};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_datasource);
          __Pyx_GIVEREF(__pyx_v_datasource);
          PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_datasource);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_8};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_8};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL;
          __Pyx_GIVEREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":1078
 *         if datasource and self.mainModel:
 *             self.loadTrainingData(datasource=open(datasource), dataformat=dataformat)
 *             if verbose >= 3:             # <<<<<<<<<<<<<<
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))
 *             if normalize:
 */
    }

    /* "metaphor/monal/driver/_driver.py":1080
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))
 *             if normalize:             # <<<<<<<<<<<<<<
 *                 self.normalizeModel()
 *                 if verbose >= 3:
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_normalize); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1080, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":1081
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))
 *             if normalize:
 *                 self.normalizeModel()             # <<<<<<<<<<<<<<
 *                 if verbose >= 3:
 *                     sys.stderr.write('Information: data normalized\n')
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1081, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (__pyx_t_14) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else {
        __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":1082
 *             if normalize:
 *                 self.normalizeModel()
 *                 if verbose >= 3:             # <<<<<<<<<<<<<<
 *                     sys.stderr.write('Information: data normalized\n')
 *         if weights:
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1082, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_11) {

        /* "metaphor/monal/driver/_driver.py":1083
 *                 self.normalizeModel()
 *                 if verbose >= 3:
 *                     sys.stderr.write('Information: data normalized\n')             # <<<<<<<<<<<<<<
 *         if weights:
 *             self.loadParameters(weights)
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":1082
 *             if normalize:
 *                 self.normalizeModel()
 *                 if verbose >= 3:             # <<<<<<<<<<<<<<
 *                     sys.stderr.write('Information: data normalized\n')
 *         if weights:
 */
      }

      /* "metaphor/monal/driver/_driver.py":1080
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: data loaded from {}\n' .format(datasource))
 *             if normalize:             # <<<<<<<<<<<<<<
 *                 self.normalizeModel()
 *                 if verbose >= 3:
 */
    }

    /* "metaphor/monal/driver/_driver.py":1076
 *             return
 * 
 *         if datasource and self.mainModel:             # <<<<<<<<<<<<<<
 *             self.loadTrainingData(datasource=open(datasource), dataformat=dataformat)
 *             if verbose >= 3:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1084
 *                 if verbose >= 3:
 *                     sys.stderr.write('Information: data normalized\n')
 *         if weights:             # <<<<<<<<<<<<<<
 *             self.loadParameters(weights)
 *             if verbose >= 3:
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_weights); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1084, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":1085
 *                     sys.stderr.write('Information: data normalized\n')
 *         if weights:
 *             self.loadParameters(weights)             # <<<<<<<<<<<<<<
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: weights loaded from {0}\n'.format(weights))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadParameters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_14) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_weights); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1085, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_weights};
        __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1085, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_weights};
        __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1085, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
        __Pyx_INCREF(__pyx_v_weights);
        __Pyx_GIVEREF(__pyx_v_weights);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_weights);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":1086
 *         if weights:
 *             self.loadParameters(weights)
 *             if verbose >= 3:             # <<<<<<<<<<<<<<
 *                 sys.stderr.write('Information: weights loaded from {0}\n'.format(weights))
 *         return
 */
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1086, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":1087
 *             self.loadParameters(weights)
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: weights loaded from {0}\n'.format(weights))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_weights_loaded_from, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_14, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_weights); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_weights};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_weights};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
          __Pyx_INCREF(__pyx_v_weights);
          __Pyx_GIVEREF(__pyx_v_weights);
          PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_weights);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_14) {
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_8};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_8};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
          __Pyx_GIVEREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1086
 *         if weights:
 *             self.loadParameters(weights)
 *             if verbose >= 3:             # <<<<<<<<<<<<<<
 *                 sys.stderr.write('Information: weights loaded from {0}\n'.format(weights))
 *         return
 */
    }

    /* "metaphor/monal/driver/_driver.py":1084
 *                 if verbose >= 3:
 *                     sys.stderr.write('Information: data normalized\n')
 *         if weights:             # <<<<<<<<<<<<<<
 *             self.loadParameters(weights)
 *             if verbose >= 3:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1088
 *             if verbose >= 3:
 *                 sys.stderr.write('Information: weights loaded from {0}\n'.format(weights))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __del__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1024
 *     _propertyName = ""
 * 
 *     def __init__( self, source="", modeldata=None, trainable=1, modelname=None,             # <<<<<<<<<<<<<<
 *             inputs=1, outputs=1, hidden=2, activfunc="TANH", statelayer=-1,
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_follow);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1090
 *         return
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         #self._codeWriter = None
 *         super(Driver, self).__del__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_3__del__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_3__del__ = {"__del__", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_3__del__, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_3__del__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_2__del__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_2__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__del__", 0);

  /* "metaphor/monal/driver/_driver.py":1092
 *     def __del__(self):
 *         #self._codeWriter = None
 *         super(Driver, self).__del__()             # <<<<<<<<<<<<<<
 * 
 *     def setPseudoMatrix(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Driver); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_del); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1090
 *         return
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         #self._codeWriter = None
 *         super(Driver, self).__del__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1094
 *         super(Driver, self).__del__()
 * 
 *     def setPseudoMatrix(self):             # <<<<<<<<<<<<<<
 *         self.mainModelMaster = self.mainModel
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_5setPseudoMatrix(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_5setPseudoMatrix = {"setPseudoMatrix", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_5setPseudoMatrix, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_5setPseudoMatrix(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setPseudoMatrix (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_4setPseudoMatrix(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_4setPseudoMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("setPseudoMatrix", 0);

  /* "metaphor/monal/driver/_driver.py":1095
 * 
 *     def setPseudoMatrix(self):
 *         self.mainModelMaster = self.mainModel             # <<<<<<<<<<<<<<
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModelMaster, __pyx_t_1) < 0) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1096
 *     def setPseudoMatrix(self):
 *         self.mainModelMaster = self.mainModel
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)             # <<<<<<<<<<<<<<
 * 
 *     def setWeights(self, weights):  # Driver
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PseudoMatrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModelMaster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_master, __pyx_t_3) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, __pyx_t_3) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1094
 *         super(Driver, self).__del__()
 * 
 *     def setPseudoMatrix(self):             # <<<<<<<<<<<<<<
 *         self.mainModelMaster = self.mainModel
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setPseudoMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1098
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 * 
 *     def setWeights(self, weights):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.setWeights(weights)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_7setWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_7setWeights = {"setWeights", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_7setWeights, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_7setWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setWeights (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setWeights", 1, 2, 2, 1); __PYX_ERR(0, 1098, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWeights") < 0)) __PYX_ERR(0, 1098, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setWeights", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1098, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_6setWeights(__pyx_self, __pyx_v_self, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_6setWeights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("setWeights", 0);

  /* "metaphor/monal/driver/_driver.py":1099
 * 
 *     def setWeights(self, weights):  # Driver
 *         self.mainModel.setWeights(weights)             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_weights);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1098
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 * 
 *     def setWeights(self, weights):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.setWeights(weights)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1102
 * 
 *     @Property
 *     def trainable(self):             # <<<<<<<<<<<<<<
 *         return self._trainable
 *     @trainable.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_9trainable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_9trainable = {"trainable", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_9trainable, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_9trainable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainable (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_8trainable(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_8trainable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("trainable", 0);

  /* "metaphor/monal/driver/_driver.py":1103
 *     @Property
 *     def trainable(self):
 *         return self._trainable             # <<<<<<<<<<<<<<
 *     @trainable.setter
 *     def trainable(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trainable_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1102
 * 
 *     @Property
 *     def trainable(self):             # <<<<<<<<<<<<<<
 *         return self._trainable
 *     @trainable.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.trainable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1105
 *         return self._trainable
 *     @trainable.setter
 *     def trainable(self, value):             # <<<<<<<<<<<<<<
 *         self._trainable = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_11trainable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_11trainable = {"trainable", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_11trainable, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_11trainable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainable (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("trainable", 1, 2, 2, 1); __PYX_ERR(0, 1105, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trainable") < 0)) __PYX_ERR(0, 1105, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("trainable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1105, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.trainable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_10trainable(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_10trainable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainable", 0);

  /* "metaphor/monal/driver/_driver.py":1106
 *     @trainable.setter
 *     def trainable(self, value):
 *         self._trainable = value             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_trainable_2, __pyx_v_value) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1105
 *         return self._trainable
 *     @trainable.setter
 *     def trainable(self, value):             # <<<<<<<<<<<<<<
 *         self._trainable = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.trainable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1109
 * 
 *     @Property
 *     def inputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_13inputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_13inputs = {"inputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_13inputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_13inputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputs", 1, 2, 2, 1); __PYX_ERR(0, 1109, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputs") < 0)) __PYX_ERR(0, 1109, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_12inputs(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_12inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("inputs", 0);

  /* "metaphor/monal/driver/_driver.py":1110
 *     @Property
 *     def inputs(self, index):  # Driver
 *         val = self.mainModel.inputs[index]             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             return val * self.inNormModel.data[index, 0] + self.inNormModel.data[index, 1]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_val = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1111
 *     def inputs(self, index):  # Driver
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             return val * self.inNormModel.data[index, 0] + self.inNormModel.data[index, 1]
 *         return val
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1112
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:
 *             return val * self.inNormModel.data[index, 0] + self.inNormModel.data[index, 1]             # <<<<<<<<<<<<<<
 *         return val
 *     @inputs.lengetter
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_index);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_0);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Multiply(__pyx_v_val, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_index);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1111
 *     def inputs(self, index):  # Driver
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             return val * self.inNormModel.data[index, 0] + self.inNormModel.data[index, 1]
 *         return val
 */
  }

  /* "metaphor/monal/driver/_driver.py":1113
 *         if self.inNormModel:
 *             return val * self.inNormModel.data[index, 0] + self.inNormModel.data[index, 1]
 *         return val             # <<<<<<<<<<<<<<
 *     @inputs.lengetter
 *     def inputs(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1109
 * 
 *     @Property
 *     def inputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1115
 *         return val
 *     @inputs.lengetter
 *     def inputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.inputCount
 *     @inputs.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_15inputs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_15inputs = {"inputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_15inputs, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_15inputs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputs (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_14inputs(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_14inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("inputs", 0);

  /* "metaphor/monal/driver/_driver.py":1116
 *     @inputs.lengetter
 *     def inputs(self):  # Driver
 *         return self.inputCount             # <<<<<<<<<<<<<<
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1115
 *         return val
 *     @inputs.lengetter
 *     def inputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.inputCount
 *     @inputs.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1118
 *         return self.inputCount
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_17inputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_17inputs = {"inputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_17inputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_17inputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputs", 1, 3, 3, 1); __PYX_ERR(0, 1118, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputs", 1, 3, 3, 2); __PYX_ERR(0, 1118, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputs") < 0)) __PYX_ERR(0, 1118, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputs", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1118, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_16inputs(__pyx_self, __pyx_v_self, __pyx_v_index, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_16inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("inputs", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "metaphor/monal/driver/_driver.py":1119
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 *         self.mainModel.inputs[index].value = value
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1120
 *     def inputs(self, index, value):  # Driver
 *         if self.inNormModel:
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]             # <<<<<<<<<<<<<<
 *         self.mainModel.inputs[index].value = value
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_index);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_1);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_value, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_index);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1119
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 *         self.mainModel.inputs[index].value = value
 */
  }

  /* "metaphor/monal/driver/_driver.py":1121
 *         if self.inNormModel:
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 *         self.mainModel.inputs[index].value = value             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1118
 *         return self.inputCount
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1124
 * 
 *     @Property
 *     def outputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19outputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_19outputs = {"outputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19outputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19outputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outputs", 1, 2, 2, 1); __PYX_ERR(0, 1124, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outputs") < 0)) __PYX_ERR(0, 1124, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outputs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1124, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_18outputs(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_18outputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("outputs", 0);

  /* "metaphor/monal/driver/_driver.py":1125
 *     @Property
 *     def outputs(self, index):  # Driver
 *         val = self.mainModel.outputs[index]             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_val = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1126
 *     def outputs(self, index):  # Driver
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             if self.outNormModel.data.ndim == 2:
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1127
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:             # <<<<<<<<<<<<<<
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]
 *             return val * self.outNormModel.data[0] + self.outNormModel.data[1]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":1128
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]             # <<<<<<<<<<<<<<
 *             return val * self.outNormModel.data[0] + self.outNormModel.data[1]
 *         return val
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_index);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Multiply(__pyx_v_val, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_index);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":1127
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:             # <<<<<<<<<<<<<<
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]
 *             return val * self.outNormModel.data[0] + self.outNormModel.data[1]
 */
    }

    /* "metaphor/monal/driver/_driver.py":1129
 *             if self.outNormModel.data.ndim == 2:
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]
 *             return val * self.outNormModel.data[0] + self.outNormModel.data[1]             # <<<<<<<<<<<<<<
 *         return val
 *     @outputs.lengetter
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_val, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1126
 *     def outputs(self, index):  # Driver
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             if self.outNormModel.data.ndim == 2:
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]
 */
  }

  /* "metaphor/monal/driver/_driver.py":1130
 *                 return val * self.outNormModel.data[index, 0] + self.outNormModel.data[index, 1]
 *             return val * self.outNormModel.data[0] + self.outNormModel.data[1]
 *         return val             # <<<<<<<<<<<<<<
 *     @outputs.lengetter
 *     def outputs(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1124
 * 
 *     @Property
 *     def outputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1132
 *         return val
 *     @outputs.lengetter
 *     def outputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 *     @outputs.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_21outputs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_21outputs = {"outputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_21outputs, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_21outputs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputs (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_20outputs(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_20outputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("outputs", 0);

  /* "metaphor/monal/driver/_driver.py":1133
 *     @outputs.lengetter
 *     def outputs(self):  # Driver
 *         return self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1132
 *         return val
 *     @outputs.lengetter
 *     def outputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 *     @outputs.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1135
 *         return self.mainModel.outputCount
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_23outputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_23outputs = {"outputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_23outputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_23outputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outputs", 1, 3, 3, 1); __PYX_ERR(0, 1135, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outputs", 1, 3, 3, 2); __PYX_ERR(0, 1135, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outputs") < 0)) __PYX_ERR(0, 1135, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outputs", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1135, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_22outputs(__pyx_self, __pyx_v_self, __pyx_v_index, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_22outputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("outputs", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "metaphor/monal/driver/_driver.py":1136
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             if self.outNormModel.data.ndim == 2:
 *                 value = (value - self.outNormModel.data[index, 1]) / self.outNormModel.data[index, 0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1137
 *     def outputs(self, index, value):  # Driver
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:             # <<<<<<<<<<<<<<
 *                 value = (value - self.outNormModel.data[index, 1]) / self.outNormModel.data[index, 0]
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":1138
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 *                 value = (value - self.outNormModel.data[index, 1]) / self.outNormModel.data[index, 0]             # <<<<<<<<<<<<<<
 *             else:
 *                 value = (value - self.outNormModel.data[1]) / self.outNormModel.data[0]
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Subtract(__pyx_v_value, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_index);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":1137
 *     def outputs(self, index, value):  # Driver
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:             # <<<<<<<<<<<<<<
 *                 value = (value - self.outNormModel.data[index, 1]) / self.outNormModel.data[index, 0]
 *             else:
 */
      goto __pyx_L4;
    }

    /* "metaphor/monal/driver/_driver.py":1140
 *                 value = (value - self.outNormModel.data[index, 1]) / self.outNormModel.data[index, 0]
 *             else:
 *                 value = (value - self.outNormModel.data[1]) / self.outNormModel.data[0]             # <<<<<<<<<<<<<<
 *         self.mainModel.outputs[index].value = value
 * 
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Subtract(__pyx_v_value, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L4:;

    /* "metaphor/monal/driver/_driver.py":1136
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             if self.outNormModel.data.ndim == 2:
 *                 value = (value - self.outNormModel.data[index, 1]) / self.outNormModel.data[index, 0]
 */
  }

  /* "metaphor/monal/driver/_driver.py":1141
 *             else:
 *                 value = (value - self.outNormModel.data[1]) / self.outNormModel.data[0]
 *         self.mainModel.outputs[index].value = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1135
 *         return self.mainModel.outputCount
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1145
 * 
 *     @Property
 *     def propertyName(self):             # <<<<<<<<<<<<<<
 *         val = ""
 *         if self._propertyName:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_25propertyName(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_25propertyName = {"propertyName", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_25propertyName, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_25propertyName(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("propertyName (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_24propertyName(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_24propertyName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("propertyName", 0);

  /* "metaphor/monal/driver/_driver.py":1146
 *     @Property
 *     def propertyName(self):
 *         val = ""             # <<<<<<<<<<<<<<
 *         if self._propertyName:
 *             val = self._propertyName
 */
  __Pyx_INCREF(__pyx_kp_u__2);
  __pyx_v_val = __pyx_kp_u__2;

  /* "metaphor/monal/driver/_driver.py":1147
 *     def propertyName(self):
 *         val = ""
 *         if self._propertyName:             # <<<<<<<<<<<<<<
 *             val = self._propertyName
 *         elif self.mainModel.outputCount==1:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1148
 *         val = ""
 *         if self._propertyName:
 *             val = self._propertyName             # <<<<<<<<<<<<<<
 *         elif self.mainModel.outputCount==1:
 *             val = self.mainModel.outputNames[0]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1147
 *     def propertyName(self):
 *         val = ""
 *         if self._propertyName:             # <<<<<<<<<<<<<<
 *             val = self._propertyName
 *         elif self.mainModel.outputCount==1:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1149
 *         if self._propertyName:
 *             val = self._propertyName
 *         elif self.mainModel.outputCount==1:             # <<<<<<<<<<<<<<
 *             val = self.mainModel.outputNames[0]
 *         return val
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1150
 *             val = self._propertyName
 *         elif self.mainModel.outputCount==1:
 *             val = self.mainModel.outputNames[0]             # <<<<<<<<<<<<<<
 *         return val
 *     @propertyName.setter
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1149
 *         if self._propertyName:
 *             val = self._propertyName
 *         elif self.mainModel.outputCount==1:             # <<<<<<<<<<<<<<
 *             val = self.mainModel.outputNames[0]
 *         return val
 */
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1151
 *         elif self.mainModel.outputCount==1:
 *             val = self.mainModel.outputNames[0]
 *         return val             # <<<<<<<<<<<<<<
 *     @propertyName.setter
 *     def propertyName(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1145
 * 
 *     @Property
 *     def propertyName(self):             # <<<<<<<<<<<<<<
 *         val = ""
 *         if self._propertyName:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.propertyName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1153
 *         return val
 *     @propertyName.setter
 *     def propertyName(self, value):             # <<<<<<<<<<<<<<
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_27propertyName(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_27propertyName = {"propertyName", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_27propertyName, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_27propertyName(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("propertyName (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("propertyName", 1, 2, 2, 1); __PYX_ERR(0, 1153, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "propertyName") < 0)) __PYX_ERR(0, 1153, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("propertyName", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1153, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.propertyName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_26propertyName(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_26propertyName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("propertyName", 0);

  /* "metaphor/monal/driver/_driver.py":1154
 *     @propertyName.setter
 *     def propertyName(self, value):
 *         self._propertyName = value             # <<<<<<<<<<<<<<
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:
 *             self.mainModel.outputNames[0] = value
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_3, __pyx_v_value) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1155
 *     def propertyName(self, value):
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:             # <<<<<<<<<<<<<<
 *             self.mainModel.outputNames[0] = value
 * 
 */
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_u_mainModel); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1155, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1156
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:
 *             self.mainModel.outputNames[0] = value             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_SetItemInt(__pyx_t_5, 0, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1155
 *     def propertyName(self, value):
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:             # <<<<<<<<<<<<<<
 *             self.mainModel.outputNames[0] = value
 * 
 */
  }

  /* "metaphor/monal/driver/_driver.py":1153
 *         return val
 *     @propertyName.setter
 *     def propertyName(self, value):             # <<<<<<<<<<<<<<
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.propertyName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1159
 * 
 *     @Property
 *     def extendedInputCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.extendedInputCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_29extendedInputCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_29extendedInputCount = {"extendedInputCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_29extendedInputCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_29extendedInputCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extendedInputCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_28extendedInputCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_28extendedInputCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("extendedInputCount", 0);

  /* "metaphor/monal/driver/_driver.py":1160
 *     @Property
 *     def extendedInputCount(self):
 *         return self.mainModel.extendedInputCount             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_extendedInputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1159
 * 
 *     @Property
 *     def extendedInputCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.extendedInputCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.extendedInputCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1163
 * 
 *     @Property
 *     def inputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.inputCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_31inputCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_31inputCount = {"inputCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_31inputCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_31inputCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_30inputCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_30inputCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("inputCount", 0);

  /* "metaphor/monal/driver/_driver.py":1164
 *     @Property
 *     def inputCount(self):  # Driver
 *         return self.mainModel.inputCount             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1163
 * 
 *     @Property
 *     def inputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.inputCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1167
 * 
 *     @Property
 *     def outputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_33outputCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_33outputCount = {"outputCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_33outputCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_33outputCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_32outputCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_32outputCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("outputCount", 0);

  /* "metaphor/monal/driver/_driver.py":1168
 *     @Property
 *     def outputCount(self):  # Driver
 *         return self.mainModel.outputCount             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1167
 * 
 *     @Property
 *     def outputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1171
 * 
 *     @Property
 *     def paramCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.paramCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_35paramCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_35paramCount = {"paramCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_35paramCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_35paramCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("paramCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_34paramCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_34paramCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("paramCount", 0);

  /* "metaphor/monal/driver/_driver.py":1172
 *     @Property
 *     def paramCount(self):  # Driver
 *         return self.mainModel.paramCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1171
 * 
 *     @Property
 *     def paramCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.paramCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.paramCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1175
 * 
 *     @property
 *     def longParamCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.longParamCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_37longParamCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_37longParamCount = {"longParamCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_37longParamCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_37longParamCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("longParamCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_36longParamCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_36longParamCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("longParamCount", 0);

  /* "metaphor/monal/driver/_driver.py":1176
 *     @property
 *     def longParamCount(self):
 *         return self.mainModel.longParamCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_longParamCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1175
 * 
 *     @property
 *     def longParamCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.longParamCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.longParamCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1179
 * 
 *     @property
 *     def useLongParams(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.useLongParams
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_39useLongParams(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_39useLongParams = {"useLongParams", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_39useLongParams, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_39useLongParams(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("useLongParams (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_38useLongParams(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_38useLongParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("useLongParams", 0);

  /* "metaphor/monal/driver/_driver.py":1180
 *     @property
 *     def useLongParams(self):
 *         return self.mainModel.useLongParams             # <<<<<<<<<<<<<<
 * 
 *     def gettargets(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_useLongParams); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1179
 * 
 *     @property
 *     def useLongParams(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.useLongParams
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.useLongParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1182
 *         return self.mainModel.useLongParams
 * 
 *     def gettargets(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.targets
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_41gettargets(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_41gettargets = {"gettargets", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_41gettargets, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_41gettargets(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gettargets (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_40gettargets(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_40gettargets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("gettargets", 0);

  /* "metaphor/monal/driver/_driver.py":1183
 * 
 *     def gettargets(self):  # Driver
 *         return self.mainModel.targets             # <<<<<<<<<<<<<<
 * 
 *     def getlastresiduals(self, curw=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_targets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1182
 *         return self.mainModel.useLongParams
 * 
 *     def gettargets(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.targets
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.gettargets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1185
 *         return self.mainModel.targets
 * 
 *     def getlastresiduals(self, curw=None):  # Driver             # <<<<<<<<<<<<<<
 *         return self._outputs - self.mainModel.targets
 * #    getresiduals = getlastresiduals
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_43getlastresiduals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_43getlastresiduals = {"getlastresiduals", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_43getlastresiduals, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_43getlastresiduals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_curw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getlastresiduals (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_curw,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_curw);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getlastresiduals") < 0)) __PYX_ERR(0, 1185, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_curw = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getlastresiduals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getlastresiduals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_42getlastresiduals(__pyx_self, __pyx_v_self, __pyx_v_curw);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_42getlastresiduals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_curw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getlastresiduals", 0);

  /* "metaphor/monal/driver/_driver.py":1186
 * 
 *     def getlastresiduals(self, curw=None):  # Driver
 *         return self._outputs - self.mainModel.targets             # <<<<<<<<<<<<<<
 * #    getresiduals = getlastresiduals
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputs_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_targets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1185
 *         return self.mainModel.targets
 * 
 *     def getlastresiduals(self, curw=None):  # Driver             # <<<<<<<<<<<<<<
 *         return self._outputs - self.mainModel.targets
 * #    getresiduals = getlastresiduals
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getlastresiduals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1190
 * 
 *     @Property
 *     def parameterNames(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             lst = self.mainModel.parameterNames
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_45parameterNames(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_45parameterNames = {"parameterNames", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_45parameterNames, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_45parameterNames(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parameterNames (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("parameterNames", 1, 2, 2, 1); __PYX_ERR(0, 1190, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parameterNames") < 0)) __PYX_ERR(0, 1190, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parameterNames", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.parameterNames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_44parameterNames(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_44parameterNames(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("parameterNames", 0);

  /* "metaphor/monal/driver/_driver.py":1191
 *     @Property
 *     def parameterNames(self, index):  # Driver
 *         try:             # <<<<<<<<<<<<<<
 *             lst = self.mainModel.parameterNames
 *         except AttributeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":1192
 *     def parameterNames(self, index):  # Driver
 *         try:
 *             lst = self.mainModel.parameterNames             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             lst = self.mainModel.paramList()
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1192, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_parameterNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_lst = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1191
 *     @Property
 *     def parameterNames(self, index):  # Driver
 *         try:             # <<<<<<<<<<<<<<
 *             lst = self.mainModel.parameterNames
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1193
 *         try:
 *             lst = self.mainModel.parameterNames
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             lst = self.mainModel.paramList()
 *         return lst[index]
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.parameterNames", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 1193, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "metaphor/monal/driver/_driver.py":1194
 *             lst = self.mainModel.parameterNames
 *         except AttributeError:
 *             lst = self.mainModel.paramList()             # <<<<<<<<<<<<<<
 *         return lst[index]
 *     @parameterNames.lengetter
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1194, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_paramList); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1194, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      if (__pyx_t_9) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1194, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1194, __pyx_L5_except_error)
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":1191
 *     @Property
 *     def parameterNames(self, index):  # Driver
 *         try:             # <<<<<<<<<<<<<<
 *             lst = self.mainModel.parameterNames
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":1195
 *         except AttributeError:
 *             lst = self.mainModel.paramList()
 *         return lst[index]             # <<<<<<<<<<<<<<
 *     @parameterNames.lengetter
 *     def lparameterNames(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_lst, __pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1190
 * 
 *     @Property
 *     def parameterNames(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             lst = self.mainModel.parameterNames
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.parameterNames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1197
 *         return lst[index]
 *     @parameterNames.lengetter
 *     def lparameterNames(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.paramCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_47lparameterNames(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_47lparameterNames = {"lparameterNames", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_47lparameterNames, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_47lparameterNames(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lparameterNames (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_46lparameterNames(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_46lparameterNames(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lparameterNames", 0);

  /* "metaphor/monal/driver/_driver.py":1198
 *     @parameterNames.lengetter
 *     def lparameterNames(self):  # Driver
 *         return self.paramCount             # <<<<<<<<<<<<<<
 * 
 *     #===========================================================================
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1197
 *         return lst[index]
 *     @parameterNames.lengetter
 *     def lparameterNames(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.paramCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.lparameterNames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1208
 *     #===========================================================================
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver             # <<<<<<<<<<<<<<
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_savingformat);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_savingformat);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_savingformat);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_49saveParameters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_49saveParameters = {"saveParameters", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_49saveParameters, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_49saveParameters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_savingformat = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveParameters (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,&__pyx_n_s_savingformat,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_savingformat;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("saveParameters", 0, 2, 3, 1); __PYX_ERR(0, 1208, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_savingformat);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveParameters") < 0)) __PYX_ERR(0, 1208, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_filename = values[1];
    __pyx_v_savingformat = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveParameters", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1208, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.saveParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_48saveParameters(__pyx_self, __pyx_v_self, __pyx_v_filename, __pyx_v_savingformat);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_48saveParameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat) {
  PyObject *__pyx_v_ff = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject *(*__pyx_t_17)(PyObject *);
  Py_ssize_t __pyx_t_18;
  PyObject *(*__pyx_t_19)(PyObject *);
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  __Pyx_RefNannySetupContext("saveParameters", 0);

  /* "metaphor/monal/driver/_driver.py":1209
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver
 *         if savingformat == C.SF_BINARY:             # <<<<<<<<<<<<<<
 *             savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SF_BINARY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1210
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,             # <<<<<<<<<<<<<<
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_savez_compressed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_propertyName_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_propertyname, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1211
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,             # <<<<<<<<<<<<<<
 *                 innorm=self.inputnorm,
 *                 outnorm=self.outputnorm, baselen=self._baselen,
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_params, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameterNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_paramnames, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1212
 *             savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,             # <<<<<<<<<<<<<<
 *                 outnorm=self.outputnorm, baselen=self._baselen,
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputnorm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_innorm, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1213
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,
 *                 outnorm=self.outputnorm, baselen=self._baselen,             # <<<<<<<<<<<<<<
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputnorm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_outnorm, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_baselen, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1214
 *                 innorm=self.inputnorm,
 *                 outnorm=self.outputnorm, baselen=self._baselen,
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix             # <<<<<<<<<<<<<<
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY
 *             with open(filename, "w") as ff:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_stddev, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_halfdispersion, Py_None) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1210
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,             # <<<<<<<<<<<<<<
 *                 params=self.weights, paramnames=self.parameterNames,
 *                 innorm=self.inputnorm,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1209
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver
 *         if savingformat == C.SF_BINARY:             # <<<<<<<<<<<<<<
 *             savez_compressed(filename, propertyname=self.propertyName,
 *                 params=self.weights, paramnames=self.parameterNames,
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1215
 *                 outnorm=self.outputnorm, baselen=self._baselen,
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY             # <<<<<<<<<<<<<<
 *             with open(filename, "w") as ff:
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 */
  __Pyx_INCREF(__pyx_v_savingformat);
  __pyx_t_5 = __pyx_v_savingformat;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SF_ASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SF_JSON); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (__pyx_t_6) {

    /* "metaphor/monal/driver/_driver.py":1216
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY
 *             with open(filename, "w") as ff:             # <<<<<<<<<<<<<<
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:
 */
    /*with:*/ {
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
      __Pyx_INCREF(__pyx_n_u_w);
      __Pyx_GIVEREF(__pyx_n_u_w);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_w);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_1) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L7_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          /*try:*/ {
            __pyx_v_ff = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "metaphor/monal/driver/_driver.py":1217
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY
 *             with open(filename, "w") as ff:
 *                 self.mainModel.doSaveParameters(ff, savingformat)             # <<<<<<<<<<<<<<
 *                 if savingformat == C.SF_ASCII:
 *                     if self._baselen:
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1217, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_doSaveParameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1217, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = NULL;
            __pyx_t_11 = 0;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_5, function);
                __pyx_t_11 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_ff, __pyx_v_savingformat};
              __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1217, __pyx_L11_error)
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_GOTREF(__pyx_t_2);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_ff, __pyx_v_savingformat};
              __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1217, __pyx_L11_error)
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_GOTREF(__pyx_t_2);
            } else
            #endif
            {
              __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_1);
              if (__pyx_t_4) {
                __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
              }
              __Pyx_INCREF(__pyx_v_ff);
              __Pyx_GIVEREF(__pyx_v_ff);
              PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_v_ff);
              __Pyx_INCREF(__pyx_v_savingformat);
              __Pyx_GIVEREF(__pyx_v_savingformat);
              PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_savingformat);
              __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1217, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "metaphor/monal/driver/_driver.py":1218
 *             with open(filename, "w") as ff:
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:             # <<<<<<<<<<<<<<
 *                     if self._baselen:
 *                         ff.write("baselen\n")
 */
            __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SF_ASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L11_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1218, __pyx_L11_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_6) {

              /* "metaphor/monal/driver/_driver.py":1219
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:
 *                     if self._baselen:             # <<<<<<<<<<<<<<
 *                         ff.write("baselen\n")
 *                         ff.write("{}\n".format(self._baselen))
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1219, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1219, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (__pyx_t_6) {

                /* "metaphor/monal/driver/_driver.py":1220
 *                 if savingformat == C.SF_ASCII:
 *                     if self._baselen:
 *                         ff.write("baselen\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{}\n".format(self._baselen))
 *                     #===========================================================
 */
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "metaphor/monal/driver/_driver.py":1221
 *                     if self._baselen:
 *                         ff.write("baselen\n")
 *                         ff.write("{}\n".format(self._baselen))             # <<<<<<<<<<<<<<
 *                     #===========================================================
 *                     # if self._studentvariable:
 */
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1221, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1221, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_13 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_13)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_13);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                  }
                }
                if (!__pyx_t_13) {
                  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
                    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
                    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
                    __Pyx_GIVEREF(__pyx_t_12);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12);
                    __pyx_t_12 = 0;
                    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
                  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
                  if (likely(__pyx_t_4)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_2, function);
                  }
                }
                if (!__pyx_t_4) {
                  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_2)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); __pyx_t_4 = NULL;
                    __Pyx_GIVEREF(__pyx_t_1);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_1);
                    __pyx_t_1 = 0;
                    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "metaphor/monal/driver/_driver.py":1219
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:
 *                     if self._baselen:             # <<<<<<<<<<<<<<
 *                         ff.write("baselen\n")
 *                         ff.write("{}\n".format(self._baselen))
 */
              }

              /* "metaphor/monal/driver/_driver.py":1227
 *                     #    ff.write("%18.15g\n"% self._studentvariable)
 *                     #===========================================================
 *                     if self._stdtrain:             # <<<<<<<<<<<<<<
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 */
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1227, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1227, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (__pyx_t_6) {

                /* "metaphor/monal/driver/_driver.py":1228
 *                     #===========================================================
 *                     if self._stdtrain:
 *                         ff.write("stddev\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "metaphor/monal/driver/_driver.py":1229
 *                     if self._stdtrain:
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))             # <<<<<<<<<<<<<<
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1229, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_12 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                  }
                }
                if (!__pyx_t_12) {
                  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1229, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_14);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_1)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
                    __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
                    __Pyx_GIVEREF(__pyx_t_4);
                    PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_4);
                    __pyx_t_4 = 0;
                    __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_1 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
                  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
                  if (likely(__pyx_t_1)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_1);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_5, function);
                  }
                }
                if (!__pyx_t_1) {
                  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1229, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_GOTREF(__pyx_t_2);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_5)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_14};
                    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_14};
                    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __pyx_t_1 = NULL;
                    __Pyx_GIVEREF(__pyx_t_14);
                    PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_14);
                    __pyx_t_14 = 0;
                    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1229, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "metaphor/monal/driver/_driver.py":1227
 *                     #    ff.write("%18.15g\n"% self._studentvariable)
 *                     #===========================================================
 *                     if self._stdtrain:             # <<<<<<<<<<<<<<
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 */
              }

              /* "metaphor/monal/driver/_driver.py":1230
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):             # <<<<<<<<<<<<<<
 *                         N = self.dimension
 *                         ff.write("dispersion\n")
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = (__pyx_t_2 != Py_None);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_15 = (__pyx_t_3 != 0);
              if (__pyx_t_15) {
              } else {
                __pyx_t_6 = __pyx_t_15;
                goto __pyx_L21_bool_binop_done;
              }
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1230, __pyx_L11_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_6 = __pyx_t_15;
              __pyx_L21_bool_binop_done:;
              if (__pyx_t_6) {

                /* "metaphor/monal/driver/_driver.py":1231
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension             # <<<<<<<<<<<<<<
 *                         ff.write("dispersion\n")
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1231, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_v_N = __pyx_t_13;
                __pyx_t_13 = 0;

                /* "metaphor/monal/driver/_driver.py":1232
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension
 *                         ff.write("dispersion\n")             # <<<<<<<<<<<<<<
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1232, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1232, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "metaphor/monal/driver/_driver.py":1233
 *                         N = self.dimension
 *                         ff.write("dispersion\n")
 *                         ff.write("count={}\n".format(N*(N+1)/2))             # <<<<<<<<<<<<<<
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_count_2, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1233, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_14);
                __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_4 = PyNumber_Multiply(__pyx_v_N, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_1 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_4, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
                  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14);
                  if (likely(__pyx_t_4)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_14, function);
                  }
                }
                if (!__pyx_t_4) {
                  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_2);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_14)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
                    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
                    __Pyx_GIVEREF(__pyx_t_1);
                    PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_1);
                    __pyx_t_1 = 0;
                    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __pyx_t_14 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
                  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
                  if (likely(__pyx_t_14)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                    __Pyx_INCREF(__pyx_t_14);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_13, function);
                  }
                }
                if (!__pyx_t_14) {
                  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L11_error)
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_GOTREF(__pyx_t_5);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_13)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_2};
                    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_2};
                    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __pyx_t_14 = NULL;
                    __Pyx_GIVEREF(__pyx_t_2);
                    PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_2);
                    __pyx_t_2 = 0;
                    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "metaphor/monal/driver/_driver.py":1234
 *                         ff.write("dispersion\n")
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):             # <<<<<<<<<<<<<<
 *                             for j in range(i+1):
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L11_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) {
                  __pyx_t_5 = __pyx_t_13; __Pyx_INCREF(__pyx_t_5); __pyx_t_16 = 0;
                  __pyx_t_17 = NULL;
                } else {
                  __pyx_t_16 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __pyx_t_17 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1234, __pyx_L11_error)
                }
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                for (;;) {
                  if (likely(!__pyx_t_17)) {
                    if (likely(PyList_CheckExact(__pyx_t_5))) {
                      if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_5)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_13 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_13); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1234, __pyx_L11_error)
                      #else
                      __pyx_t_13 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L11_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      #endif
                    } else {
                      if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_13); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1234, __pyx_L11_error)
                      #else
                      __pyx_t_13 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L11_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      #endif
                    }
                  } else {
                    __pyx_t_13 = __pyx_t_17(__pyx_t_5);
                    if (unlikely(!__pyx_t_13)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 1234, __pyx_L11_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_13);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_13);
                  __pyx_t_13 = 0;

                  /* "metaphor/monal/driver/_driver.py":1235
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 *         else:
 */
                  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1235, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_13);
                  __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1235, __pyx_L11_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) {
                    __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_18 = 0;
                    __pyx_t_19 = NULL;
                  } else {
                    __pyx_t_18 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1235, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __pyx_t_19 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1235, __pyx_L11_error)
                  }
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  for (;;) {
                    if (likely(!__pyx_t_19)) {
                      if (likely(PyList_CheckExact(__pyx_t_13))) {
                        if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_13)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_18); __Pyx_INCREF(__pyx_t_12); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1235, __pyx_L11_error)
                        #else
                        __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1235, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        #endif
                      } else {
                        if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_18); __Pyx_INCREF(__pyx_t_12); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1235, __pyx_L11_error)
                        #else
                        __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1235, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        #endif
                      }
                    } else {
                      __pyx_t_12 = __pyx_t_19(__pyx_t_13);
                      if (unlikely(!__pyx_t_12)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                          else __PYX_ERR(0, 1235, __pyx_L11_error)
                        }
                        break;
                      }
                      __Pyx_GOTREF(__pyx_t_12);
                    }
                    __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_12);
                    __pyx_t_12 = 0;

                    /* "metaphor/monal/driver/_driver.py":1236
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))             # <<<<<<<<<<<<<<
 *         else:
 *             self.mainModel.saveParameters(filename, savingformat)
 */
                    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_18_15g, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1236, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_20);
                    __Pyx_INCREF(__pyx_v_i);
                    __Pyx_GIVEREF(__pyx_v_i);
                    PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_i);
                    __Pyx_INCREF(__pyx_v_j);
                    __Pyx_GIVEREF(__pyx_v_j);
                    PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_j);
                    __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1236, __pyx_L11_error)
                    __Pyx_GOTREF(__pyx_t_21);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __pyx_t_20 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
                      __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_1);
                      if (likely(__pyx_t_20)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                        __Pyx_INCREF(__pyx_t_20);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_1, function);
                      }
                    }
                    if (!__pyx_t_20) {
                      __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1236, __pyx_L11_error)
                      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      __Pyx_GOTREF(__pyx_t_14);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_1)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_t_21};
                        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_t_21};
                        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_20); __pyx_t_20 = NULL;
                        __Pyx_GIVEREF(__pyx_t_21);
                        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_21);
                        __pyx_t_21 = 0;
                        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __pyx_t_1 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
                      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
                      if (likely(__pyx_t_1)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                        __Pyx_INCREF(__pyx_t_1);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_2, function);
                      }
                    }
                    if (!__pyx_t_1) {
                      __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1236, __pyx_L11_error)
                      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                      __Pyx_GOTREF(__pyx_t_12);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_2)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_14};
                        __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_14};
                        __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
                        __Pyx_GIVEREF(__pyx_t_14);
                        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_14);
                        __pyx_t_14 = 0;
                        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1236, __pyx_L11_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                    /* "metaphor/monal/driver/_driver.py":1235
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 *                             for j in range(i+1):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 *         else:
 */
                  }
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                  /* "metaphor/monal/driver/_driver.py":1234
 *                         ff.write("dispersion\n")
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):             # <<<<<<<<<<<<<<
 *                             for j in range(i+1):
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 */
                }
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "metaphor/monal/driver/_driver.py":1230
 *                         ff.write("stddev\n")
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):             # <<<<<<<<<<<<<<
 *                         N = self.dimension
 *                         ff.write("dispersion\n")
 */
              }

              /* "metaphor/monal/driver/_driver.py":1218
 *             with open(filename, "w") as ff:
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:             # <<<<<<<<<<<<<<
 *                     if self._baselen:
 *                         ff.write("baselen\n")
 */
            }

            /* "metaphor/monal/driver/_driver.py":1216
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY
 *             with open(filename, "w") as ff:             # <<<<<<<<<<<<<<
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:
 */
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L16_try_end;
          __pyx_L11_error:;
          __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.saveParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_13, &__pyx_t_12) < 0) __PYX_ERR(0, 1216, __pyx_L13_except_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L13_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1216, __pyx_L13_except_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 1216, __pyx_L13_except_error)
            __pyx_t_15 = ((!(__pyx_t_6 != 0)) != 0);
            if (__pyx_t_15) {
              __Pyx_GIVEREF(__pyx_t_5);
              __Pyx_GIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_13, __pyx_t_12);
              __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; 
              __PYX_ERR(0, 1216, __pyx_L13_except_error)
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            goto __pyx_L12_exception_handled;
          }
          __pyx_L13_except_error:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          goto __pyx_L1_error;
          __pyx_L12_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          __pyx_L16_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_7) {
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__45, NULL);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1216, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
      goto __pyx_L30;
      __pyx_L7_error:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L1_error;
      __pyx_L30:;
    }

    /* "metaphor/monal/driver/_driver.py":1215
 *                 outnorm=self.outputnorm, baselen=self._baselen,
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY             # <<<<<<<<<<<<<<
 *             with open(filename, "w") as ff:
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1238
 *                                 ff.write("{0:18.15g}\n".format(self._dispersionMatrix[i, j]))
 *         else:
 *             self.mainModel.saveParameters(filename, savingformat)             # <<<<<<<<<<<<<<
 * 
 *     def getinfo(self, style):  # Driver
 */
  /*else*/ {
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_saveParameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    __pyx_t_11 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_11 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_filename, __pyx_v_savingformat};
      __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GOTREF(__pyx_t_12);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_filename, __pyx_v_savingformat};
      __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GOTREF(__pyx_t_12);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_13) {
        __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_13); __pyx_t_13 = NULL;
      }
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, __pyx_v_filename);
      __Pyx_INCREF(__pyx_v_savingformat);
      __Pyx_GIVEREF(__pyx_v_savingformat);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_v_savingformat);
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1208
 *     #===========================================================================
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver             # <<<<<<<<<<<<<<
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.saveParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ff);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1240
 *             self.mainModel.saveParameters(filename, savingformat)
 * 
 *     def getinfo(self, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_51getinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_51getinfo = {"getinfo", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_51getinfo, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_51getinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getinfo (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_style,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getinfo", 1, 2, 2, 1); __PYX_ERR(0, 1240, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getinfo") < 0)) __PYX_ERR(0, 1240, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_style = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1240, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_50getinfo(__pyx_self, __pyx_v_self, __pyx_v_style);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_50getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_style) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getinfo", 0);

  /* "metaphor/monal/driver/_driver.py":1241
 * 
 *     def getinfo(self, style):  # Driver
 *         if style == C.INPUT_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.inputCount
 *         elif style == C.OUTPUT_COUNT:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_INPUT_COUNT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1242
 *     def getinfo(self, style):  # Driver
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount             # <<<<<<<<<<<<<<
 *         elif style == C.OUTPUT_COUNT:
 *             return self.mainModel.outputCount
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1241
 * 
 *     def getinfo(self, style):  # Driver
 *         if style == C.INPUT_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.inputCount
 *         elif style == C.OUTPUT_COUNT:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1243
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount
 *         elif style == C.OUTPUT_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.outputCount
 *         elif style == C.LAYER_COUNT:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OUTPUT_COUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_style, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1244
 *             return self.mainModel.inputCount
 *         elif style == C.OUTPUT_COUNT:
 *             return self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         elif style == C.LAYER_COUNT:
 *             return self.mainModel.layerCount
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1243
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount
 *         elif style == C.OUTPUT_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.outputCount
 *         elif style == C.LAYER_COUNT:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1245
 *         elif style == C.OUTPUT_COUNT:
 *             return self.mainModel.outputCount
 *         elif style == C.LAYER_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.layerCount
 *         elif style == C.ORDER:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LAYER_COUNT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1246
 *             return self.mainModel.outputCount
 *         elif style == C.LAYER_COUNT:
 *             return self.mainModel.layerCount             # <<<<<<<<<<<<<<
 *         elif style == C.ORDER:
 *             return self.mainModel.order
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_layerCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1245
 *         elif style == C.OUTPUT_COUNT:
 *             return self.mainModel.outputCount
 *         elif style == C.LAYER_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.layerCount
 *         elif style == C.ORDER:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1247
 *         elif style == C.LAYER_COUNT:
 *             return self.mainModel.layerCount
 *         elif style == C.ORDER:             # <<<<<<<<<<<<<<
 *             return self.mainModel.order
 *         elif style == C.DIMENSION:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ORDER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_style, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1248
 *             return self.mainModel.layerCount
 *         elif style == C.ORDER:
 *             return self.mainModel.order             # <<<<<<<<<<<<<<
 *         elif style == C.DIMENSION:
 *             return self.mainModel.paramCount  # a modifier ici
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1247
 *         elif style == C.LAYER_COUNT:
 *             return self.mainModel.layerCount
 *         elif style == C.ORDER:             # <<<<<<<<<<<<<<
 *             return self.mainModel.order
 *         elif style == C.DIMENSION:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1249
 *         elif style == C.ORDER:
 *             return self.mainModel.order
 *         elif style == C.DIMENSION:             # <<<<<<<<<<<<<<
 *             return self.mainModel.paramCount  # a modifier ici
 *         elif style == C.SYNAPSE_COUNT:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DIMENSION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1250
 *             return self.mainModel.order
 *         elif style == C.DIMENSION:
 *             return self.mainModel.paramCount  # a modifier ici             # <<<<<<<<<<<<<<
 *         elif style == C.SYNAPSE_COUNT:
 *             return self.mainModel.synapseCount  # a modifier ici
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1249
 *         elif style == C.ORDER:
 *             return self.mainModel.order
 *         elif style == C.DIMENSION:             # <<<<<<<<<<<<<<
 *             return self.mainModel.paramCount  # a modifier ici
 *         elif style == C.SYNAPSE_COUNT:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1251
 *         elif style == C.DIMENSION:
 *             return self.mainModel.paramCount  # a modifier ici
 *         elif style == C.SYNAPSE_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.synapseCount  # a modifier ici
 *         elif style in [C.DEBUGDLL]:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SYNAPSE_COUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_style, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1252
 *             return self.mainModel.paramCount  # a modifier ici
 *         elif style == C.SYNAPSE_COUNT:
 *             return self.mainModel.synapseCount  # a modifier ici             # <<<<<<<<<<<<<<
 *         elif style in [C.DEBUGDLL]:
 *             return 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_synapseCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1251
 *         elif style == C.DIMENSION:
 *             return self.mainModel.paramCount  # a modifier ici
 *         elif style == C.SYNAPSE_COUNT:             # <<<<<<<<<<<<<<
 *             return self.mainModel.synapseCount  # a modifier ici
 *         elif style in [C.DEBUGDLL]:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1253
 *         elif style == C.SYNAPSE_COUNT:
 *             return self.mainModel.synapseCount  # a modifier ici
 *         elif style in [C.DEBUGDLL]:             # <<<<<<<<<<<<<<
 *             return 0
 *         raise MonalError ("getinfo incomplete with style = {}".format(style))
 */
  __Pyx_INCREF(__pyx_v_style);
  __pyx_t_1 = __pyx_v_style;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DEBUGDLL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_3 != 0);
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":1254
 *             return self.mainModel.synapseCount  # a modifier ici
 *         elif style in [C.DEBUGDLL]:
 *             return 0             # <<<<<<<<<<<<<<
 *         raise MonalError ("getinfo incomplete with style = {}".format(style))
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1253
 *         elif style == C.SYNAPSE_COUNT:
 *             return self.mainModel.synapseCount  # a modifier ici
 *         elif style in [C.DEBUGDLL]:             # <<<<<<<<<<<<<<
 *             return 0
 *         raise MonalError ("getinfo incomplete with style = {}".format(style))
 */
  }

  /* "metaphor/monal/driver/_driver.py":1255
 *         elif style in [C.DEBUGDLL]:
 *             return 0
 *         raise MonalError ("getinfo incomplete with style = {}".format(style))             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_getinfo_incomplete_with_style, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_style); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_style};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_style};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_style);
      __Pyx_GIVEREF(__pyx_v_style);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_style);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1255, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1240
 *             self.mainModel.saveParameters(filename, savingformat)
 * 
 *     def getinfo(self, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1258
 * 
 *     @Property
 *     def useOriginal(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_53useOriginal(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_53useOriginal = {"useOriginal", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_53useOriginal, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_53useOriginal(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("useOriginal (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_52useOriginal(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_52useOriginal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("useOriginal", 0);

  /* "metaphor/monal/driver/_driver.py":1259
 *     @Property
 *     def useOriginal(self):  # Driver
 *         return self.mainModel.useOriginal             # <<<<<<<<<<<<<<
 *     @useOriginal.setter
 *     def suseOriginal(self, value):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_useOriginal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1258
 * 
 *     @Property
 *     def useOriginal(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.useOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1261
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 *     def suseOriginal(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.useOriginal = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_55suseOriginal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_55suseOriginal = {"suseOriginal", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_55suseOriginal, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_55suseOriginal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("suseOriginal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("suseOriginal", 1, 2, 2, 1); __PYX_ERR(0, 1261, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "suseOriginal") < 0)) __PYX_ERR(0, 1261, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("suseOriginal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1261, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.suseOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_54suseOriginal(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_54suseOriginal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("suseOriginal", 0);

  /* "metaphor/monal/driver/_driver.py":1262
 *     @useOriginal.setter
 *     def suseOriginal(self, value):  # Driver
 *         self.mainModel.useOriginal = value             # <<<<<<<<<<<<<<
 * 
 *     def getrealvalue(self, param, style):  # Driver
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_useOriginal, __pyx_v_value) < 0) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1261
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 *     def suseOriginal(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.useOriginal = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.suseOriginal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1264
 *         self.mainModel.useOriginal = value
 * 
 *     def getrealvalue(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_57getrealvalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_57getrealvalue = {"getrealvalue", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_57getrealvalue, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_57getrealvalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_param = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getrealvalue (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_param,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_param)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getrealvalue", 1, 3, 3, 1); __PYX_ERR(0, 1264, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getrealvalue", 1, 3, 3, 2); __PYX_ERR(0, 1264, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getrealvalue") < 0)) __PYX_ERR(0, 1264, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_param = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getrealvalue", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1264, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getrealvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_56getrealvalue(__pyx_self, __pyx_v_self, __pyx_v_param, __pyx_v_style);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_56getrealvalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_param, PyObject *__pyx_v_style) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getrealvalue", 0);

  /* "metaphor/monal/driver/_driver.py":1265
 * 
 *     def getrealvalue(self, param, style):  # Driver
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))             # <<<<<<<<<<<<<<
 * 
 *     def getindexinfo(self, param, style):  # Driver
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_getrealvalue_incomplete_with_sty, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_style};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_style};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_style);
      __Pyx_GIVEREF(__pyx_v_style);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_style);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1265, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1264
 *         self.mainModel.useOriginal = value
 * 
 *     def getrealvalue(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getrealvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1267
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 *     def getindexinfo(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_59getindexinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_59getindexinfo = {"getindexinfo", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_59getindexinfo, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_59getindexinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_param = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getindexinfo (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_param,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_param)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getindexinfo", 1, 3, 3, 1); __PYX_ERR(0, 1267, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getindexinfo", 1, 3, 3, 2); __PYX_ERR(0, 1267, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getindexinfo") < 0)) __PYX_ERR(0, 1267, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_param = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getindexinfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1267, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getindexinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_58getindexinfo(__pyx_self, __pyx_v_self, __pyx_v_param, __pyx_v_style);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_58getindexinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_param, PyObject *__pyx_v_style) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getindexinfo", 0);

  /* "metaphor/monal/driver/_driver.py":1268
 * 
 *     def getindexinfo(self, param, style):  # Driver
 *         if style == C.II_P_LAYER_LENGTH:             # <<<<<<<<<<<<<<
 *             return self.mainModel.layerLength(param)
 *         if style == C.II_P_SYN_PARENTS:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_II_P_LAYER_LENGTH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1269
 *     def getindexinfo(self, param, style):  # Driver
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)             # <<<<<<<<<<<<<<
 *         if style == C.II_P_SYN_PARENTS:
 *             return self.mainModel.nodes[param].linksCount
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_layerLength); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_param); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_param};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_param};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1269, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_param);
        __Pyx_GIVEREF(__pyx_v_param);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_param);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1268
 * 
 *     def getindexinfo(self, param, style):  # Driver
 *         if style == C.II_P_LAYER_LENGTH:             # <<<<<<<<<<<<<<
 *             return self.mainModel.layerLength(param)
 *         if style == C.II_P_SYN_PARENTS:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1270
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)
 *         if style == C.II_P_SYN_PARENTS:             # <<<<<<<<<<<<<<
 *             return self.mainModel.nodes[param].linksCount
 *         if style == C.II_P_SYN_CHILDREN:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_II_P_SYN_PARENTS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_style, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1271
 *             return self.mainModel.layerLength(param)
 *         if style == C.II_P_SYN_PARENTS:
 *             return self.mainModel.nodes[param].linksCount             # <<<<<<<<<<<<<<
 *         if style == C.II_P_SYN_CHILDREN:
 *             return len(self.mainModel.nodes[param].downLinks)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_param); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_linksCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1270
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)
 *         if style == C.II_P_SYN_PARENTS:             # <<<<<<<<<<<<<<
 *             return self.mainModel.nodes[param].linksCount
 *         if style == C.II_P_SYN_CHILDREN:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1272
 *         if style == C.II_P_SYN_PARENTS:
 *             return self.mainModel.nodes[param].linksCount
 *         if style == C.II_P_SYN_CHILDREN:             # <<<<<<<<<<<<<<
 *             return len(self.mainModel.nodes[param].downLinks)
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_II_P_SYN_CHILDREN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_style, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1273
 *             return self.mainModel.nodes[param].linksCount
 *         if style == C.II_P_SYN_CHILDREN:
 *             return len(self.mainModel.nodes[param].downLinks)             # <<<<<<<<<<<<<<
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_downLinks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1272
 *         if style == C.II_P_SYN_PARENTS:
 *             return self.mainModel.nodes[param].linksCount
 *         if style == C.II_P_SYN_CHILDREN:             # <<<<<<<<<<<<<<
 *             return len(self.mainModel.nodes[param].downLinks)
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 */
  }

  /* "metaphor/monal/driver/_driver.py":1274
 *         if style == C.II_P_SYN_CHILDREN:
 *             return len(self.mainModel.nodes[param].downLinks)
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))             # <<<<<<<<<<<<<<
 * 
 *     def setivalue(self, style, value):  # Driver
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_getindexinfo_incomplete_with_sty, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_style); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_style};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_style};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_style);
      __Pyx_GIVEREF(__pyx_v_style);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_style);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1274, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1267
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 *     def getindexinfo(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getindexinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1276
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 * 
 *     def setivalue(self, style, value):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.DEBUGDLL: return
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_61setivalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_61setivalue = {"setivalue", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_61setivalue, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_61setivalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_style = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setivalue (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_style,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setivalue", 1, 3, 3, 1); __PYX_ERR(0, 1276, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setivalue", 1, 3, 3, 2); __PYX_ERR(0, 1276, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setivalue") < 0)) __PYX_ERR(0, 1276, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_style = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setivalue", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1276, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setivalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_60setivalue(__pyx_self, __pyx_v_self, __pyx_v_style, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_60setivalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_style, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("setivalue", 0);

  /* "metaphor/monal/driver/_driver.py":1277
 * 
 *     def setivalue(self, style, value):  # Driver
 *         if style == C.DEBUGDLL: return             # <<<<<<<<<<<<<<
 * 
 *     def setrealvalue(self, style, index, value):  # Driver
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DEBUGDLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":1276
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 * 
 *     def setivalue(self, style, value):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.DEBUGDLL: return
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setivalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1279
 *         if style == C.DEBUGDLL: return
 * 
 *     def setrealvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_63setrealvalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_63setrealvalue = {"setrealvalue", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_63setrealvalue, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_63setrealvalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_style = 0;
  CYTHON_UNUSED PyObject *__pyx_v_index = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setrealvalue (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_style,&__pyx_n_s_index,&__pyx_n_s_value,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setrealvalue", 1, 4, 4, 1); __PYX_ERR(0, 1279, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setrealvalue", 1, 4, 4, 2); __PYX_ERR(0, 1279, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setrealvalue", 1, 4, 4, 3); __PYX_ERR(0, 1279, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setrealvalue") < 0)) __PYX_ERR(0, 1279, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_style = values[1];
    __pyx_v_index = values[2];
    __pyx_v_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setrealvalue", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1279, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setrealvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_62setrealvalue(__pyx_self, __pyx_v_self, __pyx_v_style, __pyx_v_index, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_62setrealvalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_style, CYTHON_UNUSED PyObject *__pyx_v_index, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setrealvalue", 0);

  /* "metaphor/monal/driver/_driver.py":1280
 * 
 *     def setrealvalue(self, style, index, value):  # Driver
 *         raise NotImplementedError("setrealvalue not implemented yet")             # <<<<<<<<<<<<<<
 * 
 *     def setindexvalue(self, style, index, value):  # Driver
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1280, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1279
 *         if style == C.DEBUGDLL: return
 * 
 *     def setrealvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setrealvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1282
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 *     def setindexvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_65setindexvalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_65setindexvalue = {"setindexvalue", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_65setindexvalue, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_65setindexvalue(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_style = 0;
  CYTHON_UNUSED PyObject *__pyx_v_index = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setindexvalue (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_style,&__pyx_n_s_index,&__pyx_n_s_value,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setindexvalue", 1, 4, 4, 1); __PYX_ERR(0, 1282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setindexvalue", 1, 4, 4, 2); __PYX_ERR(0, 1282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setindexvalue", 1, 4, 4, 3); __PYX_ERR(0, 1282, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setindexvalue") < 0)) __PYX_ERR(0, 1282, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_style = values[1];
    __pyx_v_index = values[2];
    __pyx_v_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setindexvalue", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setindexvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_64setindexvalue(__pyx_self, __pyx_v_self, __pyx_v_style, __pyx_v_index, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_64setindexvalue(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_style, CYTHON_UNUSED PyObject *__pyx_v_index, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setindexvalue", 0);

  /* "metaphor/monal/driver/_driver.py":1283
 * 
 *     def setindexvalue(self, style, index, value):  # Driver
 *         raise NotImplementedError("setindexvaluenNot implemented yet")             # <<<<<<<<<<<<<<
 * 
 *     def splitModel(self, source):  # Driver
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1283, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1282
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 *     def setindexvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setindexvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1285
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 *     def splitModel(self, source):  # Driver             # <<<<<<<<<<<<<<
 *         """Sparation des multiModels.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_67splitModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_66splitModel[] = "S\303\257\302\277\305\223paration des multiModels.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_67splitModel = {"splitModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_67splitModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_66splitModel};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_67splitModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("splitModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("splitModel", 1, 2, 2, 1); __PYX_ERR(0, 1285, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "splitModel") < 0)) __PYX_ERR(0, 1285, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("splitModel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1285, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.splitModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_66splitModel(__pyx_self, __pyx_v_self, __pyx_v_source);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_66splitModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source) {
  PyObject *__pyx_v_target = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("splitModel", 0);

  /* "metaphor/monal/driver/_driver.py":1288
 *         """Sparation des multiModels.
 *         """
 *         if not isinstance(source, Model):             # <<<<<<<<<<<<<<
 *             return
 *         self.mainModel = None
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_source, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1289
 *         """
 *         if not isinstance(source, Model):
 *             return             # <<<<<<<<<<<<<<
 *         self.mainModel = None
 *         self.inNormModel = None
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1288
 *         """Sparation des multiModels.
 *         """
 *         if not isinstance(source, Model):             # <<<<<<<<<<<<<<
 *             return
 *         self.mainModel = None
 */
  }

  /* "metaphor/monal/driver/_driver.py":1290
 *         if not isinstance(source, Model):
 *             return
 *         self.mainModel = None             # <<<<<<<<<<<<<<
 *         self.inNormModel = None
 *         self.outNormModel = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, Py_None) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1291
 *             return
 *         self.mainModel = None
 *         self.inNormModel = None             # <<<<<<<<<<<<<<
 *         self.outNormModel = None
 *         if not isinstance(source, Multimodel):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel, Py_None) < 0) __PYX_ERR(0, 1291, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1292
 *         self.mainModel = None
 *         self.inNormModel = None
 *         self.outNormModel = None             # <<<<<<<<<<<<<<
 *         if not isinstance(source, Multimodel):
 *             self.mainModel = source
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel, Py_None) < 0) __PYX_ERR(0, 1292, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1293
 *         self.inNormModel = None
 *         self.outNormModel = None
 *         if not isinstance(source, Multimodel):             # <<<<<<<<<<<<<<
 *             self.mainModel = source
 *         elif source.modelCount > 0:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Multimodel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_source, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1294
 *         self.outNormModel = None
 *         if not isinstance(source, Multimodel):
 *             self.mainModel = source             # <<<<<<<<<<<<<<
 *         elif source.modelCount > 0:
 *             for target in source.models:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, __pyx_v_source) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1293
 *         self.inNormModel = None
 *         self.outNormModel = None
 *         if not isinstance(source, Multimodel):             # <<<<<<<<<<<<<<
 *             self.mainModel = source
 *         elif source.modelCount > 0:
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1295
 *         if not isinstance(source, Multimodel):
 *             self.mainModel = source
 *         elif source.modelCount > 0:             # <<<<<<<<<<<<<<
 *             for target in source.models:
 *                 if target is not None:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_modelCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1296
 *             self.mainModel = source
 *         elif source.modelCount > 0:
 *             for target in source.models:             # <<<<<<<<<<<<<<
 *                 if target is not None:
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1296, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1296, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_6(__pyx_t_1);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1296, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":1297
 *         elif source.modelCount > 0:
 *             for target in source.models:
 *                 if target is not None:             # <<<<<<<<<<<<<<
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 *                         self.inNormModel = target
 */
      __pyx_t_2 = (__pyx_v_target != Py_None);
      __pyx_t_3 = (__pyx_t_2 != 0);
      if (__pyx_t_3) {

        /* "metaphor/monal/driver/_driver.py":1298
 *             for target in source.models:
 *                 if target is not None:
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):             # <<<<<<<<<<<<<<
 *                         self.inNormModel = target
 *                     elif target.isFix() and (target.style // C.TSR_OUT_NORM):
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_isFix); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (__pyx_t_8) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else {
          __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_2) {
        } else {
          __pyx_t_3 = __pyx_t_2;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_style); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_TSR_IN_NORM); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_FloorDivide(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1298, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_3 = __pyx_t_2;
        __pyx_L9_bool_binop_done:;
        if (__pyx_t_3) {

          /* "metaphor/monal/driver/_driver.py":1299
 *                 if target is not None:
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 *                         self.inNormModel = target             # <<<<<<<<<<<<<<
 *                     elif target.isFix() and (target.style // C.TSR_OUT_NORM):
 *                         self.outNormModel = target
 */
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel, __pyx_v_target) < 0) __PYX_ERR(0, 1299, __pyx_L1_error)

          /* "metaphor/monal/driver/_driver.py":1298
 *             for target in source.models:
 *                 if target is not None:
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):             # <<<<<<<<<<<<<<
 *                         self.inNormModel = target
 *                     elif target.isFix() and (target.style // C.TSR_OUT_NORM):
 */
          goto __pyx_L8;
        }

        /* "metaphor/monal/driver/_driver.py":1300
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 *                         self.inNormModel = target
 *                     elif target.isFix() and (target.style // C.TSR_OUT_NORM):             # <<<<<<<<<<<<<<
 *                         self.outNormModel = target
 *                     else:
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_isFix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1300, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1300, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_2) {
        } else {
          __pyx_t_3 = __pyx_t_2;
          goto __pyx_L11_bool_binop_done;
        }
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_style); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TSR_OUT_NORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyNumber_FloorDivide(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1300, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_3 = __pyx_t_2;
        __pyx_L11_bool_binop_done:;
        if (__pyx_t_3) {

          /* "metaphor/monal/driver/_driver.py":1301
 *                         self.inNormModel = target
 *                     elif target.isFix() and (target.style // C.TSR_OUT_NORM):
 *                         self.outNormModel = target             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.mainModel = target
 */
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel, __pyx_v_target) < 0) __PYX_ERR(0, 1301, __pyx_L1_error)

          /* "metaphor/monal/driver/_driver.py":1300
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 *                         self.inNormModel = target
 *                     elif target.isFix() and (target.style // C.TSR_OUT_NORM):             # <<<<<<<<<<<<<<
 *                         self.outNormModel = target
 *                     else:
 */
          goto __pyx_L8;
        }

        /* "metaphor/monal/driver/_driver.py":1303
 *                         self.outNormModel = target
 *                     else:
 *                         self.mainModel = target             # <<<<<<<<<<<<<<
 * #        self.model = source  # a supprimer
 * 
 */
        /*else*/ {
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mainModel, __pyx_v_target) < 0) __PYX_ERR(0, 1303, __pyx_L1_error)
        }
        __pyx_L8:;

        /* "metaphor/monal/driver/_driver.py":1297
 *         elif source.modelCount > 0:
 *             for target in source.models:
 *                 if target is not None:             # <<<<<<<<<<<<<<
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 *                         self.inNormModel = target
 */
      }

      /* "metaphor/monal/driver/_driver.py":1296
 *             self.mainModel = source
 *         elif source.modelCount > 0:
 *             for target in source.models:             # <<<<<<<<<<<<<<
 *                 if target is not None:
 *                     if target.isFix() and (target.style // C.TSR_IN_NORM):
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1295
 *         if not isinstance(source, Multimodel):
 *             self.mainModel = source
 *         elif source.modelCount > 0:             # <<<<<<<<<<<<<<
 *             for target in source.models:
 *                 if target is not None:
 */
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":1285
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 *     def splitModel(self, source):  # Driver             # <<<<<<<<<<<<<<
 *         """Sparation des multiModels.
 *         """
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.splitModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1306
 * #        self.model = source  # a supprimer
 * 
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,             # <<<<<<<<<<<<<<
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,
 *             classif=False, nosynapse=0):    # Driver
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_69_createModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_68_createModel[] = "Cre\305\223ation d'un modele neuronal depuis des informations de structure.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_69_createModel = {"_createModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_69_createModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_68_createModel};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_69_createModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_owner = 0;
  PyObject *__pyx_v_modelname = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_outputs = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_activfunc = 0;
  PyObject *__pyx_v_polytype = 0;
  PyObject *__pyx_v_modelData = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_classif = 0;
  PyObject *__pyx_v_nosynapse = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_createModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_owner,&__pyx_n_s_modelname,&__pyx_n_s_inputs,&__pyx_n_s_outputs,&__pyx_n_s_hidden,&__pyx_n_s_activfunc,&__pyx_n_s_polytype,&__pyx_n_s_modelData,&__pyx_n_s_verbose,&__pyx_n_s_classif,&__pyx_n_s_nosynapse,0};
    PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_2));
    values[6] = ((PyObject *)((PyObject*)__pyx_n_u_TANH));
    values[7] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "metaphor/monal/driver/_driver.py":1307
 * 
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,             # <<<<<<<<<<<<<<
 *             classif=False, nosynapse=0):    # Driver
 *         """Creation d'un modele neuronal depuis des informations de structure.
 */
    values[8] = ((PyObject *)((PyObject *)Py_None));
    values[9] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "metaphor/monal/driver/_driver.py":1308
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,
 *             classif=False, nosynapse=0):    # Driver             # <<<<<<<<<<<<<<
 *         """Creation d'un modele neuronal depuis des informations de structure.
 *         """
 */
    values[10] = ((PyObject *)((PyObject *)Py_False));
    values[11] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_owner);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelname);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_activfunc);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_polytype);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelData);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classif);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nosynapse);
          if (value) { values[11] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_createModel") < 0)) __PYX_ERR(0, 1306, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_owner = values[1];
    __pyx_v_modelname = values[2];
    __pyx_v_inputs = values[3];
    __pyx_v_outputs = values[4];
    __pyx_v_hidden = values[5];
    __pyx_v_activfunc = values[6];
    __pyx_v_polytype = values[7];
    __pyx_v_modelData = values[8];
    __pyx_v_verbose = values[9];
    __pyx_v_classif = values[10];
    __pyx_v_nosynapse = values[11];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_createModel", 0, 1, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1306, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._createModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_68_createModel(__pyx_self, __pyx_v_self, __pyx_v_owner, __pyx_v_modelname, __pyx_v_inputs, __pyx_v_outputs, __pyx_v_hidden, __pyx_v_activfunc, __pyx_v_polytype, __pyx_v_modelData, __pyx_v_verbose, __pyx_v_classif, __pyx_v_nosynapse);

  /* "metaphor/monal/driver/_driver.py":1306
 * #        self.model = source  # a supprimer
 * 
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,             # <<<<<<<<<<<<<<
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,
 *             classif=False, nosynapse=0):    # Driver
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_68_createModel(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_owner, PyObject *__pyx_v_modelname, PyObject *__pyx_v_inputs, PyObject *__pyx_v_outputs, PyObject *__pyx_v_hidden, PyObject *__pyx_v_activfunc, PyObject *__pyx_v_polytype, PyObject *__pyx_v_modelData, PyObject *__pyx_v_verbose, PyObject *__pyx_v_classif, PyObject *__pyx_v_nosynapse) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("_createModel", 0);
  __Pyx_INCREF(__pyx_v_modelname);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_INCREF(__pyx_v_outputs);
  __Pyx_INCREF(__pyx_v_hidden);
  __Pyx_INCREF(__pyx_v_activfunc);
  __Pyx_INCREF(__pyx_v_polytype);

  /* "metaphor/monal/driver/_driver.py":1311
 *         """Creation d'un modele neuronal depuis des informations de structure.
 *         """
 *         if modelData:             # <<<<<<<<<<<<<<
 *             inputs = modelData.input  #NModelOutput
 *             outputs = modelData.output  #NModelOutput
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_modelData); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1311, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1312
 *         """
 *         if modelData:
 *             inputs = modelData.input  #NModelOutput             # <<<<<<<<<<<<<<
 *             outputs = modelData.output  #NModelOutput
 *             hidden = modelData.hidden  #NHidden
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_modelData, __pyx_n_s_input); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1313
 *         if modelData:
 *             inputs = modelData.input  #NModelOutput
 *             outputs = modelData.output  #NModelOutput             # <<<<<<<<<<<<<<
 *             hidden = modelData.hidden  #NHidden
 *             activfunc = modelData.activation  #HiddenActiv
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_modelData, __pyx_n_s_output); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1314
 *             inputs = modelData.input  #NModelOutput
 *             outputs = modelData.output  #NModelOutput
 *             hidden = modelData.hidden  #NHidden             # <<<<<<<<<<<<<<
 *             activfunc = modelData.activation  #HiddenActiv
 *             polytype = modelData.polyType  #PolyType
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_modelData, __pyx_n_s_hidden); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_hidden, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1315
 *             outputs = modelData.output  #NModelOutput
 *             hidden = modelData.hidden  #NHidden
 *             activfunc = modelData.activation  #HiddenActiv             # <<<<<<<<<<<<<<
 *             polytype = modelData.polyType  #PolyType
 *             modelname = modelData.name
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_modelData, __pyx_n_s_activation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_activfunc, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1316
 *             hidden = modelData.hidden  #NHidden
 *             activfunc = modelData.activation  #HiddenActiv
 *             polytype = modelData.polyType  #PolyType             # <<<<<<<<<<<<<<
 *             modelname = modelData.name
 *         if polytype:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_modelData, __pyx_n_s_polyType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_polytype, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1317
 *             activfunc = modelData.activation  #HiddenActiv
 *             polytype = modelData.polyType  #PolyType
 *             modelname = modelData.name             # <<<<<<<<<<<<<<
 *         if polytype:
 *             res = Polynom(owner, modelname, inputs, outputs, hidden)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_modelData, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_modelname, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1311
 *         """Creation d'un modele neuronal depuis des informations de structure.
 *         """
 *         if modelData:             # <<<<<<<<<<<<<<
 *             inputs = modelData.input  #NModelOutput
 *             outputs = modelData.output  #NModelOutput
 */
  }

  /* "metaphor/monal/driver/_driver.py":1318
 *             polytype = modelData.polyType  #PolyType
 *             modelname = modelData.name
 *         if polytype:             # <<<<<<<<<<<<<<
 *             res = Polynom(owner, modelname, inputs, outputs, hidden)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_polytype); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1318, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1319
 *             modelname = modelData.name
 *         if polytype:
 *             res = Polynom(owner, modelname, inputs, outputs, hidden)             # <<<<<<<<<<<<<<
 *         else:
 *             res = Network(owner, modelname=modelname, inputs=inputs, outputs=outputs, hidden=hidden, activfunc=activfunc, classif=classif, nosynapse=nosynapse)
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Polynom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_owner, __pyx_v_modelname, __pyx_v_inputs, __pyx_v_outputs, __pyx_v_hidden};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_owner, __pyx_v_modelname, __pyx_v_inputs, __pyx_v_outputs, __pyx_v_hidden};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_owner);
      __Pyx_GIVEREF(__pyx_v_owner);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_owner);
      __Pyx_INCREF(__pyx_v_modelname);
      __Pyx_GIVEREF(__pyx_v_modelname);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_modelname);
      __Pyx_INCREF(__pyx_v_inputs);
      __Pyx_GIVEREF(__pyx_v_inputs);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_inputs);
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_outputs);
      __Pyx_INCREF(__pyx_v_hidden);
      __Pyx_GIVEREF(__pyx_v_hidden);
      PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_hidden);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_res = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1318
 *             polytype = modelData.polyType  #PolyType
 *             modelname = modelData.name
 *         if polytype:             # <<<<<<<<<<<<<<
 *             res = Polynom(owner, modelname, inputs, outputs, hidden)
 *         else:
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1321
 *             res = Polynom(owner, modelname, inputs, outputs, hidden)
 *         else:
 *             res = Network(owner, modelname=modelname, inputs=inputs, outputs=outputs, hidden=hidden, activfunc=activfunc, classif=classif, nosynapse=nosynapse)             # <<<<<<<<<<<<<<
 *         if verbose >= 3:
 *             sys.stderr.write('\nInformation: Model creation {}\n'.format(modelname))
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Network); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_owner);
    __Pyx_GIVEREF(__pyx_v_owner);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_owner);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_modelname, __pyx_v_modelname) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_inputs, __pyx_v_inputs) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_outputs, __pyx_v_outputs) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_hidden, __pyx_v_hidden) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_activfunc, __pyx_v_activfunc) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_classif, __pyx_v_classif) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_nosynapse, __pyx_v_nosynapse) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_res = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":1322
 *         else:
 *             res = Network(owner, modelname=modelname, inputs=inputs, outputs=outputs, hidden=hidden, activfunc=activfunc, classif=classif, nosynapse=nosynapse)
 *         if verbose >= 3:             # <<<<<<<<<<<<<<
 *             sys.stderr.write('\nInformation: Model creation {}\n'.format(modelname))
 *             sys.stderr.write('Information: {} inputs\n'.format(inputs))
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1323
 *             res = Network(owner, modelname=modelname, inputs=inputs, outputs=outputs, hidden=hidden, activfunc=activfunc, classif=classif, nosynapse=nosynapse)
 *         if verbose >= 3:
 *             sys.stderr.write('\nInformation: Model creation {}\n'.format(modelname))             # <<<<<<<<<<<<<<
 *             sys.stderr.write('Information: {} inputs\n'.format(inputs))
 *             sys.stderr.write('Information: {} outputs\n'.format(outputs))
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_Model_creation, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_modelname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_modelname};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_modelname};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_modelname);
        __Pyx_GIVEREF(__pyx_v_modelname);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_modelname);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1324
 *         if verbose >= 3:
 *             sys.stderr.write('\nInformation: Model creation {}\n'.format(modelname))
 *             sys.stderr.write('Information: {} inputs\n'.format(inputs))             # <<<<<<<<<<<<<<
 *             sys.stderr.write('Information: {} outputs\n'.format(outputs))
 *             sys.stderr.write('Information: {} hidden\n'.format(hidden))
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_inputs, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_inputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_inputs};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_inputs};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_inputs);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1325
 *             sys.stderr.write('\nInformation: Model creation {}\n'.format(modelname))
 *             sys.stderr.write('Information: {} inputs\n'.format(inputs))
 *             sys.stderr.write('Information: {} outputs\n'.format(outputs))             # <<<<<<<<<<<<<<
 *             sys.stderr.write('Information: {} hidden\n'.format(hidden))
 *             sys.stderr.write('Information: {} activation\n'.format(activfunc))
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_outputs, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_outputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_outputs};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_outputs};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_outputs);
        __Pyx_GIVEREF(__pyx_v_outputs);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_outputs);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1326
 *             sys.stderr.write('Information: {} inputs\n'.format(inputs))
 *             sys.stderr.write('Information: {} outputs\n'.format(outputs))
 *             sys.stderr.write('Information: {} hidden\n'.format(hidden))             # <<<<<<<<<<<<<<
 *             sys.stderr.write('Information: {} activation\n'.format(activfunc))
 *             sys.stderr.write('Information: dimension {}\n'.format(res.synapseCount))
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_hidden, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_hidden); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_hidden};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_hidden};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_hidden);
        __Pyx_GIVEREF(__pyx_v_hidden);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_hidden);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1327
 *             sys.stderr.write('Information: {} outputs\n'.format(outputs))
 *             sys.stderr.write('Information: {} hidden\n'.format(hidden))
 *             sys.stderr.write('Information: {} activation\n'.format(activfunc))             # <<<<<<<<<<<<<<
 *             sys.stderr.write('Information: dimension {}\n'.format(res.synapseCount))
 *         return res
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_activation, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_activfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_activfunc};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_activfunc};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_activfunc);
        __Pyx_GIVEREF(__pyx_v_activfunc);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_activfunc);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1328
 *             sys.stderr.write('Information: {} hidden\n'.format(hidden))
 *             sys.stderr.write('Information: {} activation\n'.format(activfunc))
 *             sys.stderr.write('Information: dimension {}\n'.format(res.synapseCount))             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stderr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Information_dimension, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_synapseCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1322
 *         else:
 *             res = Network(owner, modelname=modelname, inputs=inputs, outputs=outputs, hidden=hidden, activfunc=activfunc, classif=classif, nosynapse=nosynapse)
 *         if verbose >= 3:             # <<<<<<<<<<<<<<
 *             sys.stderr.write('\nInformation: Model creation {}\n'.format(modelname))
 *             sys.stderr.write('Information: {} inputs\n'.format(inputs))
 */
  }

  /* "metaphor/monal/driver/_driver.py":1329
 *             sys.stderr.write('Information: {} activation\n'.format(activfunc))
 *             sys.stderr.write('Information: dimension {}\n'.format(res.synapseCount))
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def checkModel(self):  # Driver # a developper
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1306
 * #        self.model = source  # a supprimer
 * 
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,             # <<<<<<<<<<<<<<
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,
 *             classif=False, nosynapse=0):    # Driver
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._createModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_modelname);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_hidden);
  __Pyx_XDECREF(__pyx_v_activfunc);
  __Pyx_XDECREF(__pyx_v_polytype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1331
 *         return res
 * 
 *     def checkModel(self):  # Driver # a developper             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_71checkModel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_71checkModel = {"checkModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_71checkModel, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_71checkModel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checkModel (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_70checkModel(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_70checkModel(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checkModel", 0);

  /* "metaphor/monal/driver/_driver.py":1332
 * 
 *     def checkModel(self):  # Driver # a developper
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def getNeuronOfId(self, valueid):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1331
 *         return res
 * 
 *     def checkModel(self):  # Driver # a developper             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1334
 *         return True
 * 
 *     def getNeuronOfId(self, valueid):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_73getNeuronOfId(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_73getNeuronOfId = {"getNeuronOfId", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_73getNeuronOfId, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_73getNeuronOfId(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_valueid = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNeuronOfId (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_valueid,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valueid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getNeuronOfId", 1, 2, 2, 1); __PYX_ERR(0, 1334, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getNeuronOfId") < 0)) __PYX_ERR(0, 1334, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_valueid = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getNeuronOfId", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1334, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getNeuronOfId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_72getNeuronOfId(__pyx_self, __pyx_v_self, __pyx_v_valueid);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_72getNeuronOfId(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valueid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getNeuronOfId", 0);

  /* "metaphor/monal/driver/_driver.py":1335
 * 
 *     def getNeuronOfId(self, valueid):  # Driver
 *         return self.mainModel.getNeuronOfId(valueid)             # <<<<<<<<<<<<<<
 * 
 *     def initWeights(self, env=1, bias0=False, **kwds):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getNeuronOfId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_valueid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_valueid};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_valueid};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_valueid);
      __Pyx_GIVEREF(__pyx_v_valueid);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_valueid);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1334
 *         return True
 * 
 *     def getNeuronOfId(self, valueid):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getNeuronOfId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1337
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 *     def initWeights(self, env=1, bias0=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.initWeights(env, bias0)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_75initWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_75initWeights = {"initWeights", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_75initWeights, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_75initWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_env = 0;
  PyObject *__pyx_v_bias0 = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("initWeights (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_env,&__pyx_n_s_bias0,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[2] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_env);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bias0);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "initWeights") < 0)) __PYX_ERR(0, 1337, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_env = values[1];
    __pyx_v_bias0 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("initWeights", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1337, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.initWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_74initWeights(__pyx_self, __pyx_v_self, __pyx_v_env, __pyx_v_bias0, __pyx_v_kwds);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_74initWeights(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_env, PyObject *__pyx_v_bias0, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("initWeights", 0);

  /* "metaphor/monal/driver/_driver.py":1338
 * 
 *     def initWeights(self, env=1, bias0=False, **kwds):  # Driver
 *         return self.mainModel.initWeights(env, bias0)             # <<<<<<<<<<<<<<
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_initWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_env, __pyx_v_bias0};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_env, __pyx_v_bias0};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_env);
    __Pyx_GIVEREF(__pyx_v_env);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_env);
    __Pyx_INCREF(__pyx_v_bias0);
    __Pyx_GIVEREF(__pyx_v_bias0);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_bias0);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1337
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 *     def initWeights(self, env=1, bias0=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.initWeights(env, bias0)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.initWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1340
 *         return self.mainModel.initWeights(env, bias0)
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver             # <<<<<<<<<<<<<<
 *         if value is None:
 *             if fname is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_77writeCostFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_77writeCostFunction = {"writeCostFunction", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_77writeCostFunction, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_77writeCostFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_fname = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("writeCostFunction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_fname,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fname);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeCostFunction") < 0)) __PYX_ERR(0, 1340, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_fname = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("writeCostFunction", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1340, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.writeCostFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_76writeCostFunction(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_fname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_76writeCostFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_fname) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("writeCostFunction", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "metaphor/monal/driver/_driver.py":1341
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver
 *         if value is None:             # <<<<<<<<<<<<<<
 *             if fname is None:
 *                 raise MonalError(cst.st_NeedFunctionName)
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1342
 *     def writeCostFunction(self, value=None, fname=None):    # Driver
 *         if value is None:
 *             if fname is None:             # <<<<<<<<<<<<<<
 *                 raise MonalError(cst.st_NeedFunctionName)
 *             if not fname in classCostDict:
 */
    __pyx_t_2 = (__pyx_v_fname == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (unlikely(__pyx_t_1)) {

      /* "metaphor/monal/driver/_driver.py":1343
 *         if value is None:
 *             if fname is None:
 *                 raise MonalError(cst.st_NeedFunctionName)             # <<<<<<<<<<<<<<
 *             if not fname in classCostDict:
 *                 raise MonalError(cst.st_CostFuncUnknown %fname)
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_st_NeedFunctionName); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1343, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1343, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":1342
 *     def writeCostFunction(self, value=None, fname=None):    # Driver
 *         if value is None:
 *             if fname is None:             # <<<<<<<<<<<<<<
 *                 raise MonalError(cst.st_NeedFunctionName)
 *             if not fname in classCostDict:
 */
    }

    /* "metaphor/monal/driver/_driver.py":1344
 *             if fname is None:
 *                 raise MonalError(cst.st_NeedFunctionName)
 *             if not fname in classCostDict:             # <<<<<<<<<<<<<<
 *                 raise MonalError(cst.st_CostFuncUnknown %fname)
 *             value = classCostDict[fname]()
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_classCostDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_fname, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (unlikely(__pyx_t_2)) {

      /* "metaphor/monal/driver/_driver.py":1345
 *                 raise MonalError(cst.st_NeedFunctionName)
 *             if not fname in classCostDict:
 *                 raise MonalError(cst.st_CostFuncUnknown %fname)             # <<<<<<<<<<<<<<
 *             value = classCostDict[fname]()
 *         self._costfunction = value
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_st_CostFuncUnknown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_Remainder(__pyx_t_6, __pyx_v_fname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1345, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
          __pyx_t_7 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1345, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":1344
 *             if fname is None:
 *                 raise MonalError(cst.st_NeedFunctionName)
 *             if not fname in classCostDict:             # <<<<<<<<<<<<<<
 *                 raise MonalError(cst.st_CostFuncUnknown %fname)
 *             value = classCostDict[fname]()
 */
    }

    /* "metaphor/monal/driver/_driver.py":1346
 *             if not fname in classCostDict:
 *                 raise MonalError(cst.st_CostFuncUnknown %fname)
 *             value = classCostDict[fname]()             # <<<<<<<<<<<<<<
 *         self._costfunction = value
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_classCostDict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_fname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1341
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver
 *         if value is None:             # <<<<<<<<<<<<<<
 *             if fname is None:
 *                 raise MonalError(cst.st_NeedFunctionName)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1347
 *                 raise MonalError(cst.st_CostFuncUnknown %fname)
 *             value = classCostDict[fname]()
 *         self._costfunction = value             # <<<<<<<<<<<<<<
 * 
 *     def loadParameters(self, source, **kwds):  # Driver
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_costfunction, __pyx_v_value) < 0) __PYX_ERR(0, 1347, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1340
 *         return self.mainModel.initWeights(env, bias0)
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver             # <<<<<<<<<<<<<<
 *         if value is None:
 *             if fname is None:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.writeCostFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1349
 *         self._costfunction = value
 * 
 *     def loadParameters(self, source, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if source is None: return
 *         if isinstance(source, (list, ndarray)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_79loadParameters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_79loadParameters = {"loadParameters", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_79loadParameters, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_79loadParameters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_source = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadParameters (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_source,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("loadParameters", 1, 2, 2, 1); __PYX_ERR(0, 1349, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "loadParameters") < 0)) __PYX_ERR(0, 1349, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_source = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadParameters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1349, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.loadParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_78loadParameters(__pyx_self, __pyx_v_self, __pyx_v_source, __pyx_v_kwds);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_78loadParameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_source, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("loadParameters", 0);

  /* "metaphor/monal/driver/_driver.py":1350
 * 
 *     def loadParameters(self, source, **kwds):  # Driver
 *         if source is None: return             # <<<<<<<<<<<<<<
 *         if isinstance(source, (list, ndarray)):
 *             # chargement d'un vecteur
 */
  __pyx_t_1 = (__pyx_v_source == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":1351
 *     def loadParameters(self, source, **kwds):  # Driver
 *         if source is None: return
 *         if isinstance(source, (list, ndarray)):             # <<<<<<<<<<<<<<
 *             # chargement d'un vecteur
 *             return self.mainModel.weights.assign(source)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyList_Check(__pyx_v_source); 
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_source, __pyx_t_3); 
  __pyx_t_1 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1353
 *         if isinstance(source, (list, ndarray)):
 *             # chargement d'un vecteur
 *             return self.mainModel.weights.assign(source)             # <<<<<<<<<<<<<<
 *         if isinstance(source, dict):
 *             return self.loadFromDict(source)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_assign); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_source);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1351
 *     def loadParameters(self, source, **kwds):  # Driver
 *         if source is None: return
 *         if isinstance(source, (list, ndarray)):             # <<<<<<<<<<<<<<
 *             # chargement d'un vecteur
 *             return self.mainModel.weights.assign(source)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1354
 *             # chargement d'un vecteur
 *             return self.mainModel.weights.assign(source)
 *         if isinstance(source, dict):             # <<<<<<<<<<<<<<
 *             return self.loadFromDict(source)
 *         if isinstance(source, str):
 */
  __pyx_t_1 = PyDict_Check(__pyx_v_source); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1355
 *             return self.mainModel.weights.assign(source)
 *         if isinstance(source, dict):
 *             return self.loadFromDict(source)             # <<<<<<<<<<<<<<
 *         if isinstance(source, str):
 *             # chargement binaire
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadFromDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1355, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_source);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1354
 *             # chargement d'un vecteur
 *             return self.mainModel.weights.assign(source)
 *         if isinstance(source, dict):             # <<<<<<<<<<<<<<
 *             return self.loadFromDict(source)
 *         if isinstance(source, str):
 */
  }

  /* "metaphor/monal/driver/_driver.py":1356
 *         if isinstance(source, dict):
 *             return self.loadFromDict(source)
 *         if isinstance(source, str):             # <<<<<<<<<<<<<<
 *             # chargement binaire
 *             if not self.loadWeightsBinary(source):
 */
  __pyx_t_2 = PyUnicode_Check(__pyx_v_source); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1358
 *         if isinstance(source, str):
 *             # chargement binaire
 *             if not self.loadWeightsBinary(source):             # <<<<<<<<<<<<<<
 *                 # chargement XML
 *                 if not self.loadWeightsXML(source, self.mainModel):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadWeightsBinary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_source);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1358, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = ((!__pyx_t_1) != 0);
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":1360
 *             if not self.loadWeightsBinary(source):
 *                 # chargement XML
 *                 if not self.loadWeightsXML(source, self.mainModel):             # <<<<<<<<<<<<<<
 *                 # chargement ASCII
 *                     if not self.loadWeightsASCII(source, self.mainModel):
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadWeightsXML); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_source, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_source, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1360, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_source);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1360, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = ((!__pyx_t_2) != 0);
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":1362
 *                 if not self.loadWeightsXML(source, self.mainModel):
 *                 # chargement ASCII
 *                     if not self.loadWeightsASCII(source, self.mainModel):             # <<<<<<<<<<<<<<
 *                         self.loadWeightsBinary(source)
 *         elif isinstance(source, NpzFile):  #np .lib.npyio.
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadWeightsASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1362, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_7 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_source, __pyx_t_9};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_source, __pyx_t_9};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1362, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_7) {
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
          }
          __Pyx_INCREF(__pyx_v_source);
          __Pyx_GIVEREF(__pyx_v_source);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_source);
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1362, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_2 = ((!__pyx_t_1) != 0);
        if (__pyx_t_2) {

          /* "metaphor/monal/driver/_driver.py":1363
 *                 # chargement ASCII
 *                     if not self.loadWeightsASCII(source, self.mainModel):
 *                         self.loadWeightsBinary(source)             # <<<<<<<<<<<<<<
 *         elif isinstance(source, NpzFile):  #np .lib.npyio.
 *             self.loadWeightsBinary(source)
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadWeightsBinary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1363, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (!__pyx_t_6) {
            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
              __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_source};
              __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            {
              __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1363, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
              __Pyx_INCREF(__pyx_v_source);
              __Pyx_GIVEREF(__pyx_v_source);
              PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_source);
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "metaphor/monal/driver/_driver.py":1362
 *                 if not self.loadWeightsXML(source, self.mainModel):
 *                 # chargement ASCII
 *                     if not self.loadWeightsASCII(source, self.mainModel):             # <<<<<<<<<<<<<<
 *                         self.loadWeightsBinary(source)
 *         elif isinstance(source, NpzFile):  #np .lib.npyio.
 */
        }

        /* "metaphor/monal/driver/_driver.py":1360
 *             if not self.loadWeightsBinary(source):
 *                 # chargement XML
 *                 if not self.loadWeightsXML(source, self.mainModel):             # <<<<<<<<<<<<<<
 *                 # chargement ASCII
 *                     if not self.loadWeightsASCII(source, self.mainModel):
 */
      }

      /* "metaphor/monal/driver/_driver.py":1358
 *         if isinstance(source, str):
 *             # chargement binaire
 *             if not self.loadWeightsBinary(source):             # <<<<<<<<<<<<<<
 *                 # chargement XML
 *                 if not self.loadWeightsXML(source, self.mainModel):
 */
    }

    /* "metaphor/monal/driver/_driver.py":1356
 *         if isinstance(source, dict):
 *             return self.loadFromDict(source)
 *         if isinstance(source, str):             # <<<<<<<<<<<<<<
 *             # chargement binaire
 *             if not self.loadWeightsBinary(source):
 */
    goto __pyx_L8;
  }

  /* "metaphor/monal/driver/_driver.py":1364
 *                     if not self.loadWeightsASCII(source, self.mainModel):
 *                         self.loadWeightsBinary(source)
 *         elif isinstance(source, NpzFile):  #np .lib.npyio.             # <<<<<<<<<<<<<<
 *             self.loadWeightsBinary(source)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NpzFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_source, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1365
 *                         self.loadWeightsBinary(source)
 *         elif isinstance(source, NpzFile):  #np .lib.npyio.
 *             self.loadWeightsBinary(source)             # <<<<<<<<<<<<<<
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadWeightsBinary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_source};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_INCREF(__pyx_v_source);
        __Pyx_GIVEREF(__pyx_v_source);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_source);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1364
 *                     if not self.loadWeightsASCII(source, self.mainModel):
 *                         self.loadWeightsBinary(source)
 *         elif isinstance(source, NpzFile):  #np .lib.npyio.             # <<<<<<<<<<<<<<
 *             self.loadWeightsBinary(source)
 * 
 */
  }
  __pyx_L8:;

  /* "metaphor/monal/driver/_driver.py":1349
 *         self._costfunction = value
 * 
 *     def loadParameters(self, source, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if source is None: return
 *         if isinstance(source, (list, ndarray)):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.loadParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1367
 *             self.loadWeightsBinary(source)
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_81loadTrainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_81loadTrainingData = {"loadTrainingData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_81loadTrainingData, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_81loadTrainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_datasource = 0;
  PyObject *__pyx_v_dataset = 0;
  PyObject *__pyx_v_dataformat = 0;
  PyObject *__pyx_v_datastyle = 0;
  PyObject *__pyx_v_normalize = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("loadTrainingData (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_datasource,&__pyx_n_s_dataset,&__pyx_n_s_dataformat,&__pyx_n_s_datastyle,&__pyx_n_s_normalize,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject*)__pyx_n_u_csv));
    values[5] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datasource);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataformat);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datastyle);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normalize);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "loadTrainingData") < 0)) __PYX_ERR(0, 1367, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_datasource = values[1];
    __pyx_v_dataset = values[2];
    __pyx_v_dataformat = values[3];
    __pyx_v_datastyle = values[4];
    __pyx_v_normalize = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loadTrainingData", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1367, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.loadTrainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_80loadTrainingData(__pyx_self, __pyx_v_self, __pyx_v_datasource, __pyx_v_dataset, __pyx_v_dataformat, __pyx_v_datastyle, __pyx_v_normalize, __pyx_v_kwds);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_80loadTrainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_datasource, PyObject *__pyx_v_dataset, PyObject *__pyx_v_dataformat, PyObject *__pyx_v_datastyle, PyObject *__pyx_v_normalize, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_ff = NULL;
  PyObject *__pyx_v_ni = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_v_il = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_stval = NULL;
  PyObject *__pyx_v_value = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_computelevel = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  PyObject *(*__pyx_t_18)(PyObject *);
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  __Pyx_RefNannySetupContext("loadTrainingData", 0);
  __Pyx_INCREF(__pyx_v_dataset);
  __Pyx_INCREF(__pyx_v_dataformat);

  /* "metaphor/monal/driver/_driver.py":1368
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver
 *         if datasource is not None and dataset is not None:             # <<<<<<<<<<<<<<
 *             raise MonalError ("Either file source or dataset but not both")
 *         if datasource is None and dataset is None:
 */
  __pyx_t_2 = (__pyx_v_datasource != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_dataset != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "metaphor/monal/driver/_driver.py":1369
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")             # <<<<<<<<<<<<<<
 *         if datasource is None and dataset is None:
 *             raise MonalError ("Either file source or dataset needs not to be None")
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 1369, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1368
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver
 *         if datasource is not None and dataset is not None:             # <<<<<<<<<<<<<<
 *             raise MonalError ("Either file source or dataset but not both")
 *         if datasource is None and dataset is None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1370
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")
 *         if datasource is None and dataset is None:             # <<<<<<<<<<<<<<
 *             raise MonalError ("Either file source or dataset needs not to be None")
 *         if datasource is not None:
 */
  __pyx_t_2 = (__pyx_v_datasource == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_dataset == Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "metaphor/monal/driver/_driver.py":1371
 *             raise MonalError ("Either file source or dataset but not both")
 *         if datasource is None and dataset is None:
 *             raise MonalError ("Either file source or dataset needs not to be None")             # <<<<<<<<<<<<<<
 *         if datasource is not None:
 *             if isinstance(datasource, DataManager):
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1371, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1370
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")
 *         if datasource is None and dataset is None:             # <<<<<<<<<<<<<<
 *             raise MonalError ("Either file source or dataset needs not to be None")
 *         if datasource is not None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1372
 *         if datasource is None and dataset is None:
 *             raise MonalError ("Either file source or dataset needs not to be None")
 *         if datasource is not None:             # <<<<<<<<<<<<<<
 *             if isinstance(datasource, DataManager):
 *                 dataset = datasource
 */
  __pyx_t_1 = (__pyx_v_datasource != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1373
 *             raise MonalError ("Either file source or dataset needs not to be None")
 *         if datasource is not None:
 *             if isinstance(datasource, DataManager):             # <<<<<<<<<<<<<<
 *                 dataset = datasource
 *             elif hasattr(datasource, "read"):
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DataManager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_IsInstance(__pyx_v_datasource, __pyx_t_4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":1374
 *         if datasource is not None:
 *             if isinstance(datasource, DataManager):
 *                 dataset = datasource             # <<<<<<<<<<<<<<
 *             elif hasattr(datasource, "read"):
 *                 dataset = DataManager(datasource=datasource)
 */
      __Pyx_INCREF(__pyx_v_datasource);
      __Pyx_DECREF_SET(__pyx_v_dataset, __pyx_v_datasource);

      /* "metaphor/monal/driver/_driver.py":1373
 *             raise MonalError ("Either file source or dataset needs not to be None")
 *         if datasource is not None:
 *             if isinstance(datasource, DataManager):             # <<<<<<<<<<<<<<
 *                 dataset = datasource
 *             elif hasattr(datasource, "read"):
 */
      goto __pyx_L10;
    }

    /* "metaphor/monal/driver/_driver.py":1375
 *             if isinstance(datasource, DataManager):
 *                 dataset = datasource
 *             elif hasattr(datasource, "read"):             # <<<<<<<<<<<<<<
 *                 dataset = DataManager(datasource=datasource)
 *             elif isinstance(datasource, str):
 */
    __pyx_t_1 = __Pyx_HasAttr(__pyx_v_datasource, __pyx_n_u_read); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1375, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":1376
 *                 dataset = datasource
 *             elif hasattr(datasource, "read"):
 *                 dataset = DataManager(datasource=datasource)             # <<<<<<<<<<<<<<
 *             elif isinstance(datasource, str):
 *                 if os.path.exists(datasource):
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DataManager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_datasource, __pyx_v_datasource) < 0) __PYX_ERR(0, 1376, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_dataset, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":1375
 *             if isinstance(datasource, DataManager):
 *                 dataset = datasource
 *             elif hasattr(datasource, "read"):             # <<<<<<<<<<<<<<
 *                 dataset = DataManager(datasource=datasource)
 *             elif isinstance(datasource, str):
 */
      goto __pyx_L10;
    }

    /* "metaphor/monal/driver/_driver.py":1377
 *             elif hasattr(datasource, "read"):
 *                 dataset = DataManager(datasource=datasource)
 *             elif isinstance(datasource, str):             # <<<<<<<<<<<<<<
 *                 if os.path.exists(datasource):
 *                     with open(datasource, "r") as ff:
 */
    __pyx_t_2 = PyUnicode_Check(__pyx_v_datasource); 
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":1378
 *                 dataset = DataManager(datasource=datasource)
 *             elif isinstance(datasource, str):
 *                 if os.path.exists(datasource):             # <<<<<<<<<<<<<<
 *                     with open(datasource, "r") as ff:
 *                         dataset = DataManager(datasource=ff)
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_datasource); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_datasource};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1378, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_datasource};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1378, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1378, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_datasource);
          __Pyx_GIVEREF(__pyx_v_datasource);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datasource);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1378, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1378, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":1379
 *             elif isinstance(datasource, str):
 *                 if os.path.exists(datasource):
 *                     with open(datasource, "r") as ff:             # <<<<<<<<<<<<<<
 *                         dataset = DataManager(datasource=ff)
 *                 else:
 */
        /*with:*/ {
          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_datasource);
          __Pyx_GIVEREF(__pyx_v_datasource);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_datasource);
          __Pyx_INCREF(__pyx_n_u_r);
          __Pyx_GIVEREF(__pyx_n_u_r);
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_r);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1379, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          if (__pyx_t_4) {
            __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L12_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L12_error)
          }
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __pyx_t_6;
          __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          /*try:*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_10);
              __Pyx_XGOTREF(__pyx_t_11);
              /*try:*/ {
                __pyx_v_ff = __pyx_t_7;
                __pyx_t_7 = 0;

                /* "metaphor/monal/driver/_driver.py":1380
 *                 if os.path.exists(datasource):
 *                     with open(datasource, "r") as ff:
 *                         dataset = DataManager(datasource=ff)             # <<<<<<<<<<<<<<
 *                 else:
 *                     dataset = DataManager(datasource, style=datastyle)
 */
                __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_DataManager); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_7);
                __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_5);
                if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_datasource, __pyx_v_ff) < 0) __PYX_ERR(0, 1380, __pyx_L16_error)
                __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1380, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF_SET(__pyx_v_dataset, __pyx_t_6);
                __pyx_t_6 = 0;

                /* "metaphor/monal/driver/_driver.py":1379
 *             elif isinstance(datasource, str):
 *                 if os.path.exists(datasource):
 *                     with open(datasource, "r") as ff:             # <<<<<<<<<<<<<<
 *                         dataset = DataManager(datasource=ff)
 *                 else:
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              goto __pyx_L21_try_end;
              __pyx_L16_error:;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.loadTrainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 1379, __pyx_L18_except_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_GOTREF(__pyx_t_7);
                __pyx_t_4 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L18_except_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1379, __pyx_L18_except_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                if (__pyx_t_1 < 0) __PYX_ERR(0, 1379, __pyx_L18_except_error)
                __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
                if (__pyx_t_2) {
                  __Pyx_GIVEREF(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_5);
                  __Pyx_XGIVEREF(__pyx_t_7);
                  __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_5, __pyx_t_7);
                  __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; 
                  __PYX_ERR(0, 1379, __pyx_L18_except_error)
                }
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                goto __pyx_L17_exception_handled;
              }
              __pyx_L18_except_error:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
              goto __pyx_L1_error;
              __pyx_L17_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
              __pyx_L21_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_8) {
                __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__50, NULL);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1379, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
              goto __pyx_L15;
            }
            __pyx_L15:;
          }
          goto __pyx_L25;
          __pyx_L12_error:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L1_error;
          __pyx_L25:;
        }

        /* "metaphor/monal/driver/_driver.py":1378
 *                 dataset = DataManager(datasource=datasource)
 *             elif isinstance(datasource, str):
 *                 if os.path.exists(datasource):             # <<<<<<<<<<<<<<
 *                     with open(datasource, "r") as ff:
 *                         dataset = DataManager(datasource=ff)
 */
        goto __pyx_L11;
      }

      /* "metaphor/monal/driver/_driver.py":1382
 *                         dataset = DataManager(datasource=ff)
 *                 else:
 *                     dataset = DataManager(datasource, style=datastyle)             # <<<<<<<<<<<<<<
 *             else:
 *                 dataset = DataManager(data=datasource, style="array")
 */
      /*else*/ {
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_DataManager); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_datasource);
        __Pyx_GIVEREF(__pyx_v_datasource);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_datasource);
        __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_style, __pyx_v_datastyle) < 0) __PYX_ERR(0, 1382, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_dataset, __pyx_t_4);
        __pyx_t_4 = 0;
      }
      __pyx_L11:;

      /* "metaphor/monal/driver/_driver.py":1377
 *             elif hasattr(datasource, "read"):
 *                 dataset = DataManager(datasource=datasource)
 *             elif isinstance(datasource, str):             # <<<<<<<<<<<<<<
 *                 if os.path.exists(datasource):
 *                     with open(datasource, "r") as ff:
 */
      goto __pyx_L10;
    }

    /* "metaphor/monal/driver/_driver.py":1384
 *                     dataset = DataManager(datasource, style=datastyle)
 *             else:
 *                 dataset = DataManager(data=datasource, style="array")             # <<<<<<<<<<<<<<
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DataManager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_datasource) < 0) __PYX_ERR(0, 1384, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_style, __pyx_n_u_array) < 0) __PYX_ERR(0, 1384, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_dataset, __pyx_t_5);
      __pyx_t_5 = 0;
    }
    __pyx_L10:;

    /* "metaphor/monal/driver/_driver.py":1372
 *         if datasource is None and dataset is None:
 *             raise MonalError ("Either file source or dataset needs not to be None")
 *         if datasource is not None:             # <<<<<<<<<<<<<<
 *             if isinstance(datasource, DataManager):
 *                 dataset = datasource
 */
  }

  /* "metaphor/monal/driver/_driver.py":1385
 *             else:
 *                 dataset = DataManager(data=datasource, style="array")
 *         ni = self.mainModel.inputCount             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         if dataformat is None:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_ni = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1386
 *                 dataset = DataManager(data=datasource, style="array")
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         if dataformat is None:
 *             dataformat = list(range(ni + no))
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_no = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1387
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 *         if dataformat is None:             # <<<<<<<<<<<<<<
 *             dataformat = list(range(ni + no))
 *         elif len(dataformat) < ni + no:
 */
  __pyx_t_2 = (__pyx_v_dataformat == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1388
 *         no = self.mainModel.outputCount
 *         if dataformat is None:
 *             dataformat = list(range(ni + no))             # <<<<<<<<<<<<<<
 *         elif len(dataformat) < ni + no:
 *             raise MonalError("Incorrect dataformat")
 */
    __pyx_t_5 = PyNumber_Add(__pyx_v_ni, __pyx_v_no); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_dataformat, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1387
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 *         if dataformat is None:             # <<<<<<<<<<<<<<
 *             dataformat = list(range(ni + no))
 *         elif len(dataformat) < ni + no:
 */
    goto __pyx_L26;
  }

  /* "metaphor/monal/driver/_driver.py":1389
 *         if dataformat is None:
 *             dataformat = list(range(ni + no))
 *         elif len(dataformat) < ni + no:             # <<<<<<<<<<<<<<
 *             raise MonalError("Incorrect dataformat")
 *         if (self._dataArray is None):
 */
  __pyx_t_13 = PyObject_Length(__pyx_v_dataformat); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1389, __pyx_L1_error)
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Add(__pyx_v_ni, __pyx_v_no); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "metaphor/monal/driver/_driver.py":1390
 *             dataformat = list(range(ni + no))
 *         elif len(dataformat) < ni + no:
 *             raise MonalError("Incorrect dataformat")             # <<<<<<<<<<<<<<
 *         if (self._dataArray is None):
 *             self.dataCount = dataset.length
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1390, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1389
 *         if dataformat is None:
 *             dataformat = list(range(ni + no))
 *         elif len(dataformat) < ni + no:             # <<<<<<<<<<<<<<
 *             raise MonalError("Incorrect dataformat")
 *         if (self._dataArray is None):
 */
  }
  __pyx_L26:;

  /* "metaphor/monal/driver/_driver.py":1391
 *         elif len(dataformat) < ni + no:
 *             raise MonalError("Incorrect dataformat")
 *         if (self._dataArray is None):             # <<<<<<<<<<<<<<
 *             self.dataCount = dataset.length
 * #            for i in range(len(dataformat)):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = (__pyx_t_6 == Py_None);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1392
 *             raise MonalError("Incorrect dataformat")
 *         if (self._dataArray is None):
 *             self.dataCount = dataset.length             # <<<<<<<<<<<<<<
 * #            for i in range(len(dataformat)):
 * #                st = dataset.titles(dataformat[i])
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataset, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataCount, __pyx_t_6) < 0) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1395
 * #            for i in range(len(dataformat)):
 * #                st = dataset.titles(dataformat[i])
 *             for i, st in enumerate(dataset.titles):             # <<<<<<<<<<<<<<
 *                 if i in dataformat:
 *                     j = dataformat.index(i)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_6 = __pyx_int_0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataset, __pyx_n_s_titles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1395, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1395, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1395, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_14(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1395, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
      __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6);
      __pyx_t_6 = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":1396
 * #                st = dataset.titles(dataformat[i])
 *             for i, st in enumerate(dataset.titles):
 *                 if i in dataformat:             # <<<<<<<<<<<<<<
 *                     j = dataformat.index(i)
 *                 else:
 */
      __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_i, __pyx_v_dataformat, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1396, __pyx_L1_error)
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":1397
 *             for i, st in enumerate(dataset.titles):
 *                 if i in dataformat:
 *                     j = dataformat.index(i)             # <<<<<<<<<<<<<<
 *                 else:
 *                     continue
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataformat, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_15 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_15) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_i};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_4);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_i};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_GOTREF(__pyx_t_4);
          } else
          #endif
          {
            __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1397, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
            __Pyx_INCREF(__pyx_v_i);
            __Pyx_GIVEREF(__pyx_v_i);
            PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_i);
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":1396
 * #                st = dataset.titles(dataformat[i])
 *             for i, st in enumerate(dataset.titles):
 *                 if i in dataformat:             # <<<<<<<<<<<<<<
 *                     j = dataformat.index(i)
 *                 else:
 */
        goto __pyx_L30;
      }

      /* "metaphor/monal/driver/_driver.py":1399
 *                     j = dataformat.index(i)
 *                 else:
 *                     continue             # <<<<<<<<<<<<<<
 *                 if j < ni:
 *                     if self.inNormModel:
 */
      /*else*/ {
        goto __pyx_L28_continue;
      }
      __pyx_L30:;

      /* "metaphor/monal/driver/_driver.py":1400
 *                 else:
 *                     continue
 *                 if j < ni:             # <<<<<<<<<<<<<<
 *                     if self.inNormModel:
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st
 */
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_j, __pyx_v_ni, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1400, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":1401
 *                     continue
 *                 if j < ni:
 *                     if self.inNormModel:             # <<<<<<<<<<<<<<
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st
 *                         self.inNormModel.inputNames[j] = st
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1401, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_1) {

          /* "metaphor/monal/driver/_driver.py":1402
 *                 if j < ni:
 *                     if self.inNormModel:
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st             # <<<<<<<<<<<<<<
 *                         self.inNormModel.inputNames[j] = st
 *                         self.inNormModel.outputNames[j] = "N_{}".format(st)
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_N, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          if (!__pyx_t_16) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_st); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_7)) {
              PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_st};
              __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_GOTREF(__pyx_t_4);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
              PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_st};
              __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_GOTREF(__pyx_t_4);
            } else
            #endif
            {
              __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1402, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __pyx_t_16 = NULL;
              __Pyx_INCREF(__pyx_v_st);
              __Pyx_GIVEREF(__pyx_v_st);
              PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_st);
              __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_inputNodes); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_v_j); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_name, __pyx_t_4) < 0) __PYX_ERR(0, 1402, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":1403
 *                     if self.inNormModel:
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st
 *                         self.inNormModel.inputNames[j] = st             # <<<<<<<<<<<<<<
 *                         self.inNormModel.outputNames[j] = "N_{}".format(st)
 *                     else:
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1403, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_j, __pyx_v_st) < 0)) __PYX_ERR(0, 1403, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "metaphor/monal/driver/_driver.py":1404
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st
 *                         self.inNormModel.inputNames[j] = st
 *                         self.inNormModel.outputNames[j] = "N_{}".format(st)             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.mainModel.inputNodes[j].name = st  #InputName[i] = st
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_N, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1404, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          if (!__pyx_t_15) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_st); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_7)) {
              PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_st};
              __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_GOTREF(__pyx_t_4);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
              PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_st};
              __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_GOTREF(__pyx_t_4);
            } else
            #endif
            {
              __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1404, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
              __Pyx_INCREF(__pyx_v_st);
              __Pyx_GIVEREF(__pyx_v_st);
              PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_st);
              __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1404, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1404, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_v_j, __pyx_t_4) < 0)) __PYX_ERR(0, 1404, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "metaphor/monal/driver/_driver.py":1401
 *                     continue
 *                 if j < ni:
 *                     if self.inNormModel:             # <<<<<<<<<<<<<<
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st
 *                         self.inNormModel.inputNames[j] = st
 */
          goto __pyx_L32;
        }

        /* "metaphor/monal/driver/_driver.py":1406
 *                         self.inNormModel.outputNames[j] = "N_{}".format(st)
 *                     else:
 *                         self.mainModel.inputNodes[j].name = st  #InputName[i] = st             # <<<<<<<<<<<<<<
 * 
 *                 elif i < ni + no:
 */
        /*else*/ {
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inputNodes); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_name, __pyx_v_st) < 0) __PYX_ERR(0, 1406, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_L32:;

        /* "metaphor/monal/driver/_driver.py":1400
 *                 else:
 *                     continue
 *                 if j < ni:             # <<<<<<<<<<<<<<
 *                     if self.inNormModel:
 *                         self.mainModel.inputNodes[j].name = "N_{}".format(st)  #InputName[i] = st
 */
        goto __pyx_L31;
      }

      /* "metaphor/monal/driver/_driver.py":1408
 *                         self.mainModel.inputNodes[j].name = st  #InputName[i] = st
 * 
 *                 elif i < ni + no:             # <<<<<<<<<<<<<<
 *                     if self.outNormModel:
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st
 */
      __pyx_t_4 = PyNumber_Add(__pyx_v_ni, __pyx_v_no); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_16 = PyObject_RichCompare(__pyx_v_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1408, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1408, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":1409
 * 
 *                 elif i < ni + no:
 *                     if self.outNormModel:             # <<<<<<<<<<<<<<
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st
 *                         self.outNormModel.outputNames[i - ni] = st
 */
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (__pyx_t_1) {

          /* "metaphor/monal/driver/_driver.py":1410
 *                 elif i < ni + no:
 *                     if self.outNormModel:
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st             # <<<<<<<<<<<<<<
 *                         self.outNormModel.outputNames[i - ni] = st
 *                         self.outNormModel.inputNames[i - ni] = "N_{}".format(st)
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_N, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (!__pyx_t_7) {
            __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_st); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1410, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_st};
              __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1410, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_GOTREF(__pyx_t_16);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
              PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_st};
              __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1410, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_GOTREF(__pyx_t_16);
            } else
            #endif
            {
              __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1410, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
              __Pyx_INCREF(__pyx_v_st);
              __Pyx_GIVEREF(__pyx_v_st);
              PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_st);
              __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1410, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputNodes); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyNumber_Subtract(__pyx_v_i, __pyx_v_ni); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_name, __pyx_t_16) < 0) __PYX_ERR(0, 1410, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":1411
 *                     if self.outNormModel:
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st
 *                         self.outNormModel.outputNames[i - ni] = st             # <<<<<<<<<<<<<<
 *                         self.outNormModel.inputNames[i - ni] = "N_{}".format(st)
 *                     else:
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1411, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1411, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyNumber_Subtract(__pyx_v_i, __pyx_v_ni); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1411, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_t_7, __pyx_v_st) < 0)) __PYX_ERR(0, 1411, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":1412
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st
 *                         self.outNormModel.outputNames[i - ni] = st
 *                         self.outNormModel.inputNames[i - ni] = "N_{}".format(st)             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.mainModel.outputNodes[i - ni].name = st  #OutputName[i - ni] = st
 */
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_N, __pyx_n_s_format); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_16, function);
            }
          }
          if (!__pyx_t_4) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_v_st); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1412, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_16)) {
              PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_st};
              __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1412, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_GOTREF(__pyx_t_7);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
              PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_st};
              __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1412, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_GOTREF(__pyx_t_7);
            } else
            #endif
            {
              __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1412, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __pyx_t_4 = NULL;
              __Pyx_INCREF(__pyx_v_st);
              __Pyx_GIVEREF(__pyx_v_st);
              PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_st);
              __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1412, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = PyNumber_Subtract(__pyx_v_i, __pyx_v_ni); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_t_16, __pyx_t_7) < 0)) __PYX_ERR(0, 1412, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "metaphor/monal/driver/_driver.py":1409
 * 
 *                 elif i < ni + no:
 *                     if self.outNormModel:             # <<<<<<<<<<<<<<
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st
 *                         self.outNormModel.outputNames[i - ni] = st
 */
          goto __pyx_L33;
        }

        /* "metaphor/monal/driver/_driver.py":1414
 *                         self.outNormModel.inputNames[i - ni] = "N_{}".format(st)
 *                     else:
 *                         self.mainModel.outputNodes[i - ni].name = st  #OutputName[i - ni] = st             # <<<<<<<<<<<<<<
 * 
 *         for il, line in enumerate(dataset):
 */
        /*else*/ {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1414, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_outputNodes); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1414, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyNumber_Subtract(__pyx_v_i, __pyx_v_ni); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1414, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1414, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__Pyx_PyObject_SetAttrStr(__pyx_t_15, __pyx_n_s_name, __pyx_v_st) < 0) __PYX_ERR(0, 1414, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __pyx_L33:;

        /* "metaphor/monal/driver/_driver.py":1408
 *                         self.mainModel.inputNodes[j].name = st  #InputName[i] = st
 * 
 *                 elif i < ni + no:             # <<<<<<<<<<<<<<
 *                     if self.outNormModel:
 *                         self.mainModel.outputNodes[i - ni].name = "N_{}".format(st)  #OutputName[i - ni] = st
 */
      }
      __pyx_L31:;

      /* "metaphor/monal/driver/_driver.py":1395
 * #            for i in range(len(dataformat)):
 * #                st = dataset.titles(dataformat[i])
 *             for i, st in enumerate(dataset.titles):             # <<<<<<<<<<<<<<
 *                 if i in dataformat:
 *                     j = dataformat.index(i)
 */
      __pyx_L28_continue:;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1391
 *         elif len(dataformat) < ni + no:
 *             raise MonalError("Incorrect dataformat")
 *         if (self._dataArray is None):             # <<<<<<<<<<<<<<
 *             self.dataCount = dataset.length
 * #            for i in range(len(dataformat)):
 */
  }

  /* "metaphor/monal/driver/_driver.py":1416
 *                         self.mainModel.outputNodes[i - ni].name = st  #OutputName[i - ni] = st
 * 
 *         for il, line in enumerate(dataset):             # <<<<<<<<<<<<<<
 *             for i, stval in enumerate(line):
 *                 if i in dataformat:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_6 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_dataset)) || PyTuple_CheckExact(__pyx_v_dataset)) {
    __pyx_t_5 = __pyx_v_dataset; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0;
    __pyx_t_14 = NULL;
  } else {
    __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1416, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_14)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_15 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
        #else
        __pyx_t_15 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        #endif
      } else {
        if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
        #else
        __pyx_t_15 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        #endif
      }
    } else {
      __pyx_t_15 = __pyx_t_14(__pyx_t_5);
      if (unlikely(!__pyx_t_15)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1416, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_15);
    }
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_15);
    __pyx_t_15 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_il, __pyx_t_6);
    __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_15;
    __pyx_t_15 = 0;

    /* "metaphor/monal/driver/_driver.py":1417
 * 
 *         for il, line in enumerate(dataset):
 *             for i, stval in enumerate(line):             # <<<<<<<<<<<<<<
 *                 if i in dataformat:
 *                     j = dataformat.index(i)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_15 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_line)) || PyTuple_CheckExact(__pyx_v_line)) {
      __pyx_t_7 = __pyx_v_line; __Pyx_INCREF(__pyx_t_7); __pyx_t_17 = 0;
      __pyx_t_18 = NULL;
    } else {
      __pyx_t_17 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_line); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_18 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1417, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_18)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_16 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_17); __Pyx_INCREF(__pyx_t_16); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 1417, __pyx_L1_error)
          #else
          __pyx_t_16 = PySequence_ITEM(__pyx_t_7, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1417, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          #endif
        } else {
          if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_17); __Pyx_INCREF(__pyx_t_16); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 1417, __pyx_L1_error)
          #else
          __pyx_t_16 = PySequence_ITEM(__pyx_t_7, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1417, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          #endif
        }
      } else {
        __pyx_t_16 = __pyx_t_18(__pyx_t_7);
        if (unlikely(!__pyx_t_16)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1417, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_16);
      }
      __Pyx_XDECREF_SET(__pyx_v_stval, __pyx_t_16);
      __pyx_t_16 = 0;
      __Pyx_INCREF(__pyx_t_15);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_15);
      __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_t_15, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15);
      __pyx_t_15 = __pyx_t_16;
      __pyx_t_16 = 0;

      /* "metaphor/monal/driver/_driver.py":1418
 *         for il, line in enumerate(dataset):
 *             for i, stval in enumerate(line):
 *                 if i in dataformat:             # <<<<<<<<<<<<<<
 *                     j = dataformat.index(i)
 *                 else:
 */
      __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_i, __pyx_v_dataformat, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1418, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":1419
 *             for i, stval in enumerate(line):
 *                 if i in dataformat:
 *                     j = dataformat.index(i)             # <<<<<<<<<<<<<<
 *                 else:
 *                     continue
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataformat, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_19 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_19)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (!__pyx_t_19) {
          __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1419, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_v_i};
            __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1419, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_GOTREF(__pyx_t_16);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_v_i};
            __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1419, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_GOTREF(__pyx_t_16);
          } else
          #endif
          {
            __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1419, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_20);
            __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19); __pyx_t_19 = NULL;
            __Pyx_INCREF(__pyx_v_i);
            __Pyx_GIVEREF(__pyx_v_i);
            PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_v_i);
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_20, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1419, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_16);
        __pyx_t_16 = 0;

        /* "metaphor/monal/driver/_driver.py":1418
 *         for il, line in enumerate(dataset):
 *             for i, stval in enumerate(line):
 *                 if i in dataformat:             # <<<<<<<<<<<<<<
 *                     j = dataformat.index(i)
 *                 else:
 */
        goto __pyx_L38;
      }

      /* "metaphor/monal/driver/_driver.py":1421
 *                     j = dataformat.index(i)
 *                 else:
 *                     continue             # <<<<<<<<<<<<<<
 *                 value = nntb.floatEx(stval)
 *                 self._dataArray[il, j] = value
 */
      /*else*/ {
        goto __pyx_L36_continue;
      }
      __pyx_L38:;

      /* "metaphor/monal/driver/_driver.py":1422
 *                 else:
 *                     continue
 *                 value = nntb.floatEx(stval)             # <<<<<<<<<<<<<<
 *                 self._dataArray[il, j] = value
 *         self._inputArray = self._dataArray[:, :ni]
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_floatEx); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1422, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_20))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_20);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_20, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_v_stval); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_20)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_stval};
          __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_16);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_stval};
          __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_16);
        } else
        #endif
        {
          __pyx_t_19 = PyTuple_New(1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_stval);
          __Pyx_GIVEREF(__pyx_v_stval);
          PyTuple_SET_ITEM(__pyx_t_19, 0+1, __pyx_v_stval);
          __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_19, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_16);
      __pyx_t_16 = 0;

      /* "metaphor/monal/driver/_driver.py":1423
 *                     continue
 *                 value = nntb.floatEx(stval)
 *                 self._dataArray[il, j] = value             # <<<<<<<<<<<<<<
 *         self._inputArray = self._dataArray[:, :ni]
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_INCREF(__pyx_v_il);
      __Pyx_GIVEREF(__pyx_v_il);
      PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_v_il);
      __Pyx_INCREF(__pyx_v_j);
      __Pyx_GIVEREF(__pyx_v_j);
      PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_v_j);
      if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_t_20, __pyx_v_value) < 0)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

      /* "metaphor/monal/driver/_driver.py":1417
 * 
 *         for il, line in enumerate(dataset):
 *             for i, stval in enumerate(line):             # <<<<<<<<<<<<<<
 *                 if i in dataformat:
 *                     j = dataformat.index(i)
 */
      __pyx_L36_continue:;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "metaphor/monal/driver/_driver.py":1416
 *                         self.mainModel.outputNodes[i - ni].name = st  #OutputName[i - ni] = st
 * 
 *         for il, line in enumerate(dataset):             # <<<<<<<<<<<<<<
 *             for i, stval in enumerate(line):
 *                 if i in dataformat:
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1424
 *                 value = nntb.floatEx(stval)
 *                 self._dataArray[il, j] = value
 *         self._inputArray = self._dataArray[:, :ni]             # <<<<<<<<<<<<<<
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         if normalize:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PySlice_New(Py_None, __pyx_v_ni, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_slice__52);
  __Pyx_GIVEREF(__pyx_slice__52);
  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_slice__52);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inputArray, __pyx_t_5) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1425
 *                 self._dataArray[il, j] = value
 *         self._inputArray = self._dataArray[:, :ni]
 *         self._outputArray = self._dataArray[:, ni:ni + no]             # <<<<<<<<<<<<<<
 *         if normalize:
 *             self.normalizeModel()
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_15 = PyNumber_Add(__pyx_v_ni, __pyx_v_no); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_6 = PySlice_New(__pyx_v_ni, __pyx_t_15, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);
  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_slice__53);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputArray, __pyx_t_6) < 0) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1426
 *         self._inputArray = self._dataArray[:, :ni]
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         if normalize:             # <<<<<<<<<<<<<<
 *             self.normalizeModel()
 *             computelevel = self._getComputeCondition(1, None)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_normalize); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1426, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1427
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         if normalize:
 *             self.normalizeModel()             # <<<<<<<<<<<<<<
 *             computelevel = self._getComputeCondition(1, None)
 *         return self
 */
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeModel); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1427, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1427, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1428
 *         if normalize:
 *             self.normalizeModel()
 *             computelevel = self._getComputeCondition(1, None)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getComputeCondition); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_computelevel = __pyx_t_15;
    __pyx_t_15 = 0;

    /* "metaphor/monal/driver/_driver.py":1426
 *         self._inputArray = self._dataArray[:, :ni]
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         if normalize:             # <<<<<<<<<<<<<<
 *             self.normalizeModel()
 *             computelevel = self._getComputeCondition(1, None)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1429
 *             self.normalizeModel()
 *             computelevel = self._getComputeCondition(1, None)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def _UnNormalizeModel(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1367
 *             self.loadWeightsBinary(source)
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.loadTrainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ff);
  __Pyx_XDECREF(__pyx_v_ni);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XDECREF(__pyx_v_il);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_stval);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_computelevel);
  __Pyx_XDECREF(__pyx_v_dataset);
  __Pyx_XDECREF(__pyx_v_dataformat);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1431
 *         return self
 * 
 *     def _UnNormalizeModel(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_83_UnNormalizeModel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_83_UnNormalizeModel = {"_UnNormalizeModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_83_UnNormalizeModel, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_83_UnNormalizeModel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_UnNormalizeModel (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_82_UnNormalizeModel(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_82_UnNormalizeModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_ni = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("_UnNormalizeModel", 0);

  /* "metaphor/monal/driver/_driver.py":1432
 * 
 *     def _UnNormalizeModel(self):  # Driver
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             return
 *         ni = self.mainModel.inputCount
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1433
 *     def _UnNormalizeModel(self):  # Driver
 *         if self._dataArray is None:
 *             return             # <<<<<<<<<<<<<<
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1432
 * 
 *     def _UnNormalizeModel(self):  # Driver
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             return
 *         ni = self.mainModel.inputCount
 */
  }

  /* "metaphor/monal/driver/_driver.py":1434
 *         if self._dataArray is None:
 *             return
 *         ni = self.mainModel.inputCount             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ni = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1435
 *             return
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         self._met = None
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_no = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1436
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 *         self._outputArray = self._dataArray[:, ni:ni + no]             # <<<<<<<<<<<<<<
 *         self._met = None
 *         if self.inNormModel:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_v_ni, __pyx_v_no); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PySlice_New(__pyx_v_ni, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_slice__55);
  __Pyx_GIVEREF(__pyx_slice__55);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_slice__55);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputArray, __pyx_t_5) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1437
 *         no = self.mainModel.outputCount
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         self._met = None             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             self._inputArray = self._dataArray[:ni, :]
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_met, Py_None) < 0) __PYX_ERR(0, 1437, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1438
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         self._met = None
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.inNormModel.inputNames):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1439
 *         self._met = None
 *         if self.inNormModel:
 *             self._inputArray = self._dataArray[:ni, :]             # <<<<<<<<<<<<<<
 *             for ind, value in enumerate(self.inNormModel.inputNames):
 *                 self.mainModel.inputNames[ind] = value
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySlice_New(Py_None, __pyx_v_ni, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
    __Pyx_INCREF(__pyx_slice__56);
    __Pyx_GIVEREF(__pyx_slice__56);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__56);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inputArray, __pyx_t_4) < 0) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1440
 *         if self.inNormModel:
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.inNormModel.inputNames):             # <<<<<<<<<<<<<<
 *                 self.mainModel.inputNames[ind] = value
 *             self.inNormModel = None
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1440, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_7(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1440, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_4);
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1441
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.inNormModel.inputNames):
 *                 self.mainModel.inputNames[ind] = value             # <<<<<<<<<<<<<<
 *             self.inNormModel = None
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_ind, __pyx_v_value) < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "metaphor/monal/driver/_driver.py":1440
 *         if self.inNormModel:
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.inNormModel.inputNames):             # <<<<<<<<<<<<<<
 *                 self.mainModel.inputNames[ind] = value
 *             self.inNormModel = None
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1442
 *             for ind, value in enumerate(self.inNormModel.inputNames):
 *                 self.mainModel.inputNames[ind] = value
 *             self.inNormModel = None             # <<<<<<<<<<<<<<
 * 
 *         if self.outNormModel:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel, Py_None) < 0) __PYX_ERR(0, 1442, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1438
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         self._met = None
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.inNormModel.inputNames):
 */
  }

  /* "metaphor/monal/driver/_driver.py":1444
 *             self.inNormModel = None
 * 
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.outNormModel.outputNames):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1445
 * 
 *         if self.outNormModel:
 *             self._inputArray = self._dataArray[:ni, :]             # <<<<<<<<<<<<<<
 *             for ind, value in enumerate(self.outNormModel.outputNames):
 *                 self.mainModel.outputNames[ind] = value
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySlice_New(Py_None, __pyx_v_ni, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
    __Pyx_INCREF(__pyx_slice__57);
    __Pyx_GIVEREF(__pyx_slice__57);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__57);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inputArray, __pyx_t_1) < 0) __PYX_ERR(0, 1445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1446
 *         if self.outNormModel:
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.outNormModel.outputNames):             # <<<<<<<<<<<<<<
 *                 self.mainModel.outputNames[ind] = value
 *             self.outNormModel = None
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1446, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1446, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1446, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1446, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_8);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1446, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":1447
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.outNormModel.outputNames):
 *                 self.mainModel.outputNames[ind] = value             # <<<<<<<<<<<<<<
 *             self.outNormModel = None
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_ind, __pyx_v_value) < 0)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1446
 *         if self.outNormModel:
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.outNormModel.outputNames):             # <<<<<<<<<<<<<<
 *                 self.mainModel.outputNames[ind] = value
 *             self.outNormModel = None
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1448
 *             for ind, value in enumerate(self.outNormModel.outputNames):
 *                 self.mainModel.outputNames[ind] = value
 *             self.outNormModel = None             # <<<<<<<<<<<<<<
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel, Py_None) < 0) __PYX_ERR(0, 1448, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1444
 *             self.inNormModel = None
 * 
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             self._inputArray = self._dataArray[:ni, :]
 *             for ind, value in enumerate(self.outNormModel.outputNames):
 */
  }

  /* "metaphor/monal/driver/_driver.py":1431
 *         return self
 * 
 *     def _UnNormalizeModel(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._UnNormalizeModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ni);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1450
 *             self.outNormModel = None
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_85getNomalizingMatrixFromData(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_85getNomalizingMatrixFromData = {"getNomalizingMatrixFromData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_85getNomalizingMatrixFromData, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_85getNomalizingMatrixFromData(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNomalizingMatrixFromData (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_84getNomalizingMatrixFromData(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_84getNomalizingMatrixFromData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getNomalizingMatrixFromData", 0);

  /* "metaphor/monal/driver/_driver.py":1451
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1452
 *     def getNomalizingMatrixFromData(self):  # Driver
 *         if self._dataArray is None:
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         else:
 *             nd = self._dataArray.shape[1]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_nd = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1451
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1454
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 *         else:
 *             nd = self._dataArray.shape[1]             # <<<<<<<<<<<<<<
 *         result = zeros((nd, 2))
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_nd = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1455
 *         else:
 *             nd = self._dataArray.shape[1]
 *         result = zeros((nd, 2))             # <<<<<<<<<<<<<<
 * 
 *         if self._dataArray is None:
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_nd);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1457
 *         result = zeros((nd, 2))
 * 
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             result[:, 1] += 1
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1458
 * 
 *         if self._dataArray is None:
 *             result[:, 1] += 1             # <<<<<<<<<<<<<<
 *         else:
 *             self._dataArray.std(axis=0, out=result[:, 0])
 */
    __Pyx_INCREF(__pyx_tuple__59);
    __pyx_t_8 = __pyx_tuple__59;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_result, __pyx_t_8, __pyx_t_5) < 0)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":1457
 *         result = zeros((nd, 2))
 * 
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             result[:, 1] += 1
 *         else:
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1460
 *             result[:, 1] += 1
 *         else:
 *             self._dataArray.std(axis=0, out=result[:, 0])             # <<<<<<<<<<<<<<
 *             self._dataArray.mean(axis=0, out=result[:, 1])
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_std); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1460, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_result, __pyx_tuple__61); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_out, __pyx_t_7) < 0) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":1461
 *         else:
 *             self._dataArray.std(axis=0, out=result[:, 0])
 *             self._dataArray.mean(axis=0, out=result[:, 1])             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_mean); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1461, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_result, __pyx_tuple__63); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_out, __pyx_t_1) < 0) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":1463
 *             self._dataArray.mean(axis=0, out=result[:, 1])
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def hasOutputMiniMaxi(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1450
 *             self.outNormModel = None
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getNomalizingMatrixFromData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1465
 *         return result
 * 
 *     def hasOutputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.outputCount:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_87hasOutputMiniMaxi(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_87hasOutputMiniMaxi = {"hasOutputMiniMaxi", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_87hasOutputMiniMaxi, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_87hasOutputMiniMaxi(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hasOutputMiniMaxi (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_86hasOutputMiniMaxi(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_86hasOutputMiniMaxi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("hasOutputMiniMaxi", 0);

  /* "metaphor/monal/driver/_driver.py":1466
 * 
 *     def hasOutputMiniMaxi(self):
 *         res = False             # <<<<<<<<<<<<<<
 *         if self.outputCount:
 *             node = self.mainModel.outputNodes[0]
 */
  __Pyx_INCREF(Py_False);
  __pyx_v_res = Py_False;

  /* "metaphor/monal/driver/_driver.py":1467
 *     def hasOutputMiniMaxi(self):
 *         res = False
 *         if self.outputCount:             # <<<<<<<<<<<<<<
 *             node = self.mainModel.outputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1468
 *         res = False
 *         if self.outputCount:
 *             node = self.mainModel.outputNodes[0]             # <<<<<<<<<<<<<<
 *             res =  node._mini is not None or node._maxi is not None
 *         return res
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputNodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_node = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1469
 *         if self.outputCount:
 *             node = self.mainModel.outputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_mini); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_maxi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_L4_bool_binop_done:;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1467
 *     def hasOutputMiniMaxi(self):
 *         res = False
 *         if self.outputCount:             # <<<<<<<<<<<<<<
 *             node = self.mainModel.outputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None
 */
  }

  /* "metaphor/monal/driver/_driver.py":1470
 *             node = self.mainModel.outputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1465
 *         return result
 * 
 *     def hasOutputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.outputCount:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.hasOutputMiniMaxi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1473
 * 
 *     @Property
 *     def outputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasOutputMiniMaxi():
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_89outputsMinMaxList(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_89outputsMinMaxList = {"outputsMinMaxList", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_89outputsMinMaxList, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_89outputsMinMaxList(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputsMinMaxList (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_88outputsMinMaxList(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_88outputsMinMaxList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("outputsMinMaxList", 0);

  /* "metaphor/monal/driver/_driver.py":1474
 *     @Property
 *     def outputsMinMaxList(self):
 *         if not self.hasOutputMiniMaxi():             # <<<<<<<<<<<<<<
 *             return None
 *         res = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hasOutputMiniMaxi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":1475
 *     def outputsMinMaxList(self):
 *         if not self.hasOutputMiniMaxi():
 *             return None             # <<<<<<<<<<<<<<
 *         res = []
 *         for node in self.mainModel.outputNodes:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1474
 *     @Property
 *     def outputsMinMaxList(self):
 *         if not self.hasOutputMiniMaxi():             # <<<<<<<<<<<<<<
 *             return None
 *         res = []
 */
  }

  /* "metaphor/monal/driver/_driver.py":1476
 *         if not self.hasOutputMiniMaxi():
 *             return None
 *         res = []             # <<<<<<<<<<<<<<
 *         for node in self.mainModel.outputNodes:
 *             res.append((node.minimum, node.maximum))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1477
 *             return None
 *         res = []
 *         for node in self.mainModel.outputNodes:             # <<<<<<<<<<<<<<
 *             res.append((node.minimum, node.maximum))
 *         return res
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputNodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1477, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1477, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1477, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1477, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1478
 *         res = []
 *         for node in self.mainModel.outputNodes:
 *             res.append((node.minimum, node.maximum))             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_minimum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_maximum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":1477
 *             return None
 *         res = []
 *         for node in self.mainModel.outputNodes:             # <<<<<<<<<<<<<<
 *             res.append((node.minimum, node.maximum))
 *         return res
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1479
 *         for node in self.mainModel.outputNodes:
 *             res.append((node.minimum, node.maximum))
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def hasInputMiniMaxi(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1473
 * 
 *     @Property
 *     def outputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasOutputMiniMaxi():
 *             return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputsMinMaxList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1481
 *         return res
 * 
 *     def hasInputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.inputCount:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_91hasInputMiniMaxi(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_91hasInputMiniMaxi = {"hasInputMiniMaxi", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_91hasInputMiniMaxi, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_91hasInputMiniMaxi(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hasInputMiniMaxi (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_90hasInputMiniMaxi(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_90hasInputMiniMaxi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("hasInputMiniMaxi", 0);

  /* "metaphor/monal/driver/_driver.py":1482
 * 
 *     def hasInputMiniMaxi(self):
 *         res = False             # <<<<<<<<<<<<<<
 *         if self.inputCount:
 *             node = self.mainModel.inputNodes[0]
 */
  __Pyx_INCREF(Py_False);
  __pyx_v_res = Py_False;

  /* "metaphor/monal/driver/_driver.py":1483
 *     def hasInputMiniMaxi(self):
 *         res = False
 *         if self.inputCount:             # <<<<<<<<<<<<<<
 *             node = self.mainModel.inputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1484
 *         res = False
 *         if self.inputCount:
 *             node = self.mainModel.inputNodes[0]             # <<<<<<<<<<<<<<
 *             res =  node._mini is not None or node._maxi is not None
 *         return res
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputNodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_node = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1485
 *         if self.inputCount:
 *             node = self.mainModel.inputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_mini); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_maxi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_L4_bool_binop_done:;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1483
 *     def hasInputMiniMaxi(self):
 *         res = False
 *         if self.inputCount:             # <<<<<<<<<<<<<<
 *             node = self.mainModel.inputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None
 */
  }

  /* "metaphor/monal/driver/_driver.py":1486
 *             node = self.mainModel.inputNodes[0]
 *             res =  node._mini is not None or node._maxi is not None
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1481
 *         return res
 * 
 *     def hasInputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.inputCount:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.hasInputMiniMaxi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1489
 * 
 *     @Property
 *     def inputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasInputMiniMaxi():
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_93inputsMinMaxList(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_93inputsMinMaxList = {"inputsMinMaxList", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_93inputsMinMaxList, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_93inputsMinMaxList(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputsMinMaxList (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_92inputsMinMaxList(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_92inputsMinMaxList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("inputsMinMaxList", 0);

  /* "metaphor/monal/driver/_driver.py":1490
 *     @Property
 *     def inputsMinMaxList(self):
 *         if not self.hasInputMiniMaxi():             # <<<<<<<<<<<<<<
 *             return None
 *         res = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hasInputMiniMaxi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":1491
 *     def inputsMinMaxList(self):
 *         if not self.hasInputMiniMaxi():
 *             return None             # <<<<<<<<<<<<<<
 *         res = []
 *         for node in self.mainModel.inputNodes:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1490
 *     @Property
 *     def inputsMinMaxList(self):
 *         if not self.hasInputMiniMaxi():             # <<<<<<<<<<<<<<
 *             return None
 *         res = []
 */
  }

  /* "metaphor/monal/driver/_driver.py":1492
 *         if not self.hasInputMiniMaxi():
 *             return None
 *         res = []             # <<<<<<<<<<<<<<
 *         for node in self.mainModel.inputNodes:
 *             res.append((node.minimum, node.maximum))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1493
 *             return None
 *         res = []
 *         for node in self.mainModel.inputNodes:             # <<<<<<<<<<<<<<
 *             res.append((node.minimum, node.maximum))
 *         return res
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputNodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1493, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1493, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1493, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1493, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1494
 *         res = []
 *         for node in self.mainModel.inputNodes:
 *             res.append((node.minimum, node.maximum))             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_minimum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_maximum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":1493
 *             return None
 *         res = []
 *         for node in self.mainModel.inputNodes:             # <<<<<<<<<<<<<<
 *             res.append((node.minimum, node.maximum))
 *         return res
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1495
 *         for node in self.mainModel.inputNodes:
 *             res.append((node.minimum, node.maximum))
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1489
 * 
 *     @Property
 *     def inputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasInputMiniMaxi():
 *             return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputsMinMaxList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1498
 * 
 *     @Property
 *     def inputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.inNormModel is not None:
 *             return self.inNormModel.data
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_95inputnorm(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_95inputnorm = {"inputnorm", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_95inputnorm, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_95inputnorm(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputnorm (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_94inputnorm(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_94inputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_8genexpr6__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannySetupContext("inputnorm", 0);

  /* "metaphor/monal/driver/_driver.py":1499
 *     @Property
 *     def inputnorm(self):
 *         if self.inNormModel is not None:             # <<<<<<<<<<<<<<
 *             return self.inNormModel.data
 * #         elif self.hasMiniMaxi():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1500
 *     def inputnorm(self):
 *         if self.inNormModel is not None:
 *             return self.inNormModel.data             # <<<<<<<<<<<<<<
 * #         elif self.hasMiniMaxi():
 * #             res = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1499
 *     @Property
 *     def inputnorm(self):
 *         if self.inNormModel is not None:             # <<<<<<<<<<<<<<
 *             return self.inNormModel.data
 * #         elif self.hasMiniMaxi():
 */
  }

  /* "metaphor/monal/driver/_driver.py":1506
 * #
 *         else:
 *             return [[1.0,0.0] for _ in range(self.inputCount)]             # <<<<<<<<<<<<<<
 *     @inputnorm.setter
 *     def inputnorm(self, value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1506, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1506, __pyx_L6_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1506, __pyx_L6_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_7(__pyx_t_1);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1506, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v__, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_float_1_0);
        __Pyx_GIVEREF(__pyx_float_1_0);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_float_1_0);
        __Pyx_INCREF(__pyx_float_0_0);
        __Pyx_GIVEREF(__pyx_float_0_0);
        PyList_SET_ITEM(__pyx_t_5, 1, __pyx_float_0_0);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1506, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v__); __pyx_8genexpr6__pyx_v__ = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v__); __pyx_8genexpr6__pyx_v__ = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":1498
 * 
 *     @Property
 *     def inputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.inNormModel is not None:
 *             return self.inNormModel.data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputnorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1508
 *             return [[1.0,0.0] for _ in range(self.inputCount)]
 *     @inputnorm.setter
 *     def inputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.inNormModel = Normalizer(data=value)
 *     inputNorm = inputnorm
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_97inputnorm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_97inputnorm = {"inputnorm", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_97inputnorm, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_97inputnorm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputnorm (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputnorm", 1, 2, 2, 1); __PYX_ERR(0, 1508, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputnorm") < 0)) __PYX_ERR(0, 1508, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputnorm", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1508, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputnorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_96inputnorm(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_96inputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("inputnorm", 0);

  /* "metaphor/monal/driver/_driver.py":1509
 *     @inputnorm.setter
 *     def inputnorm(self, value):
 *         self.inNormModel = Normalizer(data=value)             # <<<<<<<<<<<<<<
 *     inputNorm = inputnorm
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Normalizer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_data, __pyx_v_value) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel, __pyx_t_3) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1508
 *             return [[1.0,0.0] for _ in range(self.inputCount)]
 *     @inputnorm.setter
 *     def inputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.inNormModel = Normalizer(data=value)
 *     inputNorm = inputnorm
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputnorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1513
 * 
 *     @Property
 *     def outputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.outNormModel is not None:
 *             return self.outNormModel.data
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_99outputnorm(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_99outputnorm = {"outputnorm", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_99outputnorm, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_99outputnorm(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputnorm (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_98outputnorm(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_98outputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_8genexpr7__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannySetupContext("outputnorm", 0);

  /* "metaphor/monal/driver/_driver.py":1514
 *     @Property
 *     def outputnorm(self):
 *         if self.outNormModel is not None:             # <<<<<<<<<<<<<<
 *             return self.outNormModel.data
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1515
 *     def outputnorm(self):
 *         if self.outNormModel is not None:
 *             return self.outNormModel.data             # <<<<<<<<<<<<<<
 *         else:
 *             return [[1.0,0.0] for _ in range(self.outputCount)]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1514
 *     @Property
 *     def outputnorm(self):
 *         if self.outNormModel is not None:             # <<<<<<<<<<<<<<
 *             return self.outNormModel.data
 *         else:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1517
 *             return self.outNormModel.data
 *         else:
 *             return [[1.0,0.0] for _ in range(self.outputCount)]             # <<<<<<<<<<<<<<
 *     @outputnorm.setter
 *     def outputnorm(self, value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1517, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1517, __pyx_L6_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1517, __pyx_L6_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_7(__pyx_t_1);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1517, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v__, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_float_1_0);
        __Pyx_GIVEREF(__pyx_float_1_0);
        PyList_SET_ITEM(__pyx_t_5, 0, __pyx_float_1_0);
        __Pyx_INCREF(__pyx_float_0_0);
        __Pyx_GIVEREF(__pyx_float_0_0);
        PyList_SET_ITEM(__pyx_t_5, 1, __pyx_float_0_0);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1517, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v__); __pyx_8genexpr7__pyx_v__ = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v__); __pyx_8genexpr7__pyx_v__ = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":1513
 * 
 *     @Property
 *     def outputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.outNormModel is not None:
 *             return self.outNormModel.data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputnorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1519
 *             return [[1.0,0.0] for _ in range(self.outputCount)]
 *     @outputnorm.setter
 *     def outputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.outNormModel = Normalizer(data=value)
 *     outputNorm = outputnorm
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_101outputnorm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_101outputnorm = {"outputnorm", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_101outputnorm, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_101outputnorm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outputnorm (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outputnorm", 1, 2, 2, 1); __PYX_ERR(0, 1519, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outputnorm") < 0)) __PYX_ERR(0, 1519, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outputnorm", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1519, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputnorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_100outputnorm(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_100outputnorm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("outputnorm", 0);

  /* "metaphor/monal/driver/_driver.py":1520
 *     @outputnorm.setter
 *     def outputnorm(self, value):
 *         self.outNormModel = Normalizer(data=value)             # <<<<<<<<<<<<<<
 *     outputNorm = outputnorm
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Normalizer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_data, __pyx_v_value) < 0) __PYX_ERR(0, 1520, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel, __pyx_t_3) < 0) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1519
 *             return [[1.0,0.0] for _ in range(self.outputCount)]
 *     @outputnorm.setter
 *     def outputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.outNormModel = Normalizer(data=value)
 *     outputNorm = outputnorm
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.outputnorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1523
 *     outputNorm = outputnorm
 * 
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver             # <<<<<<<<<<<<<<
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_103normalizeModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_103normalizeModel = {"normalizeModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_103normalizeModel, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_103normalizeModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputnormindex = 0;
  PyObject *__pyx_v_outputnormindex = 0;
  PyObject *__pyx_v_scale = 0;
  PyObject *__pyx_v_shift = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalizeModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputnormindex,&__pyx_n_s_outputnormindex,&__pyx_n_s_scale,&__pyx_n_s_shift,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputnormindex);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputnormindex);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shift);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "normalizeModel") < 0)) __PYX_ERR(0, 1523, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputnormindex = values[1];
    __pyx_v_outputnormindex = values[2];
    __pyx_v_scale = values[3];
    __pyx_v_shift = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normalizeModel", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1523, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.normalizeModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_102normalizeModel(__pyx_self, __pyx_v_self, __pyx_v_inputnormindex, __pyx_v_outputnormindex, __pyx_v_scale, __pyx_v_shift);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_102normalizeModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputnormindex, PyObject *__pyx_v_outputnormindex, PyObject *__pyx_v_scale, PyObject *__pyx_v_shift) {
  PyObject *__pyx_v_ni = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_normnodes = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_innode = NULL;
  PyObject *__pyx_v_normnode = NULL;
  PyObject *__pyx_v_outnode = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_name = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("normalizeModel", 0);

  /* "metaphor/monal/driver/_driver.py":1524
 * 
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver
 *         self._UnNormalizeModel()             # <<<<<<<<<<<<<<
 *         if not (inputnormindex or outputnormindex):
 *             return
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_UnNormalizeModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1525
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):             # <<<<<<<<<<<<<<
 *             return
 *         self._met = self.getNomalizingMatrixFromData()
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_inputnormindex); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1525, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_outputnormindex); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1525, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":1526
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):
 *             return             # <<<<<<<<<<<<<<
 *         self._met = self.getNomalizingMatrixFromData()
 *         if scale != 1:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1525
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):             # <<<<<<<<<<<<<<
 *             return
 *         self._met = self.getNomalizingMatrixFromData()
 */
  }

  /* "metaphor/monal/driver/_driver.py":1527
 *         if not (inputnormindex or outputnormindex):
 *             return
 *         self._met = self.getNomalizingMatrixFromData()             # <<<<<<<<<<<<<<
 *         if scale != 1:
 *             self._met[:, 1] *= scale
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getNomalizingMatrixFromData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_met, __pyx_t_1) < 0) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1528
 *             return
 *         self._met = self.getNomalizingMatrixFromData()
 *         if scale != 1:             # <<<<<<<<<<<<<<
 *             self._met[:, 1] *= scale
 *         if shift:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_scale, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":1529
 *         self._met = self.getNomalizingMatrixFromData()
 *         if scale != 1:
 *             self._met[:, 1] *= scale             # <<<<<<<<<<<<<<
 *         if shift:
 *             self._met[:, 0] += shift
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_tuple__65);
    __pyx_t_6 = __pyx_tuple__65;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_3) < 0)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1528
 *             return
 *         self._met = self.getNomalizingMatrixFromData()
 *         if scale != 1:             # <<<<<<<<<<<<<<
 *             self._met[:, 1] *= scale
 *         if shift:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1530
 *         if scale != 1:
 *             self._met[:, 1] *= scale
 *         if shift:             # <<<<<<<<<<<<<<
 *             self._met[:, 0] += shift
 *         ni = self.mainModel.inputCount
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_shift); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1530, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":1531
 *             self._met[:, 1] *= scale
 *         if shift:
 *             self._met[:, 0] += shift             # <<<<<<<<<<<<<<
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_tuple__67);
    __pyx_t_6 = __pyx_tuple__67;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_shift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1530
 *         if scale != 1:
 *             self._met[:, 1] *= scale
 *         if shift:             # <<<<<<<<<<<<<<
 *             self._met[:, 0] += shift
 *         ni = self.mainModel.inputCount
 */
  }

  /* "metaphor/monal/driver/_driver.py":1532
 *         if shift:
 *             self._met[:, 0] += shift
 *         ni = self.mainModel.inputCount             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         if self._dataArray is None:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ni = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":1533
 *             self._met[:, 0] += shift
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             # normalisation a l'ancienne avec des neurones supplementaires inclus
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_no = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1534
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             # normalisation a l'ancienne avec des neurones supplementaires inclus
 *             nd = 0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":1536
 *         if self._dataArray is None:
 *             # normalisation a l'ancienne avec des neurones supplementaires inclus
 *             nd = 0             # <<<<<<<<<<<<<<
 *             ni = self.mainModel.inputCount
 *             no = self.mainModel.outputCount
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_nd = __pyx_int_0;

    /* "metaphor/monal/driver/_driver.py":1537
 *             # normalisation a l'ancienne avec des neurones supplementaires inclus
 *             nd = 0
 *             ni = self.mainModel.inputCount             # <<<<<<<<<<<<<<
 *             no = self.mainModel.outputCount
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_ni, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1538
 *             nd = 0
 *             ni = self.mainModel.inputCount
 *             no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 * 
 *             normnodes = self.mainModel.insertLayer(length=ni)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_no, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1540
 *             no = self.mainModel.outputCount
 * 
 *             normnodes = self.mainModel.insertLayer(length=ni)             # <<<<<<<<<<<<<<
 *             for ind, (innode, normnode) in enumerate(zip(self.mainModel.inputNodes, normnodes)):
 *                 normnode.absorb(innode, outputs=True)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_insertLayer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_length, __pyx_v_ni) < 0) __PYX_ERR(0, 1540, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_normnodes = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1541
 * 
 *             normnodes = self.mainModel.insertLayer(length=ni)
 *             for ind, (innode, normnode) in enumerate(zip(self.mainModel.inputNodes, normnodes)):             # <<<<<<<<<<<<<<
 *                 normnode.absorb(innode, outputs=True)
 *                 normnode.createLink(innode, value=self._met[ind, 1], style=C.LS_FIXE)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_3 = __pyx_int_0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputNodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_normnodes);
    __Pyx_GIVEREF(__pyx_v_normnodes);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_normnodes);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1541, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1541, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_8(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1541, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1541, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1541, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1541, __pyx_L1_error)
        __pyx_L12_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_innode, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_normnode, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_3);
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":1542
 *             normnodes = self.mainModel.insertLayer(length=ni)
 *             for ind, (innode, normnode) in enumerate(zip(self.mainModel.inputNodes, normnodes)):
 *                 normnode.absorb(innode, outputs=True)             # <<<<<<<<<<<<<<
 *                 normnode.createLink(innode, value=self._met[ind, 1], style=C.LS_FIXE)
 *                 normnode.createLink(self.mainModel.bias, value=self._met[ind, 0], style=C.LS_FIXE)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_normnode, __pyx_n_s_absorb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_innode);
      __Pyx_GIVEREF(__pyx_v_innode);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_innode);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_outputs, Py_True) < 0) __PYX_ERR(0, 1542, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "metaphor/monal/driver/_driver.py":1543
 *             for ind, (innode, normnode) in enumerate(zip(self.mainModel.inputNodes, normnodes)):
 *                 normnode.absorb(innode, outputs=True)
 *                 normnode.createLink(innode, value=self._met[ind, 1], style=C.LS_FIXE)             # <<<<<<<<<<<<<<
 *                 normnode.createLink(self.mainModel.bias, value=self._met[ind, 0], style=C.LS_FIXE)
 *                 normnode.name = "N_{}".format(innode.name)
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_normnode, __pyx_n_s_createLink); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_innode);
      __Pyx_GIVEREF(__pyx_v_innode);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_innode);
      __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_int_1);
      __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_value, __pyx_t_14) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_LS_FIXE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_style, __pyx_t_13) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "metaphor/monal/driver/_driver.py":1544
 *                 normnode.absorb(innode, outputs=True)
 *                 normnode.createLink(innode, value=self._met[ind, 1], style=C.LS_FIXE)
 *                 normnode.createLink(self.mainModel.bias, value=self._met[ind, 0], style=C.LS_FIXE)             # <<<<<<<<<<<<<<
 *                 normnode.name = "N_{}".format(innode.name)
 * 
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_normnode, __pyx_n_s_createLink); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_bias); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_0);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LS_FIXE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_style, __pyx_t_14) < 0) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "metaphor/monal/driver/_driver.py":1545
 *                 normnode.createLink(innode, value=self._met[ind, 1], style=C.LS_FIXE)
 *                 normnode.createLink(self.mainModel.bias, value=self._met[ind, 0], style=C.LS_FIXE)
 *                 normnode.name = "N_{}".format(innode.name)             # <<<<<<<<<<<<<<
 * 
 *             normnodes = self.mainModel.insertLayer(index=0, length=no, stylePos=1)
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_N, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_innode, __pyx_n_s_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (!__pyx_t_13) {
        __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1545, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_10};
          __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1545, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_10};
          __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1545, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_13); __pyx_t_13 = NULL;
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_normnode, __pyx_n_s_name, __pyx_t_14) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "metaphor/monal/driver/_driver.py":1541
 * 
 *             normnodes = self.mainModel.insertLayer(length=ni)
 *             for ind, (innode, normnode) in enumerate(zip(self.mainModel.inputNodes, normnodes)):             # <<<<<<<<<<<<<<
 *                 normnode.absorb(innode, outputs=True)
 *                 normnode.createLink(innode, value=self._met[ind, 1], style=C.LS_FIXE)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1547
 *                 normnode.name = "N_{}".format(innode.name)
 * 
 *             normnodes = self.mainModel.insertLayer(index=0, length=no, stylePos=1)             # <<<<<<<<<<<<<<
 *             for ind, (outnode, normnode) in enumerate(zip(self.mainModel.outputNodes, normnodes)):
 *                 normnode.absorb(outnode, inputs=True)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_insertLayer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index, __pyx_int_0) < 0) __PYX_ERR(0, 1547, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_length, __pyx_v_no) < 0) __PYX_ERR(0, 1547, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_stylePos, __pyx_int_1) < 0) __PYX_ERR(0, 1547, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_normnodes, __pyx_t_14);
    __pyx_t_14 = 0;

    /* "metaphor/monal/driver/_driver.py":1548
 * 
 *             normnodes = self.mainModel.insertLayer(index=0, length=no, stylePos=1)
 *             for ind, (outnode, normnode) in enumerate(zip(self.mainModel.outputNodes, normnodes)):             # <<<<<<<<<<<<<<
 *                 normnode.absorb(outnode, inputs=True)
 *                 x = 1/self._met[ind + ni, 1]
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_14 = __pyx_int_0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outputNodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_normnodes);
    __Pyx_GIVEREF(__pyx_v_normnodes);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_normnodes);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1548, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1548, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1548, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1548, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1548, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1548, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L16_unpacking_done;
        __pyx_L15_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1548, __pyx_L1_error)
        __pyx_L16_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_outnode, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_normnode, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_14);
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_14, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_14);
      __pyx_t_14 = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1549
 *             normnodes = self.mainModel.insertLayer(index=0, length=no, stylePos=1)
 *             for ind, (outnode, normnode) in enumerate(zip(self.mainModel.outputNodes, normnodes)):
 *                 normnode.absorb(outnode, inputs=True)             # <<<<<<<<<<<<<<
 *                 x = 1/self._met[ind + ni, 1]
 *                 y = -self._met[ind + ni, 0] * x
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_normnode, __pyx_n_s_absorb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_outnode);
      __Pyx_GIVEREF(__pyx_v_outnode);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_outnode);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_inputs, Py_True) < 0) __PYX_ERR(0, 1549, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1550
 *             for ind, (outnode, normnode) in enumerate(zip(self.mainModel.outputNodes, normnodes)):
 *                 normnode.absorb(outnode, inputs=True)
 *                 x = 1/self._met[ind + ni, 1]             # <<<<<<<<<<<<<<
 *                 y = -self._met[ind + ni, 0] * x
 *                 outnode.createLink(normnode, value=x, style=C.LS_FIXE)
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyNumber_Add(__pyx_v_ind, __pyx_v_ni); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":1551
 *                 normnode.absorb(outnode, inputs=True)
 *                 x = 1/self._met[ind + ni, 1]
 *                 y = -self._met[ind + ni, 0] * x             # <<<<<<<<<<<<<<
 *                 outnode.createLink(normnode, value=x, style=C.LS_FIXE)
 *                 outnode.createLink(self.mainModel.bias, value=y, style=C.LS_FIXE)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyNumber_Add(__pyx_v_ind, __pyx_v_ni); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_0);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_Negative(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1552
 *                 x = 1/self._met[ind + ni, 1]
 *                 y = -self._met[ind + ni, 0] * x
 *                 outnode.createLink(normnode, value=x, style=C.LS_FIXE)             # <<<<<<<<<<<<<<
 *                 outnode.createLink(self.mainModel.bias, value=y, style=C.LS_FIXE)
 *                 normnode.name = "N_{}".format(outnode.name)
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_outnode, __pyx_n_s_createLink); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_normnode);
      __Pyx_GIVEREF(__pyx_v_normnode);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_normnode);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_v_x) < 0) __PYX_ERR(0, 1552, __pyx_L1_error)
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LS_FIXE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_t_13) < 0) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "metaphor/monal/driver/_driver.py":1553
 *                 y = -self._met[ind + ni, 0] * x
 *                 outnode.createLink(normnode, value=x, style=C.LS_FIXE)
 *                 outnode.createLink(self.mainModel.bias, value=y, style=C.LS_FIXE)             # <<<<<<<<<<<<<<
 *                 normnode.name = "N_{}".format(outnode.name)
 *         else:
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_outnode, __pyx_n_s_createLink); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bias); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_value, __pyx_v_y) < 0) __PYX_ERR(0, 1553, __pyx_L1_error)
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_LS_FIXE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1554
 *                 outnode.createLink(normnode, value=x, style=C.LS_FIXE)
 *                 outnode.createLink(self.mainModel.bias, value=y, style=C.LS_FIXE)
 *                 normnode.name = "N_{}".format(outnode.name)             # <<<<<<<<<<<<<<
 *         else:
 *             nd = self._dataArray.shape[0]
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_N, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1554, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_outnode, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      if (!__pyx_t_13) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_2};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_2};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_13); __pyx_t_13 = NULL;
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_normnode, __pyx_n_s_name, __pyx_t_1) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1548
 * 
 *             normnodes = self.mainModel.insertLayer(index=0, length=no, stylePos=1)
 *             for ind, (outnode, normnode) in enumerate(zip(self.mainModel.outputNodes, normnodes)):             # <<<<<<<<<<<<<<
 *                 normnode.absorb(outnode, inputs=True)
 *                 x = 1/self._met[ind + ni, 1]
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "metaphor/monal/driver/_driver.py":1534
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 *         if self._dataArray is None:             # <<<<<<<<<<<<<<
 *             # normalisation a l'ancienne avec des neurones supplementaires inclus
 *             nd = 0
 */
    goto __pyx_L8;
  }

  /* "metaphor/monal/driver/_driver.py":1556
 *                 normnode.name = "N_{}".format(outnode.name)
 *         else:
 *             nd = self._dataArray.shape[0]             # <<<<<<<<<<<<<<
 * 
 *             if inputnormindex > 0:
 */
  /*else*/ {
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_nd = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "metaphor/monal/driver/_driver.py":1558
 *             nd = self._dataArray.shape[0]
 * 
 *             if inputnormindex > 0:             # <<<<<<<<<<<<<<
 *                 self.inNormModel = Normalizer(self.mainModel,
 *                     data= self._met[:ni:, :],
 */
    __pyx_t_14 = PyObject_RichCompare(__pyx_v_inputnormindex, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1558, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1558, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (__pyx_t_4) {

      /* "metaphor/monal/driver/_driver.py":1559
 * 
 *             if inputnormindex > 0:
 *                 self.inNormModel = Normalizer(self.mainModel,             # <<<<<<<<<<<<<<
 *                     data= self._met[:ni:, :],
 *                     inNames=(self.mainModel.inputNames),
 */
      __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_Normalizer); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":1560
 *             if inputnormindex > 0:
 *                 self.inNormModel = Normalizer(self.mainModel,
 *                     data= self._met[:ni:, :],             # <<<<<<<<<<<<<<
 *                     inNames=(self.mainModel.inputNames),
 *                     outNames=[cst.st_normName % name for name in self.mainModel.inputNames],
 */
      __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PySlice_New(Py_None, __pyx_v_ni, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9);
      __Pyx_INCREF(__pyx_slice__68);
      __Pyx_GIVEREF(__pyx_slice__68);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_slice__68);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_data, __pyx_t_9) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1561
 *                 self.inNormModel = Normalizer(self.mainModel,
 *                     data= self._met[:ni:, :],
 *                     inNames=(self.mainModel.inputNames),             # <<<<<<<<<<<<<<
 *                     outNames=[cst.st_normName % name for name in self.mainModel.inputNames],
 *                     style = C.TSR_IN_NORM,
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inNames, __pyx_t_2) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      { /* enter inner scope */

        /* "metaphor/monal/driver/_driver.py":1562
 *                     data= self._met[:ni:, :],
 *                     inNames=(self.mainModel.inputNames),
 *                     outNames=[cst.st_normName % name for name in self.mainModel.inputNames],             # <<<<<<<<<<<<<<
 *                     style = C.TSR_IN_NORM,
 *                     name ='InNorm',
 */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1562, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
          __pyx_t_9 = __pyx_t_10; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1562, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1562, __pyx_L20_error)
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        for (;;) {
          if (likely(!__pyx_t_8)) {
            if (likely(PyList_CheckExact(__pyx_t_9))) {
              if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_10 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1562, __pyx_L20_error)
              #else
              __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_10);
              #endif
            } else {
              if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1562, __pyx_L20_error)
              #else
              __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_10);
              #endif
            }
          } else {
            __pyx_t_10 = __pyx_t_8(__pyx_t_9);
            if (unlikely(!__pyx_t_10)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 1562, __pyx_L20_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_10);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_name, __pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_st_normName); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1562, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = PyNumber_Remainder(__pyx_t_13, __pyx_8genexpr8__pyx_v_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 1562, __pyx_L20_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_name); __pyx_8genexpr8__pyx_v_name = 0;
        goto __pyx_L23_exit_scope;
        __pyx_L20_error:;
        __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_name); __pyx_8genexpr8__pyx_v_name = 0;
        goto __pyx_L1_error;
        __pyx_L23_exit_scope:;
      } /* exit inner scope */
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_outNames, __pyx_t_2) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":1563
 *                     inNames=(self.mainModel.inputNames),
 *                     outNames=[cst.st_normName % name for name in self.mainModel.inputNames],
 *                     style = C.TSR_IN_NORM,             # <<<<<<<<<<<<<<
 *                     name ='InNorm',
 *                     reverse=True)
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TSR_IN_NORM); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_style, __pyx_t_9) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_n_u_InNorm) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":1565
 *                     style = C.TSR_IN_NORM,
 *                     name ='InNorm',
 *                     reverse=True)             # <<<<<<<<<<<<<<
 *                 self._inputArray = zeros((nd, ni))
 *                 for ind in range(ni):
 */
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":1559
 * 
 *             if inputnormindex > 0:
 *                 self.inNormModel = Normalizer(self.mainModel,             # <<<<<<<<<<<<<<
 *                     data= self._met[:ni:, :],
 *                     inNames=(self.mainModel.inputNames),
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel, __pyx_t_9) < 0) __PYX_ERR(0, 1559, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1566
 *                     name ='InNorm',
 *                     reverse=True)
 *                 self._inputArray = zeros((nd, ni))             # <<<<<<<<<<<<<<
 *                 for ind in range(ni):
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_nd);
      __Pyx_GIVEREF(__pyx_v_nd);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nd);
      __Pyx_INCREF(__pyx_v_ni);
      __Pyx_GIVEREF(__pyx_v_ni);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ni);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_14) {
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1566, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_1};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1566, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_1};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1566, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1566, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1566, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inputArray, __pyx_t_9) < 0) __PYX_ERR(0, 1566, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":1567
 *                     reverse=True)
 *                 self._inputArray = zeros((nd, ni))
 *                 for ind in range(ni):             # <<<<<<<<<<<<<<
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 *             if outputnormindex > 0:
 */
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_ni); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
        __pyx_t_3 = __pyx_t_9; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1567, __pyx_L1_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1567, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1567, __pyx_L1_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1567, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          }
        } else {
          __pyx_t_9 = __pyx_t_8(__pyx_t_3);
          if (unlikely(!__pyx_t_9)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1567, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_9);
        }
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":1568
 *                 self._inputArray = zeros((nd, ni))
 *                 for ind in range(ni):
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]             # <<<<<<<<<<<<<<
 *             if outputnormindex > 0:
 *                 self.outNormModel = Normalizer(self.mainModel,
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_slice__69);
        __Pyx_GIVEREF(__pyx_slice__69);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_slice__69);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ind);
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ind);
        __Pyx_INCREF(__pyx_int_1);
        __Pyx_GIVEREF(__pyx_int_1);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_1);
        __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyNumber_Subtract(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ind);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_0);
        __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_14, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_slice__70);
        __Pyx_GIVEREF(__pyx_slice__70);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_slice__70);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ind);
        if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_9, __pyx_t_1) < 0)) __PYX_ERR(0, 1568, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/monal/driver/_driver.py":1567
 *                     reverse=True)
 *                 self._inputArray = zeros((nd, ni))
 *                 for ind in range(ni):             # <<<<<<<<<<<<<<
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 *             if outputnormindex > 0:
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":1558
 *             nd = self._dataArray.shape[0]
 * 
 *             if inputnormindex > 0:             # <<<<<<<<<<<<<<
 *                 self.inNormModel = Normalizer(self.mainModel,
 *                     data= self._met[:ni:, :],
 */
    }

    /* "metaphor/monal/driver/_driver.py":1569
 *                 for ind in range(ni):
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 *             if outputnormindex > 0:             # <<<<<<<<<<<<<<
 *                 self.outNormModel = Normalizer(self.mainModel,
 *                     data=self._met[ni:ni+no:, ::],
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_outputnormindex, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "metaphor/monal/driver/_driver.py":1570
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 *             if outputnormindex > 0:
 *                 self.outNormModel = Normalizer(self.mainModel,             # <<<<<<<<<<<<<<
 *                     data=self._met[ni:ni+no:, ::],
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Normalizer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1571
 *             if outputnormindex > 0:
 *                 self.outNormModel = Normalizer(self.mainModel,
 *                     data=self._met[ni:ni+no:, ::],             # <<<<<<<<<<<<<<
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],
 *                     outNames=(self.mainModel.outputNames),
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = PyNumber_Add(__pyx_v_ni, __pyx_v_no); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_10 = PySlice_New(__pyx_v_ni, __pyx_t_14, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10);
      __Pyx_INCREF(__pyx_slice__71);
      __Pyx_GIVEREF(__pyx_slice__71);
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_slice__71);
      __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_data, __pyx_t_10) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      { /* enter inner scope */

        /* "metaphor/monal/driver/_driver.py":1572
 *                 self.outNormModel = Normalizer(self.mainModel,
 *                     data=self._met[ni:ni+no:, ::],
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],             # <<<<<<<<<<<<<<
 *                     outNames=(self.mainModel.outputNames),
 *                     style= C.TSR_OUT_NORM,
 */
        __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1572, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1572, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
          __pyx_t_14 = __pyx_t_2; __Pyx_INCREF(__pyx_t_14); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1572, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_8 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1572, __pyx_L29_error)
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          if (likely(!__pyx_t_8)) {
            if (likely(PyList_CheckExact(__pyx_t_14))) {
              if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_14)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1572, __pyx_L29_error)
              #else
              __pyx_t_2 = PySequence_ITEM(__pyx_t_14, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L29_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            } else {
              if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1572, __pyx_L29_error)
              #else
              __pyx_t_2 = PySequence_ITEM(__pyx_t_14, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L29_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_8(__pyx_t_14);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 1572, __pyx_L29_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_name, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_st_normName); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1572, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_Remainder(__pyx_t_13, __pyx_8genexpr9__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1572, __pyx_L29_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_name); __pyx_8genexpr9__pyx_v_name = 0;
        goto __pyx_L32_exit_scope;
        __pyx_L29_error:;
        __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_name); __pyx_8genexpr9__pyx_v_name = 0;
        goto __pyx_L1_error;
        __pyx_L32_exit_scope:;
      } /* exit inner scope */
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inNames, __pyx_t_10) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1573
 *                     data=self._met[ni:ni+no:, ::],
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],
 *                     outNames=(self.mainModel.outputNames),             # <<<<<<<<<<<<<<
 *                     style= C.TSR_OUT_NORM,
 *                     name='OutNorm')
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_outNames, __pyx_t_14) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "metaphor/monal/driver/_driver.py":1574
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],
 *                     outNames=(self.mainModel.outputNames),
 *                     style= C.TSR_OUT_NORM,             # <<<<<<<<<<<<<<
 *                     name='OutNorm')
 *                 self._outputArray = zeros((nd, no))
 */
      __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_TSR_OUT_NORM); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_style, __pyx_t_10) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_n_u_OutNorm) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":1570
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 *             if outputnormindex > 0:
 *                 self.outNormModel = Normalizer(self.mainModel,             # <<<<<<<<<<<<<<
 *                     data=self._met[ni:ni+no:, ::],
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel, __pyx_t_10) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1576
 *                     style= C.TSR_OUT_NORM,
 *                     name='OutNorm')
 *                 self._outputArray = zeros((nd, no))             # <<<<<<<<<<<<<<
 *                 for ind in range(no):
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_nd);
      __Pyx_GIVEREF(__pyx_v_nd);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_nd);
      __Pyx_INCREF(__pyx_v_no);
      __Pyx_GIVEREF(__pyx_v_no);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_no);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1576, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputArray, __pyx_t_10) < 0) __PYX_ERR(0, 1576, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1577
 *                     name='OutNorm')
 *                 self._outputArray = zeros((nd, no))
 *                 for ind in range(no):             # <<<<<<<<<<<<<<
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 * 
 */
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_no); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
        __pyx_t_1 = __pyx_t_10; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1577, __pyx_L1_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1577, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1577, __pyx_L1_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1577, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          }
        } else {
          __pyx_t_10 = __pyx_t_8(__pyx_t_1);
          if (unlikely(!__pyx_t_10)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1577, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "metaphor/monal/driver/_driver.py":1578
 *                 self._outputArray = zeros((nd, no))
 *                 for ind in range(no):
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]             # <<<<<<<<<<<<<<
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver
 */
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_14 = PyNumber_Add(__pyx_v_ni, __pyx_v_ind); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_slice__72);
        __Pyx_GIVEREF(__pyx_slice__72);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_slice__72);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_14);
        __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PyNumber_Add(__pyx_v_ni, __pyx_v_ind); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
        __Pyx_INCREF(__pyx_int_1);
        __Pyx_GIVEREF(__pyx_int_1);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Subtract(__pyx_t_14, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_met); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_14 = PyNumber_Add(__pyx_v_ni, __pyx_v_ind); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_0);
        __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_slice__73);
        __Pyx_GIVEREF(__pyx_slice__73);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_slice__73);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ind);
        if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_3, __pyx_t_9) < 0)) __PYX_ERR(0, 1578, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "metaphor/monal/driver/_driver.py":1577
 *                     name='OutNorm')
 *                 self._outputArray = zeros((nd, no))
 *                 for ind in range(no):             # <<<<<<<<<<<<<<
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1569
 *                 for ind in range(ni):
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]
 *             if outputnormindex > 0:             # <<<<<<<<<<<<<<
 *                 self.outNormModel = Normalizer(self.mainModel,
 *                     data=self._met[ni:ni+no:, ::],
 */
    }
  }
  __pyx_L8:;

  /* "metaphor/monal/driver/_driver.py":1523
 *     outputNorm = outputnorm
 * 
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver             # <<<<<<<<<<<<<<
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.normalizeModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ni);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_normnodes);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_innode);
  __Pyx_XDECREF(__pyx_v_normnode);
  __Pyx_XDECREF(__pyx_v_outnode);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_name);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1580
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver             # <<<<<<<<<<<<<<
 *         if outResult is not None:
 *             self._outResult = outResult
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_105_getComputeCondition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_105_getComputeCondition = {"_getComputeCondition", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_105_getComputeCondition, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_105_getComputeCondition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_computelevel = 0;
  PyObject *__pyx_v_outResult = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getComputeCondition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_computelevel,&__pyx_n_s_outResult,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_computelevel)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getComputeCondition", 1, 3, 3, 1); __PYX_ERR(0, 1580, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outResult)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getComputeCondition", 1, 3, 3, 2); __PYX_ERR(0, 1580, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getComputeCondition") < 0)) __PYX_ERR(0, 1580, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_computelevel = values[1];
    __pyx_v_outResult = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getComputeCondition", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1580, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._getComputeCondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_104_getComputeCondition(__pyx_self, __pyx_v_self, __pyx_v_computelevel, __pyx_v_outResult);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_104_getComputeCondition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult) {
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("_getComputeCondition", 0);
  __Pyx_INCREF(__pyx_v_computelevel);

  /* "metaphor/monal/driver/_driver.py":1581
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver
 *         if outResult is not None:             # <<<<<<<<<<<<<<
 *             self._outResult = outResult
 *         computelevel &= 0xF
 */
  __pyx_t_1 = (__pyx_v_outResult != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1582
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver
 *         if outResult is not None:
 *             self._outResult = outResult             # <<<<<<<<<<<<<<
 *         computelevel &= 0xF
 *         self.mainModel.computeLevel = computelevel
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2, __pyx_v_outResult) < 0) __PYX_ERR(0, 1582, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1581
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver
 *         if outResult is not None:             # <<<<<<<<<<<<<<
 *             self._outResult = outResult
 *         computelevel &= 0xF
 */
  }

  /* "metaphor/monal/driver/_driver.py":1583
 *         if outResult is not None:
 *             self._outResult = outResult
 *         computelevel &= 0xF             # <<<<<<<<<<<<<<
 *         self.mainModel.computeLevel = computelevel
 *         no = self.mainModel.outputCount
 */
  __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_v_computelevel, __pyx_int_15, 0xF, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_computelevel, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1584
 *             self._outResult = outResult
 *         computelevel &= 0xF
 *         self.mainModel.computeLevel = computelevel             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         nd = self.dataCount
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_computeLevel, __pyx_v_computelevel) < 0) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1585
 *         computelevel &= 0xF
 *         self.mainModel.computeLevel = computelevel
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_no = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1586
 *         self.mainModel.computeLevel = computelevel
 *         no = self.mainModel.outputCount
 *         nd = self.dataCount             # <<<<<<<<<<<<<<
 *         ns = self.mainModel.synapseCount
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_nd = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1587
 *         no = self.mainModel.outputCount
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount             # <<<<<<<<<<<<<<
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):
 *             self._outResult = ndarray((nd, no))
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_synapseCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_ns = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1588
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):             # <<<<<<<<<<<<<<
 *             self._outResult = ndarray((nd, no))
 *         self._outResult.fill(0)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = (__pyx_t_3 == Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__pyx_t_1 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_nd);
  __Pyx_INCREF(__pyx_v_no);
  __Pyx_GIVEREF(__pyx_v_no);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_no);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1589
 *         ns = self.mainModel.synapseCount
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):
 *             self._outResult = ndarray((nd, no))             # <<<<<<<<<<<<<<
 *         self._outResult.fill(0)
 * 
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_nd);
    __Pyx_GIVEREF(__pyx_v_nd);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_nd);
    __Pyx_INCREF(__pyx_v_no);
    __Pyx_GIVEREF(__pyx_v_no);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_no);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2, __pyx_t_6) < 0) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1588
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):             # <<<<<<<<<<<<<<
 *             self._outResult = ndarray((nd, no))
 *         self._outResult.fill(0)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1590
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):
 *             self._outResult = ndarray((nd, no))
 *         self._outResult.fill(0)             # <<<<<<<<<<<<<<
 * 
 *         if computelevel:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1592
 *         self._outResult.fill(0)
 * 
 *         if computelevel:             # <<<<<<<<<<<<<<
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):
 *                 self._jacobians = ndarray((no, nd, ns))
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_computelevel); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1593
 * 
 *         if computelevel:
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):             # <<<<<<<<<<<<<<
 *                 self._jacobians = ndarray((no, nd, ns))
 *             self._jacobians.fill(0)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = (__pyx_t_6 == Py_None);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = (__pyx_t_5 != 0);
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_no);
    __Pyx_GIVEREF(__pyx_v_no);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_no);
    __Pyx_INCREF(__pyx_v_nd);
    __Pyx_GIVEREF(__pyx_v_nd);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_nd);
    __Pyx_INCREF(__pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ns);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":1594
 *         if computelevel:
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):
 *                 self._jacobians = ndarray((no, nd, ns))             # <<<<<<<<<<<<<<
 *             self._jacobians.fill(0)
 *         return computelevel
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ndarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_no);
      __Pyx_GIVEREF(__pyx_v_no);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_no);
      __Pyx_INCREF(__pyx_v_nd);
      __Pyx_GIVEREF(__pyx_v_nd);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_nd);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_ns);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2, __pyx_t_8) < 0) __PYX_ERR(0, 1594, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "metaphor/monal/driver/_driver.py":1593
 * 
 *         if computelevel:
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):             # <<<<<<<<<<<<<<
 *                 self._jacobians = ndarray((no, nd, ns))
 *             self._jacobians.fill(0)
 */
    }

    /* "metaphor/monal/driver/_driver.py":1595
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):
 *                 self._jacobians = ndarray((no, nd, ns))
 *             self._jacobians.fill(0)             # <<<<<<<<<<<<<<
 *         return computelevel
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":1592
 *         self._outResult.fill(0)
 * 
 *         if computelevel:             # <<<<<<<<<<<<<<
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):
 *                 self._jacobians = ndarray((no, nd, ns))
 */
  }

  /* "metaphor/monal/driver/_driver.py":1596
 *                 self._jacobians = ndarray((no, nd, ns))
 *             self._jacobians.fill(0)
 *         return computelevel             # <<<<<<<<<<<<<<
 * 
 *     def getResults(self, donorm=True):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_computelevel);
  __pyx_r = __pyx_v_computelevel;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1580
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver             # <<<<<<<<<<<<<<
 *         if outResult is not None:
 *             self._outResult = outResult
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._getComputeCondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_computelevel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1598
 *         return computelevel
 * 
 *     def getResults(self, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsultats"""
 *         res = self._outResult
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_107getResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_106getResults[] = "Lecture des r\303\257\302\277\305\223sultats";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_107getResults = {"getResults", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_107getResults, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_106getResults};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_107getResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getResults (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_donorm,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getResults") < 0)) __PYX_ERR(0, 1598, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_donorm = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getResults", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1598, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_106getResults(__pyx_self, __pyx_v_self, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_106getResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getResults", 0);

  /* "metaphor/monal/driver/_driver.py":1600
 *     def getResults(self, donorm=True):  # Driver
 *         """Lecture des rsultats"""
 *         res = self._outResult             # <<<<<<<<<<<<<<
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1601
 *         """Lecture des rsultats"""
 *         res = self._outResult
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             res *= self.outNormModel.data[:, 0]
 *             res += self.outNormModel.data[:, 1]
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1601, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1602
 *         res = self._outResult
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *             res += self.outNormModel.data[:, 1]
 *         return res
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__77); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_res, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1603
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]
 *             res += self.outNormModel.data[:, 1]             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_tuple__79); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_res, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1601
 *         """Lecture des rsultats"""
 *         res = self._outResult
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             res *= self.outNormModel.data[:, 0]
 *             res += self.outNormModel.data[:, 1]
 */
  }

  /* "metaphor/monal/driver/_driver.py":1604
 *             res *= self.outNormModel.data[:, 0]
 *             res += self.outNormModel.data[:, 1]
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def getResiduals(self, donorm=True, deltares=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1598
 *         return computelevel
 * 
 *     def getResults(self, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsultats"""
 *         res = self._outResult
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1606
 *         return res
 * 
 *     def getResiduals(self, donorm=True, deltares=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_109getResiduals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_108getResiduals[] = "Lecture des r\303\257\302\277\305\223sidus";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_109getResiduals = {"getResiduals", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_109getResiduals, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_108getResiduals};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_109getResiduals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_v_deltares = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getResiduals (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_donorm,&__pyx_n_s_deltares,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_True));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deltares);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getResiduals") < 0)) __PYX_ERR(0, 1606, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_donorm = values[1];
    __pyx_v_deltares = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getResiduals", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1606, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getResiduals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_108getResiduals(__pyx_self, __pyx_v_self, __pyx_v_donorm, __pyx_v_deltares);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_108getResiduals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_donorm, PyObject *__pyx_v_deltares) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("getResiduals", 0);

  /* "metaphor/monal/driver/_driver.py":1608
 *     def getResiduals(self, donorm=True, deltares=None):  # Driver
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)             # <<<<<<<<<<<<<<
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_costFunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_derive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1609
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             res *= self.outNormModel.data[:, 0]
 *         if deltares is None:
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  if (__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_9;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "metaphor/monal/driver/_driver.py":1610
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *         if deltares is None:
 *             return res
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__81); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_v_res, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1609
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             res *= self.outNormModel.data[:, 0]
 *         if deltares is None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1611
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]
 *         if deltares is None:             # <<<<<<<<<<<<<<
 *             return res
 *         return res + deltares  # averifier ici
 */
  __pyx_t_8 = (__pyx_v_deltares == Py_None);
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "metaphor/monal/driver/_driver.py":1612
 *             res *= self.outNormModel.data[:, 0]
 *         if deltares is None:
 *             return res             # <<<<<<<<<<<<<<
 *         return res + deltares  # averifier ici
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_res);
    __pyx_r = __pyx_v_res;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1611
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]
 *         if deltares is None:             # <<<<<<<<<<<<<<
 *             return res
 *         return res + deltares  # averifier ici
 */
  }

  /* "metaphor/monal/driver/_driver.py":1613
 *         if deltares is None:
 *             return res
 *         return res + deltares  # averifier ici             # <<<<<<<<<<<<<<
 * 
 *     def getCost(self, donorm=True, doSum=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyNumber_Add(__pyx_v_res, __pyx_v_deltares); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1606
 *         return res
 * 
 *     def getResiduals(self, donorm=True, deltares=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getResiduals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1615
 *         return res + deltares  # averifier ici
 * 
 *     def getCost(self, donorm=True, doSum=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_111getCost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_110getCost[] = "Lecture des co\303\257\302\277\305\223ts";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_111getCost = {"getCost", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_111getCost, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_110getCost};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_111getCost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_v_doSum = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCost (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_donorm,&__pyx_n_s_doSum,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_True));
    values[2] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doSum);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCost") < 0)) __PYX_ERR(0, 1615, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_donorm = values[1];
    __pyx_v_doSum = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getCost", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1615, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_110getCost(__pyx_self, __pyx_v_self, __pyx_v_donorm, __pyx_v_doSum);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_110getCost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_donorm, PyObject *__pyx_v_doSum) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_outindex = NULL;
  PyObject *__pyx_v_param = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("getCost", 0);

  /* "metaphor/monal/driver/_driver.py":1617
 *     def getCost(self, donorm=True, doSum=False):  # Driver
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)             # <<<<<<<<<<<<<<
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]**2
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_costFunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1618
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             res *= self.outNormModel.data[:, 0]**2
 *         if doSum:
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1618, __pyx_L1_error)
  if (__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_9;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "metaphor/monal/driver/_driver.py":1619
 *         res = self.costFunction(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]**2             # <<<<<<<<<<<<<<
 *         if doSum:
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_tuple__83); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_res, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1618
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             res *= self.outNormModel.data[:, 0]**2
 *         if doSum:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1620
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]**2
 *         if doSum:             # <<<<<<<<<<<<<<
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 *                 for outindex, param in enumerate(self.outputWeighting):
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_doSum); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1620, __pyx_L1_error)
  if (__pyx_t_8) {

    /* "metaphor/monal/driver/_driver.py":1621
 *             res *= self.outNormModel.data[:, 0]**2
 *         if doSum:
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):             # <<<<<<<<<<<<<<
 *                 for outindex, param in enumerate(self.outputWeighting):
 *                     if not outindex:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = (__pyx_t_9 != 0);
    __pyx_t_8 = __pyx_t_10;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_8) {

      /* "metaphor/monal/driver/_driver.py":1622
 *         if doSum:
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 *                 for outindex, param in enumerate(self.outputWeighting):             # <<<<<<<<<<<<<<
 *                     if not outindex:
 *                         result = res[outindex, :] * param
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1622, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_12(__pyx_t_7);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1622, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_outindex, __pyx_t_1);
        __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "metaphor/monal/driver/_driver.py":1623
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 *                 for outindex, param in enumerate(self.outputWeighting):
 *                     if not outindex:             # <<<<<<<<<<<<<<
 *                         result = res[outindex, :] * param
 *                     else:
 */
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_outindex); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1623, __pyx_L1_error)
        __pyx_t_10 = ((!__pyx_t_8) != 0);
        if (__pyx_t_10) {

          /* "metaphor/monal/driver/_driver.py":1624
 *                 for outindex, param in enumerate(self.outputWeighting):
 *                     if not outindex:
 *                         result = res[outindex, :] * param             # <<<<<<<<<<<<<<
 *                     else:
 *                         result += res[outindex, :] * param
 */
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_outindex);
          __Pyx_GIVEREF(__pyx_v_outindex);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_outindex);
          __Pyx_INCREF(__pyx_slice__84);
          __Pyx_GIVEREF(__pyx_slice__84);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_slice__84);
          __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_v_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":1623
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 *                 for outindex, param in enumerate(self.outputWeighting):
 *                     if not outindex:             # <<<<<<<<<<<<<<
 *                         result = res[outindex, :] * param
 *                     else:
 */
          goto __pyx_L12;
        }

        /* "metaphor/monal/driver/_driver.py":1626
 *                         result = res[outindex, :] * param
 *                     else:
 *                         result += res[outindex, :] * param             # <<<<<<<<<<<<<<
 *                 return result.sum()
 *             return res.sum()
 */
        /*else*/ {
          if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(0, 1626, __pyx_L1_error) }
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_outindex);
          __Pyx_GIVEREF(__pyx_v_outindex);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_outindex);
          __Pyx_INCREF(__pyx_slice__85);
          __Pyx_GIVEREF(__pyx_slice__85);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_slice__85);
          __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_v_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_4);
          __pyx_t_4 = 0;
        }
        __pyx_L12:;

        /* "metaphor/monal/driver/_driver.py":1622
 *         if doSum:
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 *                 for outindex, param in enumerate(self.outputWeighting):             # <<<<<<<<<<<<<<
 *                     if not outindex:
 *                         result = res[outindex, :] * param
 */
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1627
 *                     else:
 *                         result += res[outindex, :] * param
 *                 return result.sum()             # <<<<<<<<<<<<<<
 *             return res.sum()
 *         return squeeze(res)
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(0, 1627, __pyx_L1_error) }
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":1621
 *             res *= self.outNormModel.data[:, 0]**2
 *         if doSum:
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):             # <<<<<<<<<<<<<<
 *                 for outindex, param in enumerate(self.outputWeighting):
 *                     if not outindex:
 */
    }

    /* "metaphor/monal/driver/_driver.py":1628
 *                         result += res[outindex, :] * param
 *                 return result.sum()
 *             return res.sum()             # <<<<<<<<<<<<<<
 *         return squeeze(res)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1620
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]**2
 *         if doSum:             # <<<<<<<<<<<<<<
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 *                 for outindex, param in enumerate(self.outputWeighting):
 */
  }

  /* "metaphor/monal/driver/_driver.py":1629
 *                 return result.sum()
 *             return res.sum()
 *         return squeeze(res)             # <<<<<<<<<<<<<<
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_res};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_res};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_res);
      __Pyx_GIVEREF(__pyx_v_res);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_res);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1615
 *         return res + deltares  # averifier ici
 * 
 *     def getCost(self, donorm=True, doSum=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_outindex);
  __Pyx_XDECREF(__pyx_v_param);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1631
 *         return squeeze(res)
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver             # <<<<<<<<<<<<<<
 *         if leverages is None:
 *             jacob = self.getjacobian(params)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_113getPRESS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_113getPRESS = {"getPRESS", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_113getPRESS, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_113getPRESS(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_params = 0;
  PyObject *__pyx_v_leverages = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_v_root = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPRESS (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_params,&__pyx_n_s_leverages_2,&__pyx_n_s_donorm,&__pyx_n_s_root,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_params);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_leverages_2);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPRESS") < 0)) __PYX_ERR(0, 1631, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_params = values[1];
    __pyx_v_leverages = values[2];
    __pyx_v_donorm = values[3];
    __pyx_v_root = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPRESS", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1631, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getPRESS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_112getPRESS(__pyx_self, __pyx_v_self, __pyx_v_params, __pyx_v_leverages, __pyx_v_donorm, __pyx_v_root);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_112getPRESS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_params, PyObject *__pyx_v_leverages, PyObject *__pyx_v_donorm, PyObject *__pyx_v_root) {
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_v_cumul = NULL;
  PyObject *__pyx_v_residual = NULL;
  PyObject *__pyx_v_leverage = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("getPRESS", 0);
  __Pyx_INCREF(__pyx_v_leverages);

  /* "metaphor/monal/driver/_driver.py":1632
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver
 *         if leverages is None:             # <<<<<<<<<<<<<<
 *             jacob = self.getjacobian(params)
 *             leverages = sp.getLeveragesFromSVD(jacob)
 */
  __pyx_t_1 = (__pyx_v_leverages == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1633
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver
 *         if leverages is None:
 *             jacob = self.getjacobian(params)             # <<<<<<<<<<<<<<
 *             leverages = sp.getLeveragesFromSVD(jacob)
 *         residuals = self.getresiduals(params)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getjacobian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_params); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_params};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_params};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_params);
        __Pyx_GIVEREF(__pyx_v_params);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_params);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_jacob = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1634
 *         if leverages is None:
 *             jacob = self.getjacobian(params)
 *             leverages = sp.getLeveragesFromSVD(jacob)             # <<<<<<<<<<<<<<
 *         residuals = self.getresiduals(params)
 *         cumul = 0.0
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getLeveragesFromSVD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_jacob); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_jacob};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_jacob};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_jacob);
        __Pyx_GIVEREF(__pyx_v_jacob);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_jacob);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_leverages, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1632
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver
 *         if leverages is None:             # <<<<<<<<<<<<<<
 *             jacob = self.getjacobian(params)
 *             leverages = sp.getLeveragesFromSVD(jacob)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1635
 *             jacob = self.getjacobian(params)
 *             leverages = sp.getLeveragesFromSVD(jacob)
 *         residuals = self.getresiduals(params)             # <<<<<<<<<<<<<<
 *         cumul = 0.0
 *         for residual, leverage in zip(residuals, leverages):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getresiduals); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_params); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_params};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_params};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_params);
      __Pyx_GIVEREF(__pyx_v_params);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_params);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_residuals = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1636
 *             leverages = sp.getLeveragesFromSVD(jacob)
 *         residuals = self.getresiduals(params)
 *         cumul = 0.0             # <<<<<<<<<<<<<<
 *         for residual, leverage in zip(residuals, leverages):
 *             val = residual/(1 - leverage)
 */
  __Pyx_INCREF(__pyx_float_0_0);
  __pyx_v_cumul = __pyx_float_0_0;

  /* "metaphor/monal/driver/_driver.py":1637
 *         residuals = self.getresiduals(params)
 *         cumul = 0.0
 *         for residual, leverage in zip(residuals, leverages):             # <<<<<<<<<<<<<<
 *             val = residual/(1 - leverage)
 *             cumul += val*val
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_residuals);
  __Pyx_GIVEREF(__pyx_v_residuals);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_residuals);
  __Pyx_INCREF(__pyx_v_leverages);
  __Pyx_GIVEREF(__pyx_v_leverages);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leverages);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1637, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1637, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1637, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1637, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1637, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1637, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1637, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_residual, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_leverage, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1638
 *         cumul = 0.0
 *         for residual, leverage in zip(residuals, leverages):
 *             val = residual/(1 - leverage)             # <<<<<<<<<<<<<<
 *             cumul += val*val
 *         if donorm:
 */
    __pyx_t_6 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_v_leverage, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_residual, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1639
 *         for residual, leverage in zip(residuals, leverages):
 *             val = residual/(1 - leverage)
 *             cumul += val*val             # <<<<<<<<<<<<<<
 *         if donorm:
 *             cumul /= self.lib.dataCount()
 */
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_val, __pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cumul, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_cumul, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1637
 *         residuals = self.getresiduals(params)
 *         cumul = 0.0
 *         for residual, leverage in zip(residuals, leverages):             # <<<<<<<<<<<<<<
 *             val = residual/(1 - leverage)
 *             cumul += val*val
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1640
 *             val = residual/(1 - leverage)
 *             cumul += val*val
 *         if donorm:             # <<<<<<<<<<<<<<
 *             cumul /= self.lib.dataCount()
 *         if root:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1640, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1641
 *             cumul += val*val
 *         if donorm:
 *             cumul /= self.lib.dataCount()             # <<<<<<<<<<<<<<
 *         if root:
 *             cumul = sqrt(cumul)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lib); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_cumul, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_cumul, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1640
 *             val = residual/(1 - leverage)
 *             cumul += val*val
 *         if donorm:             # <<<<<<<<<<<<<<
 *             cumul /= self.lib.dataCount()
 *         if root:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1642
 *         if donorm:
 *             cumul /= self.lib.dataCount()
 *         if root:             # <<<<<<<<<<<<<<
 *             cumul = sqrt(cumul)
 *         return cumul
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_root); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1642, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1643
 *             cumul /= self.lib.dataCount()
 *         if root:
 *             cumul = sqrt(cumul)             # <<<<<<<<<<<<<<
 *         return cumul
 * 
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cumul); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_cumul};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1643, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_cumul};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1643, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_cumul);
        __Pyx_GIVEREF(__pyx_v_cumul);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_cumul);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1643, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_cumul, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1642
 *         if donorm:
 *             cumul /= self.lib.dataCount()
 *         if root:             # <<<<<<<<<<<<<<
 *             cumul = sqrt(cumul)
 *         return cumul
 */
  }

  /* "metaphor/monal/driver/_driver.py":1644
 *         if root:
 *             cumul = sqrt(cumul)
 *         return cumul             # <<<<<<<<<<<<<<
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cumul);
  __pyx_r = __pyx_v_cumul;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1631
 *         return squeeze(res)
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver             # <<<<<<<<<<<<<<
 *         if leverages is None:
 *             jacob = self.getjacobian(params)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getPRESS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_v_cumul);
  __Pyx_XDECREF(__pyx_v_residual);
  __Pyx_XDECREF(__pyx_v_leverage);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_leverages);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1646
 *         return cumul
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # Driver             # <<<<<<<<<<<<<<
 *         return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_115computeTrainingResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_115computeTrainingResults = {"computeTrainingResults", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_115computeTrainingResults, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_115computeTrainingResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_curw = 0;
  PyObject *__pyx_v_restable = 0;
  PyObject *__pyx_v_outputs = 0;
  PyObject *__pyx_v_jacobians = 0;
  PyObject *__pyx_v_actualepochs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainingResults (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_curw,&__pyx_n_s_restable,&__pyx_n_s_outputs,&__pyx_n_s_jacobians,&__pyx_n_s_actualepochs,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_curw);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_restable);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobians);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_actualepochs);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainingResults") < 0)) __PYX_ERR(0, 1646, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_curw = values[1];
    __pyx_v_restable = values[2];
    __pyx_v_outputs = values[3];
    __pyx_v_jacobians = values[4];
    __pyx_v_actualepochs = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainingResults", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1646, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainingResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_114computeTrainingResults(__pyx_self, __pyx_v_self, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_114computeTrainingResults(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_curw, PyObject *__pyx_v_restable, PyObject *__pyx_v_outputs, PyObject *__pyx_v_jacobians, PyObject *__pyx_v_actualepochs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("computeTrainingResults", 0);

  /* "metaphor/monal/driver/_driver.py":1647
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # Driver
 *         return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)             # <<<<<<<<<<<<<<
 * 
 *    #def getJacobian(self, index, donorm=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainingResultsOld); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_curw, __pyx_v_restable, __pyx_v_outputs, __pyx_v_jacobians, __pyx_v_actualepochs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_curw);
    __Pyx_GIVEREF(__pyx_v_curw);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_curw);
    __Pyx_INCREF(__pyx_v_restable);
    __Pyx_GIVEREF(__pyx_v_restable);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_restable);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_outputs);
    __Pyx_INCREF(__pyx_v_jacobians);
    __Pyx_GIVEREF(__pyx_v_jacobians);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_jacobians);
    __Pyx_INCREF(__pyx_v_actualepochs);
    __Pyx_GIVEREF(__pyx_v_actualepochs);
    PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_actualepochs);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1646
 *         return cumul
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # Driver             # <<<<<<<<<<<<<<
 *         return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainingResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1658
 *     #        return np .copy(self._jacobians[index, :, :])
 * 
 *     def getPrime(self, index=-1, doSum=True, cost=True, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture du jacobien ou du gradient du modle ou de la fonction de cot.
 *         Si cost est True, retourne le rsultat relatif  la fonction de cot,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_117getPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_116getPrime[] = "Lecture du jacobien ou du gradient du mod\303\257\302\277\305\223le ou de la fonction de co\303\257\302\277\305\223t.\n        Si cost est True, retourne le r\303\257\302\277\305\223sultat relatif \303\257\302\277\305\223 la fonction de co\303\257\302\277\305\223t,\n        sinon, retourne le r\303\257\302\277\305\223sultat de la fonction de mod\303\257\302\277\305\223le.\n        Si cost et donorm sont True, la fonctikon de co\303\257\302\277\305\223t consid\303\257\302\277\305\223&r\303\257\302\277\305\223e est d\303\257\302\277\305\223normalis\303\257\302\277\305\223e\n        Si index est < 0, retourne la somme, \303\257\302\277\305\223ventuellement pond\303\257\302\277\305\223r\303\257\302\277\305\223e, des r\303\257\302\277\305\223sultats sur toutes les sorties,\n        sinon, retourne le r\303\257\302\277\305\223sultat de la sortie index\303\257\302\277\305\223e.\n        Si doSum est True, retourne un gradient obtenu par la somme des vecteurs du jacobien seln l'axe des donn\303\257\302\277\305\223es,\n        sinon, retourne le jacobien.        \n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_117getPrime = {"getPrime", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_117getPrime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_116getPrime};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_117getPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_doSum = 0;
  PyObject *__pyx_v_cost = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPrime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,&__pyx_n_s_doSum,&__pyx_n_s_cost,&__pyx_n_s_donorm,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[2] = ((PyObject *)((PyObject *)Py_True));
    values[3] = ((PyObject *)((PyObject *)Py_True));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doSum);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cost);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPrime") < 0)) __PYX_ERR(0, 1658, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
    __pyx_v_doSum = values[2];
    __pyx_v_cost = values[3];
    __pyx_v_donorm = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPrime", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1658, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_116getPrime(__pyx_self, __pyx_v_self, __pyx_v_index, __pyx_v_doSum, __pyx_v_cost, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_116getPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_doSum, PyObject *__pyx_v_cost, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_residual = NULL;
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_outIndex = NULL;
  PyObject *__pyx_v_costD = NULL;
  PyObject *__pyx_v_resloc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("getPrime", 0);

  /* "metaphor/monal/driver/_driver.py":1668
 *         sinon, retourne le jacobien.
 *         """
 *         if cost:             # <<<<<<<<<<<<<<
 *             residual = self.getResiduals(donorm)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_cost); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1668, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1669
 *         """
 *         if cost:
 *             residual = self.getResiduals(donorm)             # <<<<<<<<<<<<<<
 *         else:
 *             residual = ones((self._dataArray.shape[0], self.mainModel.outputCount))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getResiduals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_donorm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_donorm};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_donorm};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_donorm);
        __Pyx_GIVEREF(__pyx_v_donorm);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_donorm);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_residual = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1668
 *         sinon, retourne le jacobien.
 *         """
 *         if cost:             # <<<<<<<<<<<<<<
 *             residual = self.getResiduals(donorm)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1671
 *             residual = self.getResiduals(donorm)
 *         else:
 *             residual = ones((self._dataArray.shape[0], self.mainModel.outputCount))             # <<<<<<<<<<<<<<
 *         if index >= 0:
 *             jacob = self.getJacobian(index, donorm)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ones); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_residual = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1672
 *         else:
 *             residual = ones((self._dataArray.shape[0], self.mainModel.outputCount))
 *         if index >= 0:             # <<<<<<<<<<<<<<
 *             jacob = self.getJacobian(index, donorm)
 *             res = squeeze(residual[:, newaxis]*jacob)
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1673
 *             residual = ones((self._dataArray.shape[0], self.mainModel.outputCount))
 *         if index >= 0:
 *             jacob = self.getJacobian(index, donorm)             # <<<<<<<<<<<<<<
 *             res = squeeze(residual[:, newaxis]*jacob)
 *             return sum(res, axis=0)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getJacobian); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_index, __pyx_v_donorm};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_index, __pyx_v_donorm};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_index);
      __Pyx_INCREF(__pyx_v_donorm);
      __Pyx_GIVEREF(__pyx_v_donorm);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_donorm);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_jacob = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1674
 *         if index >= 0:
 *             jacob = self.getJacobian(index, donorm)
 *             res = squeeze(residual[:, newaxis]*jacob)             # <<<<<<<<<<<<<<
 *             return sum(res, axis=0)
 *         for outIndex in range(self.mainModel.outputCount):
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_slice__86);
    __Pyx_GIVEREF(__pyx_slice__86);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_slice__86);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_residual, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_v_jacob); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1674, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_res = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1675
 *             jacob = self.getJacobian(index, donorm)
 *             res = squeeze(residual[:, newaxis]*jacob)
 *             return sum(res, axis=0)             # <<<<<<<<<<<<<<
 *         for outIndex in range(self.mainModel.outputCount):
 *             jacob = self.getJacobian(outIndex, donorm)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_res);
    __Pyx_GIVEREF(__pyx_v_res);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_res);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1675, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1672
 *         else:
 *             residual = ones((self._dataArray.shape[0], self.mainModel.outputCount))
 *         if index >= 0:             # <<<<<<<<<<<<<<
 *             jacob = self.getJacobian(index, donorm)
 *             res = squeeze(residual[:, newaxis]*jacob)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1676
 *             res = squeeze(residual[:, newaxis]*jacob)
 *             return sum(res, axis=0)
 *         for outIndex in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *             jacob = self.getJacobian(outIndex, donorm)
 *             costD = residual[:, outIndex]
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1676, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1676, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1676, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_9(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1676, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_outIndex, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1677
 *             return sum(res, axis=0)
 *         for outIndex in range(self.mainModel.outputCount):
 *             jacob = self.getJacobian(outIndex, donorm)             # <<<<<<<<<<<<<<
 *             costD = residual[:, outIndex]
 *             resloc = jacob * costD[:, newaxis]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getJacobian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outIndex, __pyx_v_donorm};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_outIndex, __pyx_v_donorm};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_outIndex);
      __Pyx_GIVEREF(__pyx_v_outIndex);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_outIndex);
      __Pyx_INCREF(__pyx_v_donorm);
      __Pyx_GIVEREF(__pyx_v_donorm);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_donorm);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_jacob, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1678
 *         for outIndex in range(self.mainModel.outputCount):
 *             jacob = self.getJacobian(outIndex, donorm)
 *             costD = residual[:, outIndex]             # <<<<<<<<<<<<<<
 *             resloc = jacob * costD[:, newaxis]
 *             if self._outputWeighting is not None:
 */
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_slice__87);
    __Pyx_GIVEREF(__pyx_slice__87);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_slice__87);
    __Pyx_INCREF(__pyx_v_outIndex);
    __Pyx_GIVEREF(__pyx_v_outIndex);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_outIndex);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_residual, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_costD, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1679
 *             jacob = self.getJacobian(outIndex, donorm)
 *             costD = residual[:, outIndex]
 *             resloc = jacob * costD[:, newaxis]             # <<<<<<<<<<<<<<
 *             if self._outputWeighting is not None:
 *                 resloc *= self._outputWeighting[outIndex]
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_slice__88);
    __Pyx_GIVEREF(__pyx_slice__88);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_slice__88);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_costD, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Multiply(__pyx_v_jacob, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_resloc, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1680
 *             costD = residual[:, outIndex]
 *             resloc = jacob * costD[:, newaxis]
 *             if self._outputWeighting is not None:             # <<<<<<<<<<<<<<
 *                 resloc *= self._outputWeighting[outIndex]
 *             if not outIndex:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = (__pyx_t_6 != Py_None);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = (__pyx_t_1 != 0);
    if (__pyx_t_10) {

      /* "metaphor/monal/driver/_driver.py":1681
 *             resloc = jacob * costD[:, newaxis]
 *             if self._outputWeighting is not None:
 *                 resloc *= self._outputWeighting[outIndex]             # <<<<<<<<<<<<<<
 *             if not outIndex:
 *                 res = resloc
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_outIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_resloc, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_resloc, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":1680
 *             costD = residual[:, outIndex]
 *             resloc = jacob * costD[:, newaxis]
 *             if self._outputWeighting is not None:             # <<<<<<<<<<<<<<
 *                 resloc *= self._outputWeighting[outIndex]
 *             if not outIndex:
 */
    }

    /* "metaphor/monal/driver/_driver.py":1682
 *             if self._outputWeighting is not None:
 *                 resloc *= self._outputWeighting[outIndex]
 *             if not outIndex:             # <<<<<<<<<<<<<<
 *                 res = resloc
 *             else:
 */
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_outIndex); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __pyx_t_1 = ((!__pyx_t_10) != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":1683
 *                 resloc *= self._outputWeighting[outIndex]
 *             if not outIndex:
 *                 res = resloc             # <<<<<<<<<<<<<<
 *             else:
 *                 res += resloc
 */
      __Pyx_INCREF(__pyx_v_resloc);
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_v_resloc);

      /* "metaphor/monal/driver/_driver.py":1682
 *             if self._outputWeighting is not None:
 *                 resloc *= self._outputWeighting[outIndex]
 *             if not outIndex:             # <<<<<<<<<<<<<<
 *                 res = resloc
 *             else:
 */
      goto __pyx_L8;
    }

    /* "metaphor/monal/driver/_driver.py":1685
 *                 res = resloc
 *             else:
 *                 res += resloc             # <<<<<<<<<<<<<<
 *         if doSum:
 *             return npsum(res, axis=0)
 */
    /*else*/ {
      if (unlikely(!__pyx_v_res)) { __Pyx_RaiseUnboundLocalError("res"); __PYX_ERR(0, 1685, __pyx_L1_error) }
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_res, __pyx_v_resloc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_6);
      __pyx_t_6 = 0;
    }
    __pyx_L8:;

    /* "metaphor/monal/driver/_driver.py":1676
 *             res = squeeze(residual[:, newaxis]*jacob)
 *             return sum(res, axis=0)
 *         for outIndex in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *             jacob = self.getJacobian(outIndex, donorm)
 *             costD = residual[:, outIndex]
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1686
 *             else:
 *                 res += resloc
 *         if doSum:             # <<<<<<<<<<<<<<
 *             return npsum(res, axis=0)
 *         return res
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_doSum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1686, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":1687
 *                 res += resloc
 *         if doSum:
 *             return npsum(res, axis=0)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(!__pyx_v_res)) { __Pyx_RaiseUnboundLocalError("res"); __PYX_ERR(0, 1687, __pyx_L1_error) }
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_res);
    __Pyx_GIVEREF(__pyx_v_res);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_res);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1687, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1686
 *             else:
 *                 res += resloc
 *         if doSum:             # <<<<<<<<<<<<<<
 *             return npsum(res, axis=0)
 *         return res
 */
  }

  /* "metaphor/monal/driver/_driver.py":1688
 *         if doSum:
 *             return npsum(res, axis=0)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def computeTrainDataProgressive(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_res)) { __Pyx_RaiseUnboundLocalError("res"); __PYX_ERR(0, 1688, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1658
 *     #        return np .copy(self._jacobians[index, :, :])
 * 
 *     def getPrime(self, index=-1, doSum=True, cost=True, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture du jacobien ou du gradient du modle ou de la fonction de cot.
 *         Si cost est True, retourne le rsultat relatif  la fonction de cot,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.getPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_residual);
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_outIndex);
  __Pyx_XDECREF(__pyx_v_costD);
  __Pyx_XDECREF(__pyx_v_resloc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1690
 *         return res
 * 
 *     def computeTrainDataProgressive(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *     # Methode ancienne, hrite de Delphi.
 *     # A conserver pour faire des mesures de performance et des validations de resultats
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_computelevel);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_computelevel);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_computelevel);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_119computeTrainDataProgressive(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_118computeTrainDataProgressive[] = "Calcul des Jacobiens, Gradients et Hessiens (un par sortie du mod\303\257\302\277\305\223le)\n        \nOn calcule les Jacobiens par sortie\nSi computeLevel // id_Cost != 0:\n    Si computelevel est id_Diff, on calcule aussi:\n        - les co\303\257\302\277\305\223t totaux -> un par sortie\n        - le gradient du co\303\257\302\277\305\223t par rapport aux poids -> \nLe calcul des Hessiens est en developpement        \n";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_119computeTrainDataProgressive = {"computeTrainDataProgressive", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_119computeTrainDataProgressive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_118computeTrainDataProgressive};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_119computeTrainDataProgressive(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_computelevel = 0;
  PyObject *__pyx_v_outResult = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainDataProgressive (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_computelevel,&__pyx_n_s_outResult,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_computelevel;
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_computelevel);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outResult);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainDataProgressive") < 0)) __PYX_ERR(0, 1690, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_computelevel = values[1];
    __pyx_v_outResult = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainDataProgressive", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1690, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainDataProgressive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_118computeTrainDataProgressive(__pyx_self, __pyx_v_self, __pyx_v_computelevel, __pyx_v_outResult);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_118computeTrainDataProgressive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult) {
  PyObject *__pyx_v_dataindex = NULL;
  PyObject *__pyx_v_indata = NULL;
  PyObject *__pyx_v_back = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("computeTrainDataProgressive", 0);
  __Pyx_INCREF(__pyx_v_computelevel);

  /* "metaphor/monal/driver/_driver.py":1702
 * Le calcul des Hessiens est en developpement
 * """
 *         computelevel = self._getComputeCondition(computelevel, outResult)             # <<<<<<<<<<<<<<
 *         #================================= debut du coeur de calcul sur les donnees
 *         # boucle sur les donnees
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getComputeCondition); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_computelevel, __pyx_v_outResult};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_computelevel, __pyx_v_outResult};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_computelevel);
    __Pyx_GIVEREF(__pyx_v_computelevel);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_computelevel);
    __Pyx_INCREF(__pyx_v_outResult);
    __Pyx_GIVEREF(__pyx_v_outResult);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_outResult);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_computelevel, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1708
 *             # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *             # on ne passe pas par le normaliseur de sortie car le cout sera evelue avec les donnees de sortie normalisees
 *         if not computelevel:             # <<<<<<<<<<<<<<
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_computelevel); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1709
 *             # on ne passe pas par le normaliseur de sortie car le cout sera evelue avec les donnees de sortie normalisees
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1709, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1709, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1709, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1709, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_indata, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_dataindex, __pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":1710
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs             # <<<<<<<<<<<<<<
 *         else:
 *             back = ones((self.mainModel.outputCount))
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_propagate); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_indata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_indata};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_indata};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1710, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_INCREF(__pyx_v_indata);
          __Pyx_GIVEREF(__pyx_v_indata);
          PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_indata);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_dataindex);
      __Pyx_GIVEREF(__pyx_v_dataindex);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_dataindex);
      __Pyx_INCREF(__pyx_slice__89);
      __Pyx_GIVEREF(__pyx_slice__89);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice__89);
      if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_11, __pyx_t_10) < 0)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1709
 *             # on ne passe pas par le normaliseur de sortie car le cout sera evelue avec les donnees de sortie normalisees
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1708
 *             # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *             # on ne passe pas par le normaliseur de sortie car le cout sera evelue avec les donnees de sortie normalisees
 *         if not computelevel:             # <<<<<<<<<<<<<<
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1712
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 *             back = ones((self.mainModel.outputCount))             # <<<<<<<<<<<<<<
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ones); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_back = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1713
 *         else:
 *             back = ones((self.mainModel.outputCount))
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1713, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1713, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1713, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_9(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1713, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_indata, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_dataindex, __pyx_t_1);
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1714
 *             back = ones((self.mainModel.outputCount))
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs             # <<<<<<<<<<<<<<
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)
 *         #================================= fin du coeur de calcul
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_propagate); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      if (!__pyx_t_11) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_indata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_indata};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_indata};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
          __Pyx_INCREF(__pyx_v_indata);
          __Pyx_GIVEREF(__pyx_v_indata);
          PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_indata);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_outputs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_dataindex);
      __Pyx_GIVEREF(__pyx_v_dataindex);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dataindex);
      __Pyx_INCREF(__pyx_slice__90);
      __Pyx_GIVEREF(__pyx_slice__90);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_slice__90);
      if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_3, __pyx_t_10) < 0)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1715
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)             # <<<<<<<<<<<<<<
 *         #================================= fin du coeur de calcul
 *         return self._outResult
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_backPropagate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_slice__91);
      __Pyx_GIVEREF(__pyx_slice__91);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_slice__91);
      __Pyx_INCREF(__pyx_v_dataindex);
      __Pyx_GIVEREF(__pyx_v_dataindex);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_dataindex);
      __Pyx_INCREF(__pyx_slice__92);
      __Pyx_GIVEREF(__pyx_slice__92);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_slice__92);
      __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_12, Py_None, __pyx_v_back};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_12, Py_None, __pyx_v_back};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_t_12);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, Py_None);
        __Pyx_INCREF(__pyx_v_back);
        __Pyx_GIVEREF(__pyx_v_back);
        PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_4, __pyx_v_back);
        __pyx_t_12 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1713
 *         else:
 *             back = ones((self.mainModel.outputCount))
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1717
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)
 *         #================================= fin du coeur de calcul
 *         return self._outResult             # <<<<<<<<<<<<<<
 * 
 *     def computeTrainDataDirect(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1690
 *         return res
 * 
 *     def computeTrainDataProgressive(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *     # Methode ancienne, hrite de Delphi.
 *     # A conserver pour faire des mesures de performance et des validations de resultats
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainDataProgressive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dataindex);
  __Pyx_XDECREF(__pyx_v_indata);
  __Pyx_XDECREF(__pyx_v_back);
  __Pyx_XDECREF(__pyx_v_computelevel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1719
 *         return self._outResult
 * 
 *     def computeTrainDataDirect(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle)par la mthode directe.
 * Doit tre utilise pour les modles dynamiques
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_18__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_computelevel);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_computelevel);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_computelevel);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_121computeTrainDataDirect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_120computeTrainDataDirect[] = "Calcul des Jacobiens, Gradients et Hessiens (un par sortie du mod\303\257\302\277\305\223le)par la m\303\257\302\277\305\223thode directe.      \nDoit \303\257\302\277\305\223tre utilis\303\257\302\277\305\223e pour les mod\303\257\302\277\305\223les dynamiques\n        \nOn calcule les Jacobiens par sortie\nSi computeLevel // id_Cost != 0:\n    Si computelevel est id_Diff, on calcule aussi:\n        - les co\303\257\302\277\305\223t totaux -> un par sortie\n        - le gradient du co\303\257\302\277\305\223t par rapport aux poids -> \nLe calcul des Hessiens est en developpement        \n";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_121computeTrainDataDirect = {"computeTrainDataDirect", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_121computeTrainDataDirect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_120computeTrainDataDirect};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_121computeTrainDataDirect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_computelevel = 0;
  PyObject *__pyx_v_outResult = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainDataDirect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_computelevel,&__pyx_n_s_outResult,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults5 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_computelevel;
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_computelevel);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outResult);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainDataDirect") < 0)) __PYX_ERR(0, 1719, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_computelevel = values[1];
    __pyx_v_outResult = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainDataDirect", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1719, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainDataDirect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_120computeTrainDataDirect(__pyx_self, __pyx_v_self, __pyx_v_computelevel, __pyx_v_outResult);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_120computeTrainDataDirect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult) {
  PyObject *__pyx_v_dataindex = NULL;
  PyObject *__pyx_v_indata = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("computeTrainDataDirect", 0);
  __Pyx_INCREF(__pyx_v_computelevel);

  /* "metaphor/monal/driver/_driver.py":1732
 * # utilise la methode progressive et directe de calcul.
 * # Il ne faut pas changer cela car c'est ce qu'il faut pour les modles dynamiques
 *         computelevel = self._getComputeCondition(computelevel, outResult)             # <<<<<<<<<<<<<<
 *         self.mainModel.inputDim = 1
 *         #================================= debut du coeur de calcul sur les donnees
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getComputeCondition); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_computelevel, __pyx_v_outResult};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_computelevel, __pyx_v_outResult};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_computelevel);
    __Pyx_GIVEREF(__pyx_v_computelevel);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_computelevel);
    __Pyx_INCREF(__pyx_v_outResult);
    __Pyx_GIVEREF(__pyx_v_outResult);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_outResult);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_computelevel, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1733
 * # Il ne faut pas changer cela car c'est ce qu'il faut pour les modles dynamiques
 *         computelevel = self._getComputeCondition(computelevel, outResult)
 *         self.mainModel.inputDim = 1             # <<<<<<<<<<<<<<
 *         #================================= debut du coeur de calcul sur les donnees
 *         # boucle sur les donnees
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_inputDim, __pyx_int_1) < 0) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1738
 *             # on commence par un transfert par le rseau, avec calcul local des drives
 *             # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *         if not computelevel:             # <<<<<<<<<<<<<<
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_computelevel); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1738, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1739
 *             # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1739, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1739, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1739, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1739, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_indata, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_dataindex, __pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":1740
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs             # <<<<<<<<<<<<<<
 *         else:
 *             for dataindex, indata in enumerate(self._inputArray):
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_propagate); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_indata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_indata};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_indata};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1740, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_INCREF(__pyx_v_indata);
          __Pyx_GIVEREF(__pyx_v_indata);
          PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_indata);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_dataindex);
      __Pyx_GIVEREF(__pyx_v_dataindex);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_dataindex);
      __Pyx_INCREF(__pyx_slice__93);
      __Pyx_GIVEREF(__pyx_slice__93);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice__93);
      if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_11, __pyx_t_10) < 0)) __PYX_ERR(0, 1740, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":1739
 *             # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1738
 *             # on commence par un transfert par le rseau, avec calcul local des drives
 *             # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *         if not computelevel:             # <<<<<<<<<<<<<<
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1742
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagateAndDirectGradient(indata, self._jacobians[:, dataindex, :])[0]
 *         return self._outResult
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_10 = __pyx_t_5; __Pyx_INCREF(__pyx_t_10); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1742, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_10)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1742, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1742, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1742, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1742, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_9(__pyx_t_10);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1742, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_indata, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_dataindex, __pyx_t_1);
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1743
 *         else:
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagateAndDirectGradient(indata, self._jacobians[:, dataindex, :])[0]             # <<<<<<<<<<<<<<
 *         return self._outResult
 * 
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_propagateAndDirectGradient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_slice__94);
      __Pyx_GIVEREF(__pyx_slice__94);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_slice__94);
      __Pyx_INCREF(__pyx_v_dataindex);
      __Pyx_GIVEREF(__pyx_v_dataindex);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_dataindex);
      __Pyx_INCREF(__pyx_slice__95);
      __Pyx_GIVEREF(__pyx_slice__95);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_slice__95);
      __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_indata, __pyx_t_12};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_indata, __pyx_t_12};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_indata);
        __Pyx_GIVEREF(__pyx_v_indata);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_4, __pyx_v_indata);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_4, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_dataindex);
      __Pyx_GIVEREF(__pyx_v_dataindex);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_dataindex);
      __Pyx_INCREF(__pyx_slice__96);
      __Pyx_GIVEREF(__pyx_slice__96);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice__96);
      if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_11, __pyx_t_2) < 0)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":1742
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *         else:
 *             for dataindex, indata in enumerate(self._inputArray):             # <<<<<<<<<<<<<<
 *                 self._outResult[dataindex, :] = self.mainModel.propagateAndDirectGradient(indata, self._jacobians[:, dataindex, :])[0]
 *         return self._outResult
 */
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1744
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagateAndDirectGradient(indata, self._jacobians[:, dataindex, :])[0]
 *         return self._outResult             # <<<<<<<<<<<<<<
 * 
 *     def computeTrainData(self, computelevel=C.ID_COMPUTE, outResult=None):   # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1719
 *         return self._outResult
 * 
 *     def computeTrainDataDirect(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle)par la mthode directe.
 * Doit tre utilise pour les modles dynamiques
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainDataDirect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dataindex);
  __Pyx_XDECREF(__pyx_v_indata);
  __Pyx_XDECREF(__pyx_v_computelevel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1746
 *         return self._outResult
 * 
 *     def computeTrainData(self, computelevel=C.ID_COMPUTE, outResult=None):   # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle).
 * La mthode utilise est la propagation-retropropagation (mthode dite classique),
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_20__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_computelevel);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_computelevel);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_computelevel);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_123computeTrainData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_122computeTrainData[] = "Calcul des Jacobiens, Gradients et Hessiens (un par sortie du mod\303\257\302\277\305\223le).\nLa m\303\257\302\277\305\223thode utilis\303\257\302\277\305\223e est la propagation-retropropagation (m\303\257\302\277\305\223thode dite classique),\navec integration des calculs \303\257\302\277\305\223 la mode python.\nLa retropropagation est \303\257\302\277\305\223galement int\303\257\302\277\305\223gr\303\257\302\277\305\223e du point de vue des sorties.\nLe calcul est donc fait noeud par noeud, en traitant \"simultanement\" touts les donn\303\257\302\277\305\223es\n        \nOn calcule les Jacobiens par sortie\nSi computeLevel // id_Cost != 0:\n    Si computelevel est id_Diff, on calcule aussi:\n        - les co\303\257\302\277\305\223t totaux -> un par sortie\n        - le gradient du co\303\257\302\277\305\223t par rapport aux poids -> \nLe calcul des Hessiens est en developpement        \n";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_123computeTrainData = {"computeTrainData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_123computeTrainData, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_122computeTrainData};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_123computeTrainData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_computelevel = 0;
  PyObject *__pyx_v_outResult = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeTrainData (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_computelevel,&__pyx_n_s_outResult,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults6 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_computelevel;
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_computelevel);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outResult);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeTrainData") < 0)) __PYX_ERR(0, 1746, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_computelevel = values[1];
    __pyx_v_outResult = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeTrainData", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1746, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_122computeTrainData(__pyx_self, __pyx_v_self, __pyx_v_computelevel, __pyx_v_outResult);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_122computeTrainData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_computelevel, PyObject *__pyx_v_outResult) {
  PyObject *__pyx_v_back = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("computeTrainData", 0);
  __Pyx_INCREF(__pyx_v_computelevel);

  /* "metaphor/monal/driver/_driver.py":1760
 * Le calcul des Hessiens est en developpement
 * """
 *         computelevel = self._getComputeCondition(computelevel, outResult)             # <<<<<<<<<<<<<<
 *         # on commence par un transfert par le rseau, avec calcul local des drives si necessaire
 *         # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getComputeCondition); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_computelevel, __pyx_v_outResult};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_computelevel, __pyx_v_outResult};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_computelevel);
    __Pyx_GIVEREF(__pyx_v_computelevel);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_computelevel);
    __Pyx_INCREF(__pyx_v_outResult);
    __Pyx_GIVEREF(__pyx_v_outResult);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_outResult);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_computelevel, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1764
 *         # on ne passe pas par le normaliseur d'entree car on utilise les donnes dej normalises
 *         # on ne passe pas par le normaliseur de sortie car le cout sera evelue avec les donnees de sortie normalisees
 *         self.mainModel.propagate(self._inputArray)             # <<<<<<<<<<<<<<
 *         self.mainModel.outputs.copyTo(self._outResult)
 *         if self.mainModel.computeLevel:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_propagate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1765
 *         # on ne passe pas par le normaliseur de sortie car le cout sera evelue avec les donnees de sortie normalisees
 *         self.mainModel.propagate(self._inputArray)
 *         self.mainModel.outputs.copyTo(self._outResult)             # <<<<<<<<<<<<<<
 *         if self.mainModel.computeLevel:
 *             self._jacobians.fill(0)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_outputs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_copyTo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1766
 *         self.mainModel.propagate(self._inputArray)
 *         self.mainModel.outputs.copyTo(self._outResult)
 *         if self.mainModel.computeLevel:             # <<<<<<<<<<<<<<
 *             self._jacobians.fill(0)
 *             if self.mainModel.outputCount == 1:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_computeLevel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1767
 *         self.mainModel.outputs.copyTo(self._outResult)
 *         if self.mainModel.computeLevel:
 *             self._jacobians.fill(0)             # <<<<<<<<<<<<<<
 *             if self.mainModel.outputCount == 1:
 *                 back = 1
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1768
 *         if self.mainModel.computeLevel:
 *             self._jacobians.fill(0)
 *             if self.mainModel.outputCount == 1:             # <<<<<<<<<<<<<<
 *                 back = 1
 *                 self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0, :, :], None, back)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {

      /* "metaphor/monal/driver/_driver.py":1769
 *             self._jacobians.fill(0)
 *             if self.mainModel.outputCount == 1:
 *                 back = 1             # <<<<<<<<<<<<<<
 *                 self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0, :, :], None, back)
 *             else:
 */
      __Pyx_INCREF(__pyx_int_1);
      __pyx_v_back = __pyx_int_1;

      /* "metaphor/monal/driver/_driver.py":1770
 *             if self.mainModel.outputCount == 1:
 *                 back = 1
 *                 self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0, :, :], None, back)             # <<<<<<<<<<<<<<
 *             else:
 *                 back = identity(self.mainModel.outputCount)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_backPropagateCoreSingleOutput); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_tuple__100); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_6, Py_None, __pyx_v_back};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_6, Py_None, __pyx_v_back};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_t_6);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, Py_None);
        __Pyx_INCREF(__pyx_v_back);
        __Pyx_GIVEREF(__pyx_v_back);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_4, __pyx_v_back);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1768
 *         if self.mainModel.computeLevel:
 *             self._jacobians.fill(0)
 *             if self.mainModel.outputCount == 1:             # <<<<<<<<<<<<<<
 *                 back = 1
 *                 self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0, :, :], None, back)
 */
      goto __pyx_L4;
    }

    /* "metaphor/monal/driver/_driver.py":1772
 *                 self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0, :, :], None, back)
 *             else:
 *                 back = identity(self.mainModel.outputCount)             # <<<<<<<<<<<<<<
 *                 self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)
 * 
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_identity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_back = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":1773
 *             else:
 *                 back = identity(self.mainModel.outputCount)
 *                 self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)             # <<<<<<<<<<<<<<
 * 
 *         return self._outResult
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_backPropagateCoreMultiOutput); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, Py_None, __pyx_v_back};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, Py_None, __pyx_v_back};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1773, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_t_3);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, Py_None);
        __Pyx_INCREF(__pyx_v_back);
        __Pyx_GIVEREF(__pyx_v_back);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_4, __pyx_v_back);
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_L4:;

    /* "metaphor/monal/driver/_driver.py":1766
 *         self.mainModel.propagate(self._inputArray)
 *         self.mainModel.outputs.copyTo(self._outResult)
 *         if self.mainModel.computeLevel:             # <<<<<<<<<<<<<<
 *             self._jacobians.fill(0)
 *             if self.mainModel.outputCount == 1:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1775
 *                 self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)
 * 
 *         return self._outResult             # <<<<<<<<<<<<<<
 * 
 * #========================= debut des interfaces pour optimisation ==============
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outResult_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1746
 *         return self._outResult
 * 
 *     def computeTrainData(self, computelevel=C.ID_COMPUTE, outResult=None):   # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle).
 * La mthode utilise est la propagation-retropropagation (mthode dite classique),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.computeTrainData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_back);
  __Pyx_XDECREF(__pyx_v_computelevel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1779
 * #========================= debut des interfaces pour optimisation ==============
 * 
 *     def backupParamsNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         self._backupParams = array(self.mainModel.weights)
 *         return self.mainModel.synapseCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_125backupParamsNT(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_125backupParamsNT = {"backupParamsNT", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_125backupParamsNT, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_125backupParamsNT(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backupParamsNT (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_124backupParamsNT(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_124backupParamsNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("backupParamsNT", 0);

  /* "metaphor/monal/driver/_driver.py":1780
 * 
 *     def backupParamsNT(self):  # Driver
 *         self._backupParams = array(self.mainModel.weights)             # <<<<<<<<<<<<<<
 *         return self.mainModel.synapseCount
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_weights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_backupParams, __pyx_t_1) < 0) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1781
 *     def backupParamsNT(self):  # Driver
 *         self._backupParams = array(self.mainModel.weights)
 *         return self.mainModel.synapseCount             # <<<<<<<<<<<<<<
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_synapseCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1779
 * #========================= debut des interfaces pour optimisation ==============
 * 
 *     def backupParamsNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         self._backupParams = array(self.mainModel.weights)
 *         return self.mainModel.synapseCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.backupParamsNT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1783
 *         return self.mainModel.synapseCount
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         if weights is not None:
 *             weights = self._backupParams + squeeze(asarray(weights))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_127restoreParamsNT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_127restoreParamsNT = {"restoreParamsNT", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_127restoreParamsNT, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_127restoreParamsNT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("restoreParamsNT (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "restoreParamsNT") < 0)) __PYX_ERR(0, 1783, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("restoreParamsNT", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1783, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.restoreParamsNT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_126restoreParamsNT(__pyx_self, __pyx_v_self, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_126restoreParamsNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("restoreParamsNT", 0);
  __Pyx_INCREF(__pyx_v_weights);

  /* "metaphor/monal/driver/_driver.py":1784
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             weights = self._backupParams + squeeze(asarray(weights))
 *         else:
 */
  __pyx_t_1 = (__pyx_v_weights != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1785
 *     def restoreParamsNT(self, weights=None):  # Driver
 *         if weights is not None:
 *             weights = self._backupParams + squeeze(asarray(weights))             # <<<<<<<<<<<<<<
 *         else:
 *             weights = self._backupParams
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_backupParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_weights};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_weights};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_weights);
        __Pyx_GIVEREF(__pyx_v_weights);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_weights);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1785, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_weights, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1784
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             weights = self._backupParams + squeeze(asarray(weights))
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1787
 *             weights = self._backupParams + squeeze(asarray(weights))
 *         else:
 *             weights = self._backupParams             # <<<<<<<<<<<<<<
 *         self.mainModel.loadParameters(weights)
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_backupParams); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_weights, __pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1788
 *         else:
 *             weights = self._backupParams
 *         self.mainModel.loadParameters(weights)             # <<<<<<<<<<<<<<
 * 
 *     def costgradientNT(self):  # Driver
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_loadParameters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_weights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_weights};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_weights};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_weights);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1783
 *         return self.mainModel.synapseCount
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         if weights is not None:
 *             weights = self._backupParams + squeeze(asarray(weights))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.restoreParamsNT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_weights);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1790
 *         self.mainModel.loadParameters(weights)
 * 
 *     def costgradientNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         cost, grad = self.costAndPrime()
 *         return cost, grad, None
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_129costgradientNT(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_129costgradientNT = {"costgradientNT", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_129costgradientNT, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_129costgradientNT(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("costgradientNT (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_128costgradientNT(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_128costgradientNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_cost = NULL;
  PyObject *__pyx_v_grad = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  __Pyx_RefNannySetupContext("costgradientNT", 0);

  /* "metaphor/monal/driver/_driver.py":1791
 * 
 *     def costgradientNT(self):  # Driver
 *         cost, grad = self.costAndPrime()             # <<<<<<<<<<<<<<
 *         return cost, grad, None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_costAndPrime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1791, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1791, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1791, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_cost = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_grad = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1792
 *     def costgradientNT(self):  # Driver
 *         cost, grad = self.costAndPrime()
 *         return cost, grad, None             # <<<<<<<<<<<<<<
 * 
 *     def costNT(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_cost);
  __Pyx_GIVEREF(__pyx_v_cost);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cost);
  __Pyx_INCREF(__pyx_v_grad);
  __Pyx_GIVEREF(__pyx_v_grad);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_grad);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1790
 *         self.mainModel.loadParameters(weights)
 * 
 *     def costgradientNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         cost, grad = self.costAndPrime()
 *         return cost, grad, None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.costgradientNT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cost);
  __Pyx_XDECREF(__pyx_v_grad);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1794
 *         return cost, grad, None
 * 
 *     def costNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.cost()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_131costNT(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_131costNT = {"costNT", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_131costNT, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_131costNT(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("costNT (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_130costNT(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_130costNT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("costNT", 0);

  /* "metaphor/monal/driver/_driver.py":1795
 * 
 *     def costNT(self):  # Driver
 *         return self.cost()             # <<<<<<<<<<<<<<
 * 
 *     def cost(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1795, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1795, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1794
 *         return cost, grad, None
 * 
 *     def costNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.cost()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.costNT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1797
 *         return self.cost()
 * 
 *     def cost(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage.
 *         ce cot inclut l'effet de la fonction d'erreur de sortie"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_133cost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_132cost[] = "Calcule et retourne le co\303\257\302\277\305\223t moyen d'apprentissage.\n        ce co\303\257\302\277\305\223t inclut l'effet de la fonction d'erreur de sortie";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_133cost = {"cost", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_133cost, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_132cost};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_133cost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_mean = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cost (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_mode,&__pyx_n_s_mean,&__pyx_n_s_donorm,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_u_integrated));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mean);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cost") < 0)) __PYX_ERR(0, 1797, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_mode = values[2];
    __pyx_v_mean = values[3];
    __pyx_v_donorm = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cost", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1797, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.cost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_132cost(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_mode, __pyx_v_mean, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_132cost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_mode, PyObject *__pyx_v_mean, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_outCost = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("cost", 0);

  /* "metaphor/monal/driver/_driver.py":1801
 *         ce cot inclut l'effet de la fonction d'erreur de sortie"""
 *         # mode in ("integrated", "direct", "progressive")
 *         self._mode = mode             # <<<<<<<<<<<<<<
 *         if isNewWeight(self.mainModel, weights):
 *         #if weights is not None:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mode_2, __pyx_v_mode) < 0) __PYX_ERR(0, 1801, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1802
 *         # mode in ("integrated", "direct", "progressive")
 *         self._mode = mode
 *         if isNewWeight(self.mainModel, weights):             # <<<<<<<<<<<<<<
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isNewWeight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_weights};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_weights};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_weights);
    __Pyx_GIVEREF(__pyx_v_weights);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_weights);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1804
 *         if isNewWeight(self.mainModel, weights):
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)             # <<<<<<<<<<<<<<
 *         if mode == "integrated":
 *             self.computeTrainData()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_assign); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_weights};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_weights};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_weights);
        __Pyx_GIVEREF(__pyx_v_weights);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_weights);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1802
 *         # mode in ("integrated", "direct", "progressive")
 *         self._mode = mode
 *         if isNewWeight(self.mainModel, weights):             # <<<<<<<<<<<<<<
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1805
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 *         if mode == "integrated":             # <<<<<<<<<<<<<<
 *             self.computeTrainData()
 *         elif mode == "direct":
 */
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_integrated, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1805, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1806
 *             self.mainModel.weights.assign(weights)
 *         if mode == "integrated":
 *             self.computeTrainData()             # <<<<<<<<<<<<<<
 *         elif mode == "direct":
 *             self.computeTrainDataDirect()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1805
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 *         if mode == "integrated":             # <<<<<<<<<<<<<<
 *             self.computeTrainData()
 *         elif mode == "direct":
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1807
 *         if mode == "integrated":
 *             self.computeTrainData()
 *         elif mode == "direct":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataDirect()
 *         elif mode == "progressive":
 */
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_direct, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1807, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1808
 *             self.computeTrainData()
 *         elif mode == "direct":
 *             self.computeTrainDataDirect()             # <<<<<<<<<<<<<<
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainDataDirect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1807
 *         if mode == "integrated":
 *             self.computeTrainData()
 *         elif mode == "direct":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataDirect()
 *         elif mode == "progressive":
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1809
 *         elif mode == "direct":
 *             self.computeTrainDataDirect()
 *         elif mode == "progressive":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataProgressive()
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 */
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_progressive, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1809, __pyx_L1_error)
  if (likely(__pyx_t_7)) {

    /* "metaphor/monal/driver/_driver.py":1810
 *             self.computeTrainDataDirect()
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive()             # <<<<<<<<<<<<<<
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainDataProgressive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1809
 *         elif mode == "direct":
 *             self.computeTrainDataDirect()
 *         elif mode == "progressive":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataProgressive()
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1811
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive()
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')             # <<<<<<<<<<<<<<
 * 
 *         outCost = self.getCost(doSum=True, donorm=donorm)
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1811, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":1813
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 *         outCost = self.getCost(doSum=True, donorm=donorm)             # <<<<<<<<<<<<<<
 *         if mean:
 *             return outCost/self.dataCount
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getCost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_doSum, Py_True) < 0) __PYX_ERR(0, 1813, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 1813, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_outCost = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1814
 * 
 *         outCost = self.getCost(doSum=True, donorm=donorm)
 *         if mean:             # <<<<<<<<<<<<<<
 *             return outCost/self.dataCount
 *         return outCost
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_mean); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1814, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1815
 *         outCost = self.getCost(doSum=True, donorm=donorm)
 *         if mean:
 *             return outCost/self.dataCount             # <<<<<<<<<<<<<<
 *         return outCost
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_outCost, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1814
 * 
 *         outCost = self.getCost(doSum=True, donorm=donorm)
 *         if mean:             # <<<<<<<<<<<<<<
 *             return outCost/self.dataCount
 *         return outCost
 */
  }

  /* "metaphor/monal/driver/_driver.py":1816
 *         if mean:
 *             return outCost/self.dataCount
 *         return outCost             # <<<<<<<<<<<<<<
 * 
 *     def costAndPrime(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_outCost);
  __pyx_r = __pyx_v_outCost;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1797
 *         return self.cost()
 * 
 *     def cost(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage.
 *         ce cot inclut l'effet de la fonction d'erreur de sortie"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.cost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outCost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1818
 *         return outCost
 * 
 *     def costAndPrime(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage et le gradient de
 *         cette fonction par rapport aux paramtres.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_135costAndPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_134costAndPrime[] = "Calcule et retourne le co\303\257\302\277\305\223t moyen d'apprentissage et le gradient de \n        cette fonction par rapport aux param\303\257\302\277\305\223tres.\n        Le co\303\257\302\277\305\223t inclut l'effet de la fonction d'erreur de sortie";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_135costAndPrime = {"costAndPrime", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_135costAndPrime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_134costAndPrime};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_135costAndPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_mean = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("costAndPrime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_mode,&__pyx_n_s_mean,&__pyx_n_s_donorm,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_u_integrated));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mean);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "costAndPrime") < 0)) __PYX_ERR(0, 1818, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_mode = values[2];
    __pyx_v_mean = values[3];
    __pyx_v_donorm = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("costAndPrime", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1818, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.costAndPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_134costAndPrime(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_mode, __pyx_v_mean, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_134costAndPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_mode, PyObject *__pyx_v_mean, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_cost = NULL;
  PyObject *__pyx_v_grad = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("costAndPrime", 0);

  /* "metaphor/monal/driver/_driver.py":1823
 *         Le cot inclut l'effet de la fonction d'erreur de sortie"""
 *         # mode in ("integrated", "direct", "progressive")
 *         self._mode = mode             # <<<<<<<<<<<<<<
 *         if isNewWeight(self.mainModel, weights):
 *         #if weights is not None:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mode_2, __pyx_v_mode) < 0) __PYX_ERR(0, 1823, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1824
 *         # mode in ("integrated", "direct", "progressive")
 *         self._mode = mode
 *         if isNewWeight(self.mainModel, weights):             # <<<<<<<<<<<<<<
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isNewWeight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_weights};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_weights};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_weights);
    __Pyx_GIVEREF(__pyx_v_weights);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_weights);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1826
 *         if isNewWeight(self.mainModel, weights):
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)             # <<<<<<<<<<<<<<
 *         if mode == "integrated":
 *             self.computeTrainData(C.ID_DIFF)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_assign); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_weights};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1826, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_weights};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1826, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1826, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_weights);
        __Pyx_GIVEREF(__pyx_v_weights);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_weights);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1826, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1824
 *         # mode in ("integrated", "direct", "progressive")
 *         self._mode = mode
 *         if isNewWeight(self.mainModel, weights):             # <<<<<<<<<<<<<<
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1827
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 *         if mode == "integrated":             # <<<<<<<<<<<<<<
 *             self.computeTrainData(C.ID_DIFF)
 *         elif mode == "direct":
 */
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_integrated, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1828
 *             self.mainModel.weights.assign(weights)
 *         if mode == "integrated":
 *             self.computeTrainData(C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         elif mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1828, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1827
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 *         if mode == "integrated":             # <<<<<<<<<<<<<<
 *             self.computeTrainData(C.ID_DIFF)
 *         elif mode == "direct":
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1829
 *         if mode == "integrated":
 *             self.computeTrainData(C.ID_DIFF)
 *         elif mode == "direct":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif mode == "progressive":
 */
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_direct, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1829, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1830
 *             self.computeTrainData(C.ID_DIFF)
 *         elif mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainDataDirect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1829
 *         if mode == "integrated":
 *             self.computeTrainData(C.ID_DIFF)
 *         elif mode == "direct":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif mode == "progressive":
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1831
 *         elif mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif mode == "progressive":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 */
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_progressive, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1831, __pyx_L1_error)
  if (likely(__pyx_t_7)) {

    /* "metaphor/monal/driver/_driver.py":1832
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainDataProgressive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1831
 *         elif mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif mode == "progressive":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":1833
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')             # <<<<<<<<<<<<<<
 * 
 *         if mean:
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1833, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":1835
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 *         if mean:             # <<<<<<<<<<<<<<
 *             cost = self.getCost(doSum=True, donorm=donorm)/self.dataCount
 *         else:
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_mean); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1835, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1836
 * 
 *         if mean:
 *             cost = self.getCost(doSum=True, donorm=donorm)/self.dataCount             # <<<<<<<<<<<<<<
 *         else:
 *             cost = self.getCost(doSum=True, donorm=donorm)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getCost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_doSum, Py_True) < 0) __PYX_ERR(0, 1836, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 1836, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cost = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1835
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 *         if mean:             # <<<<<<<<<<<<<<
 *             cost = self.getCost(doSum=True, donorm=donorm)/self.dataCount
 *         else:
 */
    goto __pyx_L5;
  }

  /* "metaphor/monal/driver/_driver.py":1838
 *             cost = self.getCost(doSum=True, donorm=donorm)/self.dataCount
 *         else:
 *             cost = self.getCost(doSum=True, donorm=donorm)             # <<<<<<<<<<<<<<
 *         grad = self.getPrime(donorm=donorm)
 *         return cost, grad
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getCost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_doSum, Py_True) < 0) __PYX_ERR(0, 1838, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 1838, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cost = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "metaphor/monal/driver/_driver.py":1839
 *         else:
 *             cost = self.getCost(doSum=True, donorm=donorm)
 *         grad = self.getPrime(donorm=donorm)             # <<<<<<<<<<<<<<
 *         return cost, grad
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getPrime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 1839, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_grad = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":1840
 *             cost = self.getCost(doSum=True, donorm=donorm)
 *         grad = self.getPrime(donorm=donorm)
 *         return cost, grad             # <<<<<<<<<<<<<<
 * 
 *     def prime(self, weights=None, donorm=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_cost);
  __Pyx_GIVEREF(__pyx_v_cost);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cost);
  __Pyx_INCREF(__pyx_v_grad);
  __Pyx_GIVEREF(__pyx_v_grad);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_grad);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1818
 *         return outCost
 * 
 *     def costAndPrime(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage et le gradient de
 *         cette fonction par rapport aux paramtres.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.costAndPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cost);
  __Pyx_XDECREF(__pyx_v_grad);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1842
 *         return cost, grad
 * 
 *     def prime(self, weights=None, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le gradient de la fonction de cot par rapport aux paramtres.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_137prime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_136prime[] = "Calcule et retourne le gradient de la fonction de co\303\257\302\277\305\223t par rapport aux param\303\257\302\277\305\223tres.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_137prime = {"prime", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_137prime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_136prime};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_137prime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_donorm,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prime") < 0)) __PYX_ERR(0, 1842, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_donorm = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prime", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1842, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.prime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_136prime(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_136prime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_weights, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("prime", 0);

  /* "metaphor/monal/driver/_driver.py":1845
 *         """Calcule et retourne le gradient de la fonction de cot par rapport aux paramtres.
 *         """
 *         if self._mode in ["", "integrated"]:             # <<<<<<<<<<<<<<
 *             self.computeTrainData(C.ID_DIFF)
 *         elif self._mode == "direct":
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1845, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_integrated, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1846
 *         """
 *         if self._mode in ["", "integrated"]:
 *             self.computeTrainData(C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         elif self._mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1845
 *         """Calcule et retourne le gradient de la fonction de cot par rapport aux paramtres.
 *         """
 *         if self._mode in ["", "integrated"]:             # <<<<<<<<<<<<<<
 *             self.computeTrainData(C.ID_DIFF)
 *         elif self._mode == "direct":
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1847
 *         if self._mode in ["", "integrated"]:
 *             self.computeTrainData(C.ID_DIFF)
 *         elif self._mode == "direct":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif self._mode == "progressive":
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_direct, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1848
 *             self.computeTrainData(C.ID_DIFF)
 *         elif self._mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         elif self._mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainDataDirect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1847
 *         if self._mode in ["", "integrated"]:
 *             self.computeTrainData(C.ID_DIFF)
 *         elif self._mode == "direct":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif self._mode == "progressive":
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1849
 *         elif self._mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif self._mode == "progressive":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mode_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_progressive, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_3)) {

    /* "metaphor/monal/driver/_driver.py":1850
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif self._mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainDataProgressive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1850, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1849
 *         elif self._mode == "direct":
 *             self.computeTrainDataDirect(C.ID_DIFF)
 *         elif self._mode == "progressive":             # <<<<<<<<<<<<<<
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1851
 *         elif self._mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')             # <<<<<<<<<<<<<<
 * 
 *         return self.getPrime(donorm=donorm)
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1851, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1853
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')
 * 
 *         return self.getPrime(donorm=donorm)             # <<<<<<<<<<<<<<
 * 
 *     def residuals(self, weights=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getPrime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 1853, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1842
 *         return cost, grad
 * 
 *     def prime(self, weights=None, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le gradient de la fonction de cot par rapport aux paramtres.
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.prime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1855
 *         return self.getPrime(donorm=donorm)
 * 
 *     def residuals(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus normaliss du modle.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_139residuals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_138residuals[] = "Mise en forme pour les routines d'optimisation.\n        Calcule et retourne les r\303\257\302\277\305\223sidus normalis\303\257\302\277\305\223s du mod\303\257\302\277\305\223le.\n        Est li\303\257\302\277\305\223e avec la routine residualsPrime qui peut \303\257\302\277\305\223tre appel\303\257\302\277\305\223e apr\303\257\302\277\305\223s.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_139residuals = {"residuals", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_139residuals, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_138residuals};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_139residuals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("residuals (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "residuals") < 0)) __PYX_ERR(0, 1855, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("residuals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1855, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.residuals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_138residuals(__pyx_self, __pyx_v_self, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_138residuals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("residuals", 0);

  /* "metaphor/monal/driver/_driver.py":1861
 *         """
 *         #if isNewWeight(self.mainModel, weights):
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights.assign(weights)
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray
 */
  __pyx_t_1 = (__pyx_v_weights != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1862
 *         #if isNewWeight(self.mainModel, weights):
 *         if weights is not None:
 *             self.mainModel.weights.assign(weights)             # <<<<<<<<<<<<<<
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray
 *         if (self.mainModel.outputCount > 1) and (self._outputWeighting is not None):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_weights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_assign); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_weights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_weights};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_weights};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1862, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_weights);
        __Pyx_GIVEREF(__pyx_v_weights);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_weights);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1861
 *         """
 *         #if isNewWeight(self.mainModel, weights):
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights.assign(weights)
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray
 */
  }

  /* "metaphor/monal/driver/_driver.py":1863
 *         if weights is not None:
 *             self.mainModel.weights.assign(weights)
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray             # <<<<<<<<<<<<<<
 *         if (self.mainModel.outputCount > 1) and (self._outputWeighting is not None):
 *             res *= self._outputWeighting
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_res = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":1864
 *             self.mainModel.weights.assign(weights)
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray
 *         if (self.mainModel.outputCount > 1) and (self._outputWeighting is not None):             # <<<<<<<<<<<<<<
 *             res *= self._outputWeighting
 *         return squeeze(res)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = (__pyx_t_7 != Py_None);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = (__pyx_t_1 != 0);
  __pyx_t_2 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1865
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray
 *         if (self.mainModel.outputCount > 1) and (self._outputWeighting is not None):
 *             res *= self._outputWeighting             # <<<<<<<<<<<<<<
 *         return squeeze(res)
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_res, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1864
 *             self.mainModel.weights.assign(weights)
 *         res = self.computeTrainData(C.ID_DIFF) - self._outputArray
 *         if (self.mainModel.outputCount > 1) and (self._outputWeighting is not None):             # <<<<<<<<<<<<<<
 *             res *= self._outputWeighting
 *         return squeeze(res)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1866
 *         if (self.mainModel.outputCount > 1) and (self._outputWeighting is not None):
 *             res *= self._outputWeighting
 *         return squeeze(res)             # <<<<<<<<<<<<<<
 * 
 *     def residualsPrime(self, weights=None):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_res); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_res};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_res};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_res);
      __Pyx_GIVEREF(__pyx_v_res);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_res);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1855
 *         return self.getPrime(donorm=donorm)
 * 
 *     def residuals(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus normaliss du modle.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.residuals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1868
 *         return squeeze(res)
 * 
 *     def residualsPrime(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien normalis du modle.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_141residualsPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_140residualsPrime[] = "Mise en forme pour les routines d'optimisation.\n        Calcule et retourne le jacobien normalis\303\257\302\277\305\223 du mod\303\257\302\277\305\223le.\n        Doit \303\257\302\277\305\223tre appel\303\257\302\277\305\223e apr\303\257\302\277\305\223s un appel \303\257\302\277\305\223 residuals.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_141residualsPrime = {"residualsPrime", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_141residualsPrime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_140residualsPrime};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_141residualsPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("residualsPrime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "residualsPrime") < 0)) __PYX_ERR(0, 1868, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("residualsPrime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1868, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.residualsPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_140residualsPrime(__pyx_self, __pyx_v_self, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_140residualsPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights) {
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_v_back = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  __Pyx_RefNannySetupContext("residualsPrime", 0);

  /* "metaphor/monal/driver/_driver.py":1873
 *         Doit tre appele aprs un appel  residuals.
 *         """
 *         if weights is not None:  #isNewWeight(self.mainModel, weights):             # <<<<<<<<<<<<<<
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 */
  __pyx_t_1 = (__pyx_v_weights != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1875
 *         if weights is not None:  #isNewWeight(self.mainModel, weights):
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         nd = self.dataCount
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_weights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_assign); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_weights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_weights};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_weights};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_weights);
        __Pyx_GIVEREF(__pyx_v_weights);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_weights);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1873
 *         Doit tre appele aprs un appel  residuals.
 *         """
 *         if weights is not None:  #isNewWeight(self.mainModel, weights):             # <<<<<<<<<<<<<<
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1876
 *         #if weights is not None:
 *             self.mainModel.weights.assign(weights)
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_no = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1877
 *             self.mainModel.weights.assign(weights)
 *         no = self.mainModel.outputCount
 *         nd = self.dataCount             # <<<<<<<<<<<<<<
 *         ns = self.mainModel.synapseCount
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_nd = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1878
 *         no = self.mainModel.outputCount
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount             # <<<<<<<<<<<<<<
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):
 *             self._jacobians = ndarray((no, nd, ns))
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_synapseCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_ns = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1879
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):             # <<<<<<<<<<<<<<
 *             self._jacobians = ndarray((no, nd, ns))
 *         self._jacobians.fill(0)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = (__pyx_t_3 == Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_nd);
  __Pyx_INCREF(__pyx_v_ns);
  __Pyx_GIVEREF(__pyx_v_ns);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ns);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1880
 *         ns = self.mainModel.synapseCount
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):
 *             self._jacobians = ndarray((no, nd, ns))             # <<<<<<<<<<<<<<
 *         self._jacobians.fill(0)
 *         if no == 1:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_no);
    __Pyx_GIVEREF(__pyx_v_no);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_no);
    __Pyx_INCREF(__pyx_v_nd);
    __Pyx_GIVEREF(__pyx_v_nd);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nd);
    __Pyx_INCREF(__pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_ns);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1880, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1880, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1880, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2, __pyx_t_6) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1879
 *         nd = self.dataCount
 *         ns = self.mainModel.synapseCount
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):             # <<<<<<<<<<<<<<
 *             self._jacobians = ndarray((no, nd, ns))
 *         self._jacobians.fill(0)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1881
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):
 *             self._jacobians = ndarray((no, nd, ns))
 *         self._jacobians.fill(0)             # <<<<<<<<<<<<<<
 *         if no == 1:
 *             back = 1
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1882
 *             self._jacobians = ndarray((no, nd, ns))
 *         self._jacobians.fill(0)
 *         if no == 1:             # <<<<<<<<<<<<<<
 *             back = 1
 *             self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0], None, back)
 */
  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_no, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1883
 *         self._jacobians.fill(0)
 *         if no == 1:
 *             back = 1             # <<<<<<<<<<<<<<
 *             self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0], None, back)
 *             return squeeze(self._jacobians)
 */
    __Pyx_INCREF(__pyx_int_1);
    __pyx_v_back = __pyx_int_1;

    /* "metaphor/monal/driver/_driver.py":1884
 *         if no == 1:
 *             back = 1
 *             self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0], None, back)             # <<<<<<<<<<<<<<
 *             return squeeze(self._jacobians)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_backPropagateCoreSingleOutput); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_4, Py_None, __pyx_v_back};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_4, Py_None, __pyx_v_back};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_4);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, Py_None);
      __Pyx_INCREF(__pyx_v_back);
      __Pyx_GIVEREF(__pyx_v_back);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_9, __pyx_v_back);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":1885
 *             back = 1
 *             self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0], None, back)
 *             return squeeze(self._jacobians)             # <<<<<<<<<<<<<<
 * 
 *         back = identity(no)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1885, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1885, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1885, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1885, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1882
 *             self._jacobians = ndarray((no, nd, ns))
 *         self._jacobians.fill(0)
 *         if no == 1:             # <<<<<<<<<<<<<<
 *             back = 1
 *             self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0], None, back)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1887
 *             return squeeze(self._jacobians)
 * 
 *         back = identity(no)             # <<<<<<<<<<<<<<
 *         self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)
 * 
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_identity); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_no); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_no};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_no};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_no);
      __Pyx_GIVEREF(__pyx_v_no);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_no);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_back = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1888
 * 
 *         back = identity(no)
 *         self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)             # <<<<<<<<<<<<<<
 * 
 *         if self._outputWeighting is not None:
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_backPropagateCoreMultiOutput); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, Py_None, __pyx_v_back};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, Py_None, __pyx_v_back};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_8);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, Py_None);
    __Pyx_INCREF(__pyx_v_back);
    __Pyx_GIVEREF(__pyx_v_back);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_9, __pyx_v_back);
    __pyx_t_8 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1890
 *         self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)
 * 
 *         if self._outputWeighting is not None:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.outputCount):
 *                 if not ind:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = (__pyx_t_6 != Py_None);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1891
 * 
 *         if self._outputWeighting is not None:
 *             for ind in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *                 if not ind:
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1891, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1891, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1891, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_11(__pyx_t_5);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1891, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":1892
 *         if self._outputWeighting is not None:
 *             for ind in range(self.mainModel.outputCount):
 *                 if not ind:             # <<<<<<<<<<<<<<
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]
 *                 else:
 */
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_ind); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1892, __pyx_L1_error)
      __pyx_t_2 = ((!__pyx_t_7) != 0);
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":1893
 *             for ind in range(self.mainModel.outputCount):
 *                 if not ind:
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]             # <<<<<<<<<<<<<<
 *                 else:
 *                     res += self._jacobians[ind, :, :] * self._outputWeighting[ind]
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ind);
        __Pyx_INCREF(__pyx_slice__105);
        __Pyx_GIVEREF(__pyx_slice__105);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_slice__105);
        __Pyx_INCREF(__pyx_slice__106);
        __Pyx_GIVEREF(__pyx_slice__106);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_slice__106);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Multiply(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":1892
 *         if self._outputWeighting is not None:
 *             for ind in range(self.mainModel.outputCount):
 *                 if not ind:             # <<<<<<<<<<<<<<
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]
 *                 else:
 */
        goto __pyx_L11;
      }

      /* "metaphor/monal/driver/_driver.py":1895
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]
 *                 else:
 *                     res += self._jacobians[ind, :, :] * self._outputWeighting[ind]             # <<<<<<<<<<<<<<
 *             return res
 *         return sum(self._jacobians, axis = 0)
 */
      /*else*/ {
        if (unlikely(!__pyx_v_res)) { __Pyx_RaiseUnboundLocalError("res"); __PYX_ERR(0, 1895, __pyx_L1_error) }
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ind);
        __Pyx_INCREF(__pyx_slice__107);
        __Pyx_GIVEREF(__pyx_slice__107);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_slice__107);
        __Pyx_INCREF(__pyx_slice__108);
        __Pyx_GIVEREF(__pyx_slice__108);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_slice__108);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputWeighting_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_Multiply(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_res, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_4);
        __pyx_t_4 = 0;
      }
      __pyx_L11:;

      /* "metaphor/monal/driver/_driver.py":1891
 * 
 *         if self._outputWeighting is not None:
 *             for ind in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *                 if not ind:
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":1896
 *                 else:
 *                     res += self._jacobians[ind, :, :] * self._outputWeighting[ind]
 *             return res             # <<<<<<<<<<<<<<
 *         return sum(self._jacobians, axis = 0)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_v_res)) { __Pyx_RaiseUnboundLocalError("res"); __PYX_ERR(0, 1896, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_v_res);
    __pyx_r = __pyx_v_res;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1890
 *         self.mainModel.backPropagateCoreMultiOutput(self._jacobians, None, back)
 * 
 *         if self._outputWeighting is not None:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.outputCount):
 *                 if not ind:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1897
 *                     res += self._jacobians[ind, :, :] * self._outputWeighting[ind]
 *             return res
 *         return sum(self._jacobians, axis = 0)             # <<<<<<<<<<<<<<
 * 
 *     def residuals2(self, weights=None, target=None):  # Driver  #, inputs=None, model=None
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1897, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1868
 *         return squeeze(res)
 * 
 *     def residualsPrime(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien normalis du modle.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.residualsPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_back);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1899
 *         return sum(self._jacobians, axis = 0)
 * 
 *     def residuals2(self, weights=None, target=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus du modle.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_143residuals2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_142residuals2[] = "Mise en forme pour les routines d'optimisation.\n        Calcule et retourne les r\303\257\302\277\305\223sidus du mod\303\257\302\277\305\223le.\n        Si le modele est un multimodel parallel, inputs est None, et model est le multimodel.\n        Sinon, inputs est la matrice des entr\303\257\302\277\305\223es propos\303\257\302\277\305\223es sur chaque ligne, et model est le modele.\n        Target est le vecteur des valeurs cibles.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_143residuals2 = {"residuals2", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_143residuals2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_142residuals2};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_143residuals2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("residuals2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_target,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "residuals2") < 0)) __PYX_ERR(0, 1899, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_target = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("residuals2", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1899, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.residuals2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_142residuals2(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_target);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_142residuals2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_target) {
  PyObject *__pyx_v_model = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_res2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("residuals2", 0);
  __Pyx_INCREF(__pyx_v_target);

  /* "metaphor/monal/driver/_driver.py":1906
 *         Target est le vecteur des valeurs cibles.
 *         """
 *         target = squeeze(target)             # <<<<<<<<<<<<<<
 *         model = self.mainModel
 *         model.setWeights(weights)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_target};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_target};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_target);
      __Pyx_GIVEREF(__pyx_v_target);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_target);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1907
 *         """
 *         target = squeeze(target)
 *         model = self.mainModel             # <<<<<<<<<<<<<<
 *         model.setWeights(weights)
 *         if len(target) == len(self._inputArray) :
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1908
 *         target = squeeze(target)
 *         model = self.mainModel
 *         model.setWeights(weights)             # <<<<<<<<<<<<<<
 *         if len(target) == len(self._inputArray) :
 *             res = model(self._inputArray)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_setWeights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_weights);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1909
 *         model = self.mainModel
 *         model.setWeights(weights)
 *         if len(target) == len(self._inputArray) :             # <<<<<<<<<<<<<<
 *             res = model(self._inputArray)
 *         else:
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_target); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1909, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((__pyx_t_5 == __pyx_t_6) != 0);
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":1910
 *         model.setWeights(weights)
 *         if len(target) == len(self._inputArray) :
 *             res = model(self._inputArray)             # <<<<<<<<<<<<<<
 *         else:
 *             res = model()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_model);
    __pyx_t_3 = __pyx_v_model; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1910, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_res = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1909
 *         model = self.mainModel
 *         model.setWeights(weights)
 *         if len(target) == len(self._inputArray) :             # <<<<<<<<<<<<<<
 *             res = model(self._inputArray)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":1912
 *             res = model(self._inputArray)
 *         else:
 *             res = model()             # <<<<<<<<<<<<<<
 *         res = res.astype(npfloat64)
 *         if target is not None:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_model);
    __pyx_t_3 = __pyx_v_model; __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_res = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":1913
 *         else:
 *             res = model()
 *         res = res.astype(npfloat64)             # <<<<<<<<<<<<<<
 *         if target is not None:
 *         #    res -= target.astype(npfloat64)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_npfloat64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1914
 *             res = model()
 *         res = res.astype(npfloat64)
 *         if target is not None:             # <<<<<<<<<<<<<<
 *         #    res -= target.astype(npfloat64)
 *             res2 = res - target
 */
  __pyx_t_7 = (__pyx_v_target != Py_None);
  __pyx_t_9 = (__pyx_t_7 != 0);
  if (__pyx_t_9) {

    /* "metaphor/monal/driver/_driver.py":1916
 *         if target is not None:
 *         #    res -= target.astype(npfloat64)
 *             res2 = res - target             # <<<<<<<<<<<<<<
 *         return res2
 * 
 */
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_res, __pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_res2 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1914
 *             res = model()
 *         res = res.astype(npfloat64)
 *         if target is not None:             # <<<<<<<<<<<<<<
 *         #    res -= target.astype(npfloat64)
 *             res2 = res - target
 */
  }

  /* "metaphor/monal/driver/_driver.py":1917
 *         #    res -= target.astype(npfloat64)
 *             res2 = res - target
 *         return res2             # <<<<<<<<<<<<<<
 * 
 *     def Jacobian2long(self, weights=None):  # Driver  #, inputs=None, model=None
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_res2)) { __Pyx_RaiseUnboundLocalError("res2"); __PYX_ERR(0, 1917, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_v_res2);
  __pyx_r = __pyx_v_res2;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1899
 *         return sum(self._jacobians, axis = 0)
 * 
 *     def residuals2(self, weights=None, target=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus du modle.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.residuals2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_model);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_res2);
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1919
 *         return res2
 * 
 *     def Jacobian2long(self, weights=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les sorties et le jacobien du modle.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_145Jacobian2long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_144Jacobian2long[] = "Mise en forme pour les routines d'optimisation.\n        Calcule et retourne les sorties et le jacobien du mod\303\257\302\277\305\223le.\n        Si le modele est un multimodel parallel, inputs est None, et model est le multimodel.\n        Sinon, inputs est la matrice des entr\303\257\302\277\305\223es propos\303\257\302\277\305\223es sur chaque ligne, et model est le modele.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_145Jacobian2long = {"Jacobian2long", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_145Jacobian2long, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_144Jacobian2long};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_145Jacobian2long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Jacobian2long (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Jacobian2long") < 0)) __PYX_ERR(0, 1919, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Jacobian2long", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1919, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.Jacobian2long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_144Jacobian2long(__pyx_self, __pyx_v_self, __pyx_v_weights);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_144Jacobian2long(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights) {
  PyObject *__pyx_v_model = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  __Pyx_RefNannySetupContext("Jacobian2long", 0);

  /* "metaphor/monal/driver/_driver.py":1925
 *         Sinon, inputs est la matrice des entres proposes sur chaque ligne, et model est le modele.
 *         """
 *         model = self.mainModel             # <<<<<<<<<<<<<<
 *         model.setWeights(weights)
 *         result = model(computelevel=C.ID_DIFF)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1926
 *         """
 *         model = self.mainModel
 *         model.setWeights(weights)             # <<<<<<<<<<<<<<
 *         result = model(computelevel=C.ID_DIFF)
 *         self._outputs, self._jacobians = result[:2]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_setWeights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_weights);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1927
 *         model = self.mainModel
 *         model.setWeights(weights)
 *         result = model(computelevel=C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         self._outputs, self._jacobians = result[:2]
 *         # res[2]: gradInput n'est pas utilise
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_computelevel, __pyx_t_4) < 0) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_model, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1928
 *         model.setWeights(weights)
 *         result = model(computelevel=C.ID_DIFF)
 *         self._outputs, self._jacobians = result[:2]             # <<<<<<<<<<<<<<
 *         # res[2]: gradInput n'est pas utilise
 *         return self._outputs, self._jacobians
 */
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_result, 0, 2, NULL, NULL, &__pyx_slice__109, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1928, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1928, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1928, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outputs_2, __pyx_t_1) < 0) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2, __pyx_t_2) < 0) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":1930
 *         self._outputs, self._jacobians = result[:2]
 *         # res[2]: gradInput n'est pas utilise
 *         return self._outputs, self._jacobians             # <<<<<<<<<<<<<<
 * 
 *     def Jacobian2(self, weights=None, target=None):  # Driver  #, inputs=Nonee, model=None
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputs_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1919
 *         return res2
 * 
 *     def Jacobian2long(self, weights=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les sorties et le jacobien du modle.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.Jacobian2long", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_model);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1932
 *         return self._outputs, self._jacobians
 * 
 *     def Jacobian2(self, weights=None, target=None):  # Driver  #, inputs=Nonee, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien du modle, multipli par les rsidus.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_147Jacobian2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_146Jacobian2[] = "Mise en forme pour les routines d'optimisation.\n        Calcule et retourne le jacobien du mod\303\257\302\277\305\223le, multipli\303\257\302\277\305\223 par les r\303\257\302\277\305\223sidus.\n        Si le modele est un multimodel parallel, inputs est None, et model est le multimodel.\n        Sinon, inputs est la matrice des entr\303\257\302\277\305\223es propos\303\257\302\277\305\223es sur chaque ligne, et model est le modele.\n        Target est le vecteur des valeurs cibles.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_147Jacobian2 = {"Jacobian2", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_147Jacobian2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_146Jacobian2};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_147Jacobian2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Jacobian2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_target,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Jacobian2") < 0)) __PYX_ERR(0, 1932, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_target = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Jacobian2", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1932, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.Jacobian2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_146Jacobian2(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_target);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_146Jacobian2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_target) {
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  __Pyx_RefNannySetupContext("Jacobian2", 0);
  __Pyx_INCREF(__pyx_v_target);

  /* "metaphor/monal/driver/_driver.py":1939
 *         Target est le vecteur des valeurs cibles.
 *         """
 *         target = squeeze(target)             # <<<<<<<<<<<<<<
 *         outputs, jacob = self.Jacobian2long(weights)
 *         residuals = outputs - target
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_target};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_target};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1939, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_target);
      __Pyx_GIVEREF(__pyx_v_target);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_target);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1940
 *         """
 *         target = squeeze(target)
 *         outputs, jacob = self.Jacobian2long(weights)             # <<<<<<<<<<<<<<
 *         residuals = outputs - target
 *         return jacob * residuals[:,newaxis]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Jacobian2long); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1940, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_weights);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1940, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1940, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1940, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_outputs = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_jacob = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1941
 *         target = squeeze(target)
 *         outputs, jacob = self.Jacobian2long(weights)
 *         residuals = outputs - target             # <<<<<<<<<<<<<<
 *         return jacob * residuals[:,newaxis]
 *         #return jacob
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_outputs, __pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_residuals = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1942
 *         outputs, jacob = self.Jacobian2long(weights)
 *         residuals = outputs - target
 *         return jacob * residuals[:,newaxis]             # <<<<<<<<<<<<<<
 *         #return jacob
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_slice__110);
  __Pyx_GIVEREF(__pyx_slice__110);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_slice__110);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_residuals, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_jacob, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1932
 *         return self._outputs, self._jacobians
 * 
 *     def Jacobian2(self, weights=None, target=None):  # Driver  #, inputs=Nonee, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien du modle, multipli par les rsidus.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.Jacobian2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1945
 *         #return jacob
 * 
 *     def cost2(self, weights=None, target=None):  # Driver  #, model=None, inputs=None             # <<<<<<<<<<<<<<
 *         res = self.residuals2(weights, target)
 *         return npsum(res**2)/2
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_149cost2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_149cost2 = {"cost2", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_149cost2, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_149cost2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cost2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_target,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cost2") < 0)) __PYX_ERR(0, 1945, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_target = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cost2", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1945, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.cost2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_148cost2(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_target);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_148cost2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_target) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("cost2", 0);

  /* "metaphor/monal/driver/_driver.py":1946
 * 
 *     def cost2(self, weights=None, target=None):  # Driver  #, model=None, inputs=None
 *         res = self.residuals2(weights, target)             # <<<<<<<<<<<<<<
 *         return npsum(res**2)/2
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_residuals2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_weights, __pyx_v_target};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_weights, __pyx_v_target};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_weights);
    __Pyx_GIVEREF(__pyx_v_weights);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_weights);
    __Pyx_INCREF(__pyx_v_target);
    __Pyx_GIVEREF(__pyx_v_target);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_target);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1947
 *     def cost2(self, weights=None, target=None):  # Driver  #, model=None, inputs=None
 *         res = self.residuals2(weights, target)
 *         return npsum(res**2)/2             # <<<<<<<<<<<<<<
 * 
 *     def prime2(self, weights=None, target=None):  # Driver  #model=None, inputs=None,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Power(__pyx_v_res, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1945
 *         #return jacob
 * 
 *     def cost2(self, weights=None, target=None):  # Driver  #, model=None, inputs=None             # <<<<<<<<<<<<<<
 *         res = self.residuals2(weights, target)
 *         return npsum(res**2)/2
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.cost2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1949
 *         return npsum(res**2)/2
 * 
 *     def prime2(self, weights=None, target=None):  # Driver  #model=None, inputs=None,             # <<<<<<<<<<<<<<
 *         outputs, jacob = self.Jacobian2long(weights)
 *         #residuals = outputs - target
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_151prime2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_151prime2 = {"prime2", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_151prime2, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_151prime2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weights = 0;
  CYTHON_UNUSED PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prime2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_weights,&__pyx_n_s_target,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prime2") < 0)) __PYX_ERR(0, 1949, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_weights = values[1];
    __pyx_v_target = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prime2", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1949, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.prime2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_150prime2(__pyx_self, __pyx_v_self, __pyx_v_weights, __pyx_v_target);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_150prime2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weights, CYTHON_UNUSED PyObject *__pyx_v_target) {
  CYTHON_UNUSED PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  __Pyx_RefNannySetupContext("prime2", 0);

  /* "metaphor/monal/driver/_driver.py":1950
 * 
 *     def prime2(self, weights=None, target=None):  # Driver  #model=None, inputs=None,
 *         outputs, jacob = self.Jacobian2long(weights)             # <<<<<<<<<<<<<<
 *         #residuals = outputs - target
 *         res = npsum(jacob, axis=0)  # * residuals[:,newaxis]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Jacobian2long); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_weights};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_weights);
      __Pyx_GIVEREF(__pyx_v_weights);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_weights);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1950, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1950, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1950, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_outputs = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_jacob = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":1952
 *         outputs, jacob = self.Jacobian2long(weights)
 *         #residuals = outputs - target
 *         res = npsum(jacob, axis=0)  # * residuals[:,newaxis]             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_jacob);
  __Pyx_GIVEREF(__pyx_v_jacob);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_jacob);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1952, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1953
 *         #residuals = outputs - target
 *         res = npsum(jacob, axis=0)  # * residuals[:,newaxis]
 *         return res             # <<<<<<<<<<<<<<
 * 
 * #=========================== fin des interfaces pour optimisation ==============
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1949
 *         return npsum(res**2)/2
 * 
 *     def prime2(self, weights=None, target=None):  # Driver  #model=None, inputs=None,             # <<<<<<<<<<<<<<
 *         outputs, jacob = self.Jacobian2long(weights)
 *         #residuals = outputs - target
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.prime2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1958
 * 
 *     #
 *     def setLeverageComputation(self, level=0.95, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_153setLeverageComputation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_152setLeverageComputation[] = "Calcul de la matrice de dispersion, et des leviers\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_153setLeverageComputation = {"setLeverageComputation", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_153setLeverageComputation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_152setLeverageComputation};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_153setLeverageComputation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_doit = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLeverageComputation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_level,&__pyx_n_s_doit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_float_0_95));
    values[2] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLeverageComputation") < 0)) __PYX_ERR(0, 1958, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_level = values[1];
    __pyx_v_doit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLeverageComputation", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1958, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setLeverageComputation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_152setLeverageComputation(__pyx_self, __pyx_v_self, __pyx_v_level, __pyx_v_doit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_152setLeverageComputation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_level, PyObject *__pyx_v_doit) {
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("setLeverageComputation", 0);

  /* "metaphor/monal/driver/_driver.py":1961
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 *         nd = self.mainModel.dimension             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         if not doit:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nd = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":1962
 *         """
 *         nd = self.mainModel.dimension
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         if not doit:
 *             self._dispersionMatrix = None
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_no = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1963
 *         nd = self.mainModel.dimension
 *         no = self.mainModel.outputCount
 *         if not doit:             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = None
 *             self._conditionning = None
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_doit); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":1964
 *         no = self.mainModel.outputCount
 *         if not doit:
 *             self._dispersionMatrix = None             # <<<<<<<<<<<<<<
 *             self._conditionning = None
 *             return
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, Py_None) < 0) __PYX_ERR(0, 1964, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1965
 *         if not doit:
 *             self._dispersionMatrix = None
 *             self._conditionning = None             # <<<<<<<<<<<<<<
 *             return
 *         self._dispersionMatrix = zeros((no, nd, nd))
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_conditionning, Py_None) < 0) __PYX_ERR(0, 1965, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1966
 *             self._dispersionMatrix = None
 *             self._conditionning = None
 *             return             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = zeros((no, nd, nd))
 *         self._conditionning = zeros((no,))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1963
 *         nd = self.mainModel.dimension
 *         no = self.mainModel.outputCount
 *         if not doit:             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = None
 *             self._conditionning = None
 */
  }

  /* "metaphor/monal/driver/_driver.py":1967
 *             self._conditionning = None
 *             return
 *         self._dispersionMatrix = zeros((no, nd, nd))             # <<<<<<<<<<<<<<
 *         self._conditionning = zeros((no,))
 *         if self._jacobians is not None:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_no);
  __Pyx_GIVEREF(__pyx_v_no);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_no);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_nd);
  __Pyx_INCREF(__pyx_v_nd);
  __Pyx_GIVEREF(__pyx_v_nd);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_nd);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_t_1) < 0) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1968
 *             return
 *         self._dispersionMatrix = zeros((no, nd, nd))
 *         self._conditionning = zeros((no,))             # <<<<<<<<<<<<<<
 *         if self._jacobians is not None:
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_no);
  __Pyx_GIVEREF(__pyx_v_no);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_no);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_conditionning, __pyx_t_1) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1969
 *         self._dispersionMatrix = zeros((no, nd, nd))
 *         self._conditionning = zeros((no,))
 *         if self._jacobians is not None:             # <<<<<<<<<<<<<<
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":1970
 *         self._conditionning = zeros((no,))
 *         if self._jacobians is not None:
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations             # <<<<<<<<<<<<<<
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])
 *             self.confidenceLevel = level
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_no); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1970, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1970, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1970, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1970, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1971
 *         if self._jacobians is not None:
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])             # <<<<<<<<<<<<<<
 *             self.confidenceLevel = level
 *         return
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_InverseMtMdvd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jacobians_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_ind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_ind); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_10};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_10};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10);
        __pyx_t_5 = 0;
        __pyx_t_10 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conditionning); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_ind, __pyx_t_1) < 0)) __PYX_ERR(0, 1971, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":1970
 *         self._conditionning = zeros((no,))
 *         if self._jacobians is not None:
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations             # <<<<<<<<<<<<<<
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])
 *             self.confidenceLevel = level
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":1972
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])
 *             self.confidenceLevel = level             # <<<<<<<<<<<<<<
 *         return
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_confidenceLevel, __pyx_v_level) < 0) __PYX_ERR(0, 1972, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1969
 *         self._dispersionMatrix = zeros((no, nd, nd))
 *         self._conditionning = zeros((no,))
 *         if self._jacobians is not None:             # <<<<<<<<<<<<<<
 *             for ind in range(no): # les matrices de dispersion sont calcules sur les jacobiens, hors normalisations
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])
 */
  }

  /* "metaphor/monal/driver/_driver.py":1973
 *                 self._conditionning[ind] = mtb.InverseMtMdvd(self._jacobians[ind], self._dispersionMatrix[ind])
 *             self.confidenceLevel = level
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def setLeverageComputationOld(self, level=None, doit=True):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1958
 * 
 *     #
 *     def setLeverageComputation(self, level=0.95, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setLeverageComputation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1975
 *         return
 * 
 *     def setLeverageComputationOld(self, level=None, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_155setLeverageComputationOld(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_154setLeverageComputationOld[] = "Calcul de la matrice de dispersion, et des leviers\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_155setLeverageComputationOld = {"setLeverageComputationOld", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_155setLeverageComputationOld, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_154setLeverageComputationOld};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_155setLeverageComputationOld(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_doit = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLeverageComputationOld (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_level,&__pyx_n_s_doit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLeverageComputationOld") < 0)) __PYX_ERR(0, 1975, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_level = values[1];
    __pyx_v_doit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLeverageComputationOld", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1975, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setLeverageComputationOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_154setLeverageComputationOld(__pyx_self, __pyx_v_self, __pyx_v_level, __pyx_v_doit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_154setLeverageComputationOld(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_level, PyObject *__pyx_v_doit) {
  PyObject *__pyx_v_outproc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("setLeverageComputationOld", 0);

  /* "metaphor/monal/driver/_driver.py":1978
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 *         if not doit:             # <<<<<<<<<<<<<<
 *             if not self._outProcList is None:
 *                 for outproc in self.outProcList:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_doit); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1979
 *         """
 *         if not doit:
 *             if not self._outProcList is None:             # <<<<<<<<<<<<<<
 *                 for outproc in self.outProcList:
 *                     outproc._dispersionMatrix = None
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outProcList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":1980
 *         if not doit:
 *             if not self._outProcList is None:
 *                 for outproc in self.outProcList:             # <<<<<<<<<<<<<<
 *                     outproc._dispersionMatrix = None
 *             return
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outProcList_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1980, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1980, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_6)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1980, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1980, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1980, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1980, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_6(__pyx_t_4);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1980, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_outproc, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/monal/driver/_driver.py":1981
 *             if not self._outProcList is None:
 *                 for outproc in self.outProcList:
 *                     outproc._dispersionMatrix = None             # <<<<<<<<<<<<<<
 *             return
 *         for outproc in self.outProcList:
 */
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_outproc, __pyx_n_s_dispersionMatrix, Py_None) < 0) __PYX_ERR(0, 1981, __pyx_L1_error)

        /* "metaphor/monal/driver/_driver.py":1980
 *         if not doit:
 *             if not self._outProcList is None:
 *                 for outproc in self.outProcList:             # <<<<<<<<<<<<<<
 *                     outproc._dispersionMatrix = None
 *             return
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":1979
 *         """
 *         if not doit:
 *             if not self._outProcList is None:             # <<<<<<<<<<<<<<
 *                 for outproc in self.outProcList:
 *                     outproc._dispersionMatrix = None
 */
    }

    /* "metaphor/monal/driver/_driver.py":1982
 *                 for outproc in self.outProcList:
 *                     outproc._dispersionMatrix = None
 *             return             # <<<<<<<<<<<<<<
 *         for outproc in self.outProcList:
 *             outproc.getDispersionMatrixFromJacobian()  #Cette opration met  jour les leviers
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":1978
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 *         if not doit:             # <<<<<<<<<<<<<<
 *             if not self._outProcList is None:
 *                 for outproc in self.outProcList:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1983
 *                     outproc._dispersionMatrix = None
 *             return
 *         for outproc in self.outProcList:             # <<<<<<<<<<<<<<
 *             outproc.getDispersionMatrixFromJacobian()  #Cette opration met  jour les leviers
 *             outproc.ConfidenceLevel = level
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outProcList_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1983, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1983, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1983, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1983, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_outproc, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1984
 *             return
 *         for outproc in self.outProcList:
 *             outproc.getDispersionMatrixFromJacobian()  #Cette opration met  jour les leviers             # <<<<<<<<<<<<<<
 *             outproc.ConfidenceLevel = level
 *         return
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_outproc, __pyx_n_s_getDispersionMatrixFromJacobian); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_8) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":1985
 *         for outproc in self.outProcList:
 *             outproc.getDispersionMatrixFromJacobian()  #Cette opration met  jour les leviers
 *             outproc.ConfidenceLevel = level             # <<<<<<<<<<<<<<
 *         return
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_outproc, __pyx_n_s_ConfidenceLevel, __pyx_v_level) < 0) __PYX_ERR(0, 1985, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":1983
 *                     outproc._dispersionMatrix = None
 *             return
 *         for outproc in self.outProcList:             # <<<<<<<<<<<<<<
 *             outproc.getDispersionMatrixFromJacobian()  #Cette opration met  jour les leviers
 *             outproc.ConfidenceLevel = level
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":1986
 *             outproc.getDispersionMatrixFromJacobian()  #Cette opration met  jour les leviers
 *             outproc.ConfidenceLevel = level
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def isParallel(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1975
 *         return
 * 
 *     def setLeverageComputationOld(self, level=None, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.setLeverageComputationOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outproc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1988
 *         return
 * 
 *     def isParallel(self):  # Driver             # <<<<<<<<<<<<<<
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_157isParallel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_157isParallel = {"isParallel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_157isParallel, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_157isParallel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isParallel (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_156isParallel(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_156isParallel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("isParallel", 0);

  /* "metaphor/monal/driver/_driver.py":1989
 * 
 *     def isParallel(self):  # Driver
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel             # <<<<<<<<<<<<<<
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Multimodel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_IsInstance(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isParallel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1988
 *         return
 * 
 *     def isParallel(self):  # Driver             # <<<<<<<<<<<<<<
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.isParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1991
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,             # <<<<<<<<<<<<<<
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "metaphor/monal/driver/_driver.py":1992
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if maxiter <= 0:
 *             maxiter = 100*(1 + self.mainModel.dimension)
 */
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_int_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_1));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_int_1));
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_int_0));
  __Pyx_INCREF(((PyObject*)__pyx_n_u_LM));
  __Pyx_GIVEREF(((PyObject*)__pyx_n_u_LM));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject*)__pyx_n_u_LM));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)__pyx_int_neg_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_neg_1));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_int_neg_1));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_criterion);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_criterion);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_criterion);

  /* "metaphor/monal/driver/_driver.py":1991
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,             # <<<<<<<<<<<<<<
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_159multitrain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_159multitrain = {"multitrain", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_159multitrain, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_159multitrain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_initcount = 0;
  PyObject *__pyx_v_maxiter = 0;
  PyObject *__pyx_v_algo = 0;
  PyObject *__pyx_v_initweights = 0;
  PyObject *__pyx_v_seed = 0;
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_criterion = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("multitrain (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_initcount,&__pyx_n_s_maxiter,&__pyx_n_s_algo,&__pyx_n_s_initweights,&__pyx_n_s_seed,&__pyx_n_s_callback_2,&__pyx_n_s_criterion,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    __pyx_defaults7 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self);
    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_u_LM));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    values[7] = __pyx_dynamic_args->__pyx_arg_criterion;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initcount);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxiter);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_algo);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initweights);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seed);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback_2);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_criterion);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "multitrain") < 0)) __PYX_ERR(0, 1991, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_initcount = values[1];
    __pyx_v_maxiter = values[2];
    __pyx_v_algo = values[3];
    __pyx_v_initweights = values[4];
    __pyx_v_seed = values[5];
    __pyx_v_callback = values[6];
    __pyx_v_criterion = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("multitrain", 0, 1, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1991, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.multitrain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_158multitrain(__pyx_self, __pyx_v_self, __pyx_v_initcount, __pyx_v_maxiter, __pyx_v_algo, __pyx_v_initweights, __pyx_v_seed, __pyx_v_callback, __pyx_v_criterion, __pyx_v_kwds);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2040
 *             if callback:
 *                 callback(ind, N)
 *         bests.sort(key=lambda x:x[1])             # <<<<<<<<<<<<<<
 *         if best == -1:
 *             best = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_10multitrain_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_10multitrain_lambda = {"lambda", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_10multitrain_lambda, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_10multitrain_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.multitrain.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":1991
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,             # <<<<<<<<<<<<<<
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_158multitrain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_initcount, PyObject *__pyx_v_maxiter, PyObject *__pyx_v_algo, PyObject *__pyx_v_initweights, PyObject *__pyx_v_seed, PyObject *__pyx_v_callback, PyObject *__pyx_v_criterion, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_best = NULL;
  PyObject *__pyx_v_mem = NULL;
  PyObject *__pyx_v_bests = NULL;
  PyObject *__pyx_v_memw = NULL;
  PyObject *__pyx_v_memdisp = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_startw = NULL;
  PyObject *__pyx_v_cur = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_fopt = NULL;
  PyObject *__pyx_v_resvec = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  __Pyx_RefNannySetupContext("multitrain", 0);
  __Pyx_INCREF(__pyx_v_maxiter);

  /* "metaphor/monal/driver/_driver.py":1993
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:             # <<<<<<<<<<<<<<
 *             maxiter = 100*(1 + self.mainModel.dimension)
 *         if self.mainModel.isLinear:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_maxiter, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1994
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 *             maxiter = 100*(1 + self.mainModel.dimension)             # <<<<<<<<<<<<<<
 *         if self.mainModel.isLinear:
 *             print("Current model is linear.")
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimension); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_t_3, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_int_100, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_maxiter, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":1993
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:             # <<<<<<<<<<<<<<
 *             maxiter = 100*(1 + self.mainModel.dimension)
 *         if self.mainModel.isLinear:
 */
  }

  /* "metaphor/monal/driver/_driver.py":1995
 *         if maxiter <= 0:
 *             maxiter = 100*(1 + self.mainModel.dimension)
 *         if self.mainModel.isLinear:             # <<<<<<<<<<<<<<
 *             print("Current model is linear.")
 *         self.setRandSeed(seed)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isLinear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":1996
 *             maxiter = 100*(1 + self.mainModel.dimension)
 *         if self.mainModel.isLinear:
 *             print("Current model is linear.")             # <<<<<<<<<<<<<<
 *         self.setRandSeed(seed)
 *         best = -1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":1995
 *         if maxiter <= 0:
 *             maxiter = 100*(1 + self.mainModel.dimension)
 *         if self.mainModel.isLinear:             # <<<<<<<<<<<<<<
 *             print("Current model is linear.")
 *         self.setRandSeed(seed)
 */
  }

  /* "metaphor/monal/driver/_driver.py":1997
 *         if self.mainModel.isLinear:
 *             print("Current model is linear.")
 *         self.setRandSeed(seed)             # <<<<<<<<<<<<<<
 *         best = -1
 *         mem = -1e308
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setRandSeed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_seed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_seed};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_seed};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_seed);
      __Pyx_GIVEREF(__pyx_v_seed);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_seed);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":1998
 *             print("Current model is linear.")
 *         self.setRandSeed(seed)
 *         best = -1             # <<<<<<<<<<<<<<
 *         mem = -1e308
 *         bests = []
 */
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_v_best = __pyx_int_neg_1;

  /* "metaphor/monal/driver/_driver.py":1999
 *         self.setRandSeed(seed)
 *         best = -1
 *         mem = -1e308             # <<<<<<<<<<<<<<
 *         bests = []
 *         memw = []
 */
  __Pyx_INCREF(__pyx_float_neg_1e308);
  __pyx_v_mem = __pyx_float_neg_1e308;

  /* "metaphor/monal/driver/_driver.py":2000
 *         best = -1
 *         mem = -1e308
 *         bests = []             # <<<<<<<<<<<<<<
 *         memw = []
 *         memdisp = []
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bests = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2001
 *         mem = -1e308
 *         bests = []
 *         memw = []             # <<<<<<<<<<<<<<
 *         memdisp = []
 *         if initweights:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_memw = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2002
 *         bests = []
 *         memw = []
 *         memdisp = []             # <<<<<<<<<<<<<<
 *         if initweights:
 *             self.loadParameters(initweights)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_memdisp = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2003
 *         memw = []
 *         memdisp = []
 *         if initweights:             # <<<<<<<<<<<<<<
 *             self.loadParameters(initweights)
 *         try:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_initweights); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2003, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2004
 *         memdisp = []
 *         if initweights:
 *             self.loadParameters(initweights)             # <<<<<<<<<<<<<<
 *         try:
 *             self.curWeights = self.mainModel.weights.copy()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loadParameters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_initweights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_initweights};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_initweights};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_initweights);
        __Pyx_GIVEREF(__pyx_v_initweights);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_initweights);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2003
 *         memw = []
 *         memdisp = []
 *         if initweights:             # <<<<<<<<<<<<<<
 *             self.loadParameters(initweights)
 *         try:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2005
 *         if initweights:
 *             self.loadParameters(initweights)
 *         try:             # <<<<<<<<<<<<<<
 *             self.curWeights = self.mainModel.weights.copy()
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":2006
 *             self.loadParameters(initweights)
 *         try:
 *             self.curWeights = self.mainModel.weights.copy()             # <<<<<<<<<<<<<<
 *         except:
 *             self.curWeights = self.mainModel._weights.copy()
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2006, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_weights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2006, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2006, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2006, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2006, __pyx_L6_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curWeights, __pyx_t_1) < 0) __PYX_ERR(0, 2006, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2005
 *         if initweights:
 *             self.loadParameters(initweights)
 *         try:             # <<<<<<<<<<<<<<
 *             self.curWeights = self.mainModel.weights.copy()
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2007
 *         try:
 *             self.curWeights = self.mainModel.weights.copy()
 *         except:             # <<<<<<<<<<<<<<
 *             self.curWeights = self.mainModel._weights.copy()
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.multitrain", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 2007, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);

      /* "metaphor/monal/driver/_driver.py":2008
 *             self.curWeights = self.mainModel.weights.copy()
 *         except:
 *             self.curWeights = self.mainModel._weights.copy()             # <<<<<<<<<<<<<<
 * 
 *         self._trainingResults = zeros((initcount, 18))
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2008, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_weights_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2008, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2008, __pyx_L8_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (__pyx_t_10) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2008, __pyx_L8_except_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2008, __pyx_L8_except_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curWeights, __pyx_t_5) < 0) __PYX_ERR(0, 2008, __pyx_L8_except_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L7_exception_handled;
    }
    __pyx_L8_except_error:;

    /* "metaphor/monal/driver/_driver.py":2005
 *         if initweights:
 *             self.loadParameters(initweights)
 *         try:             # <<<<<<<<<<<<<<
 *             self.curWeights = self.mainModel.weights.copy()
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L11_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":2010
 *             self.curWeights = self.mainModel._weights.copy()
 * 
 *         self._trainingResults = zeros((initcount, 18))             # <<<<<<<<<<<<<<
 *         for ind in range(initcount):
 *             if ind:
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_initcount);
  __Pyx_GIVEREF(__pyx_v_initcount);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_initcount);
  __Pyx_INCREF(__pyx_int_18);
  __Pyx_GIVEREF(__pyx_int_18);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2010, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2010, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2010, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_trainingResults, __pyx_t_4) < 0) __PYX_ERR(0, 2010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2011
 * 
 *         self._trainingResults = zeros((initcount, 18))
 *         for ind in range(initcount):             # <<<<<<<<<<<<<<
 *             if ind:
 *                 dim = len(self.curWeights)
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_initcount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
    __pyx_t_12 = NULL;
  } else {
    __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2011, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_12)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2011, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2011, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_12(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2011, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2012
 *         self._trainingResults = zeros((initcount, 18))
 *         for ind in range(initcount):
 *             if ind:             # <<<<<<<<<<<<<<
 *                 dim = len(self.curWeights)
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ind); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2012, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":2013
 *         for ind in range(initcount):
 *             if ind:
 *                 dim = len(self.curWeights)             # <<<<<<<<<<<<<<
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev
 *                 for i in self.mainModel.biasBaseId:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_curWeights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2013, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2014
 *             if ind:
 *                 dim = len(self.curWeights)
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev             # <<<<<<<<<<<<<<
 *                 for i in self.mainModel.biasBaseId:
 *                     self.curWeights[i] = 0.0
 */
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_rnd); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_randn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_9) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_dim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_dim};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_dim};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL;
          __Pyx_INCREF(__pyx_v_dim);
          __Pyx_GIVEREF(__pyx_v_dim);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_dim);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_float_0_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curWeights, __pyx_t_1) < 0) __PYX_ERR(0, 2014, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2015
 *                 dim = len(self.curWeights)
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev
 *                 for i in self.mainModel.biasBaseId:             # <<<<<<<<<<<<<<
 *                     self.curWeights[i] = 0.0
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_biasBaseId); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2015, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_14)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2015, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2015, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2015, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2015, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_14(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2015, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2016
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev
 *                 for i in self.mainModel.biasBaseId:
 *                     self.curWeights[i] = 0.0             # <<<<<<<<<<<<<<
 * 
 *             startw = asarray(self.weights.copy())
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_curWeights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_i, __pyx_float_0_0) < 0)) __PYX_ERR(0, 2016, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2015
 *                 dim = len(self.curWeights)
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev
 *                 for i in self.mainModel.biasBaseId:             # <<<<<<<<<<<<<<
 *                     self.curWeights[i] = 0.0
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2012
 *         self._trainingResults = zeros((initcount, 18))
 *         for ind in range(initcount):
 *             if ind:             # <<<<<<<<<<<<<<
 *                 dim = len(self.curWeights)
 *                 self.curWeights = rnd.randn(dim)*0.3  #stddev
 */
    }

    /* "metaphor/monal/driver/_driver.py":2018
 *                     self.curWeights[i] = 0.0
 * 
 *             startw = asarray(self.weights.copy())             # <<<<<<<<<<<<<<
 *             cur, N, fopt = self.train(self.curWeights, maxiter, algo, callback=callback)  # fopt
 *             fopt = fopt
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_copy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2018, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2018, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2018, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_startw, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2019
 * 
 *             startw = asarray(self.weights.copy())
 *             cur, N, fopt = self.train(self.curWeights, maxiter, algo, callback=callback)  # fopt             # <<<<<<<<<<<<<<
 *             fopt = fopt
 * #             if C.USE_INTEGRATED_LEVERAGE:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_train); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_curWeights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_maxiter);
    __Pyx_GIVEREF(__pyx_v_maxiter);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_maxiter);
    __Pyx_INCREF(__pyx_v_algo);
    __Pyx_GIVEREF(__pyx_v_algo);
    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_algo);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2019, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2019, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_15 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_15(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_9 = __pyx_t_15(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      index = 2; __pyx_t_1 = __pyx_t_15(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_10), 3) < 0) __PYX_ERR(0, 2019, __pyx_L1_error)
      __pyx_t_15 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L20_unpacking_done;
      __pyx_L19_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_15 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2019, __pyx_L1_error)
      __pyx_L20_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_cur, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_N, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_fopt, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2020
 *             startw = asarray(self.weights.copy())
 *             cur, N, fopt = self.train(self.curWeights, maxiter, algo, callback=callback)  # fopt
 *             fopt = fopt             # <<<<<<<<<<<<<<
 * #             if C.USE_INTEGRATED_LEVERAGE:
 * #                 resvec = self.computeTrainingResultsIntegrated(self._trainingResults[ind])
 */
    __Pyx_INCREF(__pyx_v_fopt);
    __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_v_fopt);

    /* "metaphor/monal/driver/_driver.py":2024
 * #                 resvec = self.computeTrainingResultsIntegrated(self._trainingResults[ind])
 * #             else:
 *             resvec = self.computeTrainingResultsOld(self._trainingResults[ind])             # <<<<<<<<<<<<<<
 *             if (0 <= criterion <= C.TCR_HIDDEN) and not criterion in C.TCR_DONT_CARE:  #
 *                 memw.append(cur.copy())
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_computeTrainingResultsOld); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trainingResults); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2024, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2024, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2024, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2024, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2024, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_resvec, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2025
 * #             else:
 *             resvec = self.computeTrainingResultsOld(self._trainingResults[ind])
 *             if (0 <= criterion <= C.TCR_HIDDEN) and not criterion in C.TCR_DONT_CARE:  #             # <<<<<<<<<<<<<<
 *                 memw.append(cur.copy())
 *                 memdisp.append(self._dispersionMatrix.copy())
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_int_0, __pyx_v_criterion, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_5)) {
      __Pyx_DECREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2025, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_HIDDEN); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2025, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_criterion, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 2025, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_16) {
    } else {
      __pyx_t_2 = __pyx_t_16;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TCR_DONT_CARE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_16 = (__Pyx_PySequence_ContainsTF(__pyx_v_criterion, __pyx_t_10, Py_NE)); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 2025, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_17 = (__pyx_t_16 != 0);
    __pyx_t_2 = __pyx_t_17;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":2026
 *             resvec = self.computeTrainingResultsOld(self._trainingResults[ind])
 *             if (0 <= criterion <= C.TCR_HIDDEN) and not criterion in C.TCR_DONT_CARE:  #
 *                 memw.append(cur.copy())             # <<<<<<<<<<<<<<
 *                 memdisp.append(self._dispersionMatrix.copy())
 *                 res = resvec[criterion]
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cur, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_1) {
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2026, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2026, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_memw, __pyx_t_10); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 2026, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":2027
 *             if (0 <= criterion <= C.TCR_HIDDEN) and not criterion in C.TCR_DONT_CARE:  #
 *                 memw.append(cur.copy())
 *                 memdisp.append(self._dispersionMatrix.copy())             # <<<<<<<<<<<<<<
 *                 res = resvec[criterion]
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2027, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2027, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_memdisp, __pyx_t_10); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 2027, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":2028
 *                 memw.append(cur.copy())
 *                 memdisp.append(self._dispersionMatrix.copy())
 *                 res = resvec[criterion]             # <<<<<<<<<<<<<<
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):
 *                     if criterion in C.TCR_MINIMIZE:
 */
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_resvec, __pyx_v_criterion); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":2029
 *                 memdisp.append(self._dispersionMatrix.copy())
 *                 res = resvec[criterion]
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):             # <<<<<<<<<<<<<<
 *                     if criterion in C.TCR_MINIMIZE:
 *                         res = -res
 */
      __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 2029, __pyx_L1_error)
      if (!__pyx_t_17) {
      } else {
        __pyx_t_2 = __pyx_t_17;
        goto __pyx_L25_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_TCR_ZEROINCLUDED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_17 = (__Pyx_PySequence_ContainsTF(__pyx_v_criterion, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 2029, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_16 = (__pyx_t_17 != 0);
      __pyx_t_2 = __pyx_t_16;
      __pyx_L25_bool_binop_done:;
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":2030
 *                 res = resvec[criterion]
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):
 *                     if criterion in C.TCR_MINIMIZE:             # <<<<<<<<<<<<<<
 *                         res = -res
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TCR_MINIMIZE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_criterion, __pyx_t_10, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_16 = (__pyx_t_2 != 0);
        if (__pyx_t_16) {

          /* "metaphor/monal/driver/_driver.py":2031
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):
 *                     if criterion in C.TCR_MINIMIZE:
 *                         res = -res             # <<<<<<<<<<<<<<
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *                     if res > mem:
 */
          __pyx_t_10 = PyNumber_Negative(__pyx_v_res); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2031, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_10);
          __pyx_t_10 = 0;

          /* "metaphor/monal/driver/_driver.py":2030
 *                 res = resvec[criterion]
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):
 *                     if criterion in C.TCR_MINIMIZE:             # <<<<<<<<<<<<<<
 *                         res = -res
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 */
        }

        /* "metaphor/monal/driver/_driver.py":2032
 *                     if criterion in C.TCR_MINIMIZE:
 *                         res = -res
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))             # <<<<<<<<<<<<<<
 *                     if res > mem:
 *                         mem = res
 */
        __pyx_t_10 = PyNumber_Negative(__pyx_v_res); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_startw, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2032, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2032, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cur, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (__pyx_t_9) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2032, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2032, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_copy); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_19);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_19, function);
          }
        }
        if (__pyx_t_9) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2032, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2032, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __pyx_t_19 = PyTuple_New(5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_ind);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_4);
        __pyx_t_10 = 0;
        __pyx_t_1 = 0;
        __pyx_t_5 = 0;
        __pyx_t_4 = 0;
        __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_bests, __pyx_t_19); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 2032, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

        /* "metaphor/monal/driver/_driver.py":2033
 *                         res = -res
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *                     if res > mem:             # <<<<<<<<<<<<<<
 *                         mem = res
 *                         best = ind
 */
        __pyx_t_19 = PyObject_RichCompare(__pyx_v_res, __pyx_v_mem, Py_GT); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2033, __pyx_L1_error)
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 2033, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        if (__pyx_t_16) {

          /* "metaphor/monal/driver/_driver.py":2034
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *                     if res > mem:
 *                         mem = res             # <<<<<<<<<<<<<<
 *                         best = ind
 *                 else:
 */
          __Pyx_INCREF(__pyx_v_res);
          __Pyx_DECREF_SET(__pyx_v_mem, __pyx_v_res);

          /* "metaphor/monal/driver/_driver.py":2035
 *                     if res > mem:
 *                         mem = res
 *                         best = ind             # <<<<<<<<<<<<<<
 *                 else:
 *                     bests.append((ind, 0, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 */
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_DECREF_SET(__pyx_v_best, __pyx_v_ind);

          /* "metaphor/monal/driver/_driver.py":2033
 *                         res = -res
 *                     bests.append((ind, -res, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *                     if res > mem:             # <<<<<<<<<<<<<<
 *                         mem = res
 *                         best = ind
 */
        }

        /* "metaphor/monal/driver/_driver.py":2029
 *                 memdisp.append(self._dispersionMatrix.copy())
 *                 res = resvec[criterion]
 *                 if res or (criterion in C.TCR_ZEROINCLUDED):             # <<<<<<<<<<<<<<
 *                     if criterion in C.TCR_MINIMIZE:
 *                         res = -res
 */
        goto __pyx_L24;
      }

      /* "metaphor/monal/driver/_driver.py":2037
 *                         best = ind
 *                 else:
 *                     bests.append((ind, 0, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))             # <<<<<<<<<<<<<<
 *             if callback:
 *                 callback(ind, N)
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_startw, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (__pyx_t_5) {
          __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2037, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          __pyx_t_19 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2037, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cur, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_ind);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_5);
        __pyx_t_19 = 0;
        __pyx_t_4 = 0;
        __pyx_t_5 = 0;
        __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_bests, __pyx_t_10); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_L24:;

      /* "metaphor/monal/driver/_driver.py":2025
 * #             else:
 *             resvec = self.computeTrainingResultsOld(self._trainingResults[ind])
 *             if (0 <= criterion <= C.TCR_HIDDEN) and not criterion in C.TCR_DONT_CARE:  #             # <<<<<<<<<<<<<<
 *                 memw.append(cur.copy())
 *                 memdisp.append(self._dispersionMatrix.copy())
 */
    }

    /* "metaphor/monal/driver/_driver.py":2038
 *                 else:
 *                     bests.append((ind, 0, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *             if callback:             # <<<<<<<<<<<<<<
 *                 callback(ind, N)
 *         bests.sort(key=lambda x:x[1])
 */
    __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 2038, __pyx_L1_error)
    if (__pyx_t_16) {

      /* "metaphor/monal/driver/_driver.py":2039
 *                     bests.append((ind, 0, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *             if callback:
 *                 callback(ind, N)             # <<<<<<<<<<<<<<
 *         bests.sort(key=lambda x:x[1])
 *         if best == -1:
 */
      __Pyx_INCREF(__pyx_v_callback);
      __pyx_t_5 = __pyx_v_callback; __pyx_t_4 = NULL;
      __pyx_t_20 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_20 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_ind, __pyx_v_N};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2039, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_ind, __pyx_v_N};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2039, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      {
        __pyx_t_19 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2039, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_20, __pyx_v_ind);
        __Pyx_INCREF(__pyx_v_N);
        __Pyx_GIVEREF(__pyx_v_N);
        PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_20, __pyx_v_N);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_19, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2039, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":2038
 *                 else:
 *                     bests.append((ind, 0, startw.copy(), cur.copy(), self._dispersionMatrix.copy()))
 *             if callback:             # <<<<<<<<<<<<<<
 *                 callback(ind, N)
 *         bests.sort(key=lambda x:x[1])
 */
    }

    /* "metaphor/monal/driver/_driver.py":2011
 * 
 *         self._trainingResults = zeros((initcount, 18))
 *         for ind in range(initcount):             # <<<<<<<<<<<<<<
 *             if ind:
 *                 dim = len(self.curWeights)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":2040
 *             if callback:
 *                 callback(ind, N)
 *         bests.sort(key=lambda x:x[1])             # <<<<<<<<<<<<<<
 *         if best == -1:
 *             best = 0
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_bests, __pyx_n_s_sort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_10multitrain_lambda, 0, __pyx_n_s_Driver_multitrain_locals_lambda, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2041
 *                 callback(ind, N)
 *         bests.sort(key=lambda x:x[1])
 *         if best == -1:             # <<<<<<<<<<<<<<
 *             best = 0
 *         else:
 */
  __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_best, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_16) {

    /* "metaphor/monal/driver/_driver.py":2042
 *         bests.sort(key=lambda x:x[1])
 *         if best == -1:
 *             best = 0             # <<<<<<<<<<<<<<
 *         else:
 *             best = bests[0][0]
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_best, __pyx_int_0);

    /* "metaphor/monal/driver/_driver.py":2041
 *                 callback(ind, N)
 *         bests.sort(key=lambda x:x[1])
 *         if best == -1:             # <<<<<<<<<<<<<<
 *             best = 0
 *         else:
 */
    goto __pyx_L30;
  }

  /* "metaphor/monal/driver/_driver.py":2044
 *             best = 0
 *         else:
 *             best = bests[0][0]             # <<<<<<<<<<<<<<
 *         if 0 <= best < initcount:
 *             # a la fin des multi train, si on a trouve un meilleur train, on recharge les poids
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_bests, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_best, __pyx_t_10);
    __pyx_t_10 = 0;
  }
  __pyx_L30:;

  /* "metaphor/monal/driver/_driver.py":2045
 *         else:
 *             best = bests[0][0]
 *         if 0 <= best < initcount:             # <<<<<<<<<<<<<<
 *             # a la fin des multi train, si on a trouve un meilleur train, on recharge les poids
 *             self.mainModel.setWeights(bests[0][3])
 */
  __pyx_t_10 = PyObject_RichCompare(__pyx_int_0, __pyx_v_best, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2045, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_10)) {
    __Pyx_DECREF(__pyx_t_10);
    __pyx_t_10 = PyObject_RichCompare(__pyx_v_best, __pyx_v_initcount, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2045, __pyx_L1_error)
  }
  __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_16) {

    /* "metaphor/monal/driver/_driver.py":2047
 *         if 0 <= best < initcount:
 *             # a la fin des multi train, si on a trouve un meilleur train, on recharge les poids
 *             self.mainModel.setWeights(bests[0][3])             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = bests[0][4]
 *         return bests
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_bests, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_5, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_19); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_19};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2047, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_19};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2047, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_19);
        __pyx_t_19 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "metaphor/monal/driver/_driver.py":2048
 *             # a la fin des multi train, si on a trouve un meilleur train, on recharge les poids
 *             self.mainModel.setWeights(bests[0][3])
 *             self._dispersionMatrix = bests[0][4]             # <<<<<<<<<<<<<<
 *         return bests
 * 
 */
    __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_bests, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_10, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_t_3) < 0) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2045
 *         else:
 *             best = bests[0][0]
 *         if 0 <= best < initcount:             # <<<<<<<<<<<<<<
 *             # a la fin des multi train, si on a trouve un meilleur train, on recharge les poids
 *             self.mainModel.setWeights(bests[0][3])
 */
  }

  /* "metaphor/monal/driver/_driver.py":2049
 *             self.mainModel.setWeights(bests[0][3])
 *             self._dispersionMatrix = bests[0][4]
 *         return bests             # <<<<<<<<<<<<<<
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_bests);
  __pyx_r = __pyx_v_bests;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":1991
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,             # <<<<<<<<<<<<<<
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.multitrain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_best);
  __Pyx_XDECREF(__pyx_v_mem);
  __Pyx_XDECREF(__pyx_v_bests);
  __Pyx_XDECREF(__pyx_v_memw);
  __Pyx_XDECREF(__pyx_v_memdisp);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_startw);
  __Pyx_XDECREF(__pyx_v_cur);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_fopt);
  __Pyx_XDECREF(__pyx_v_resvec);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_maxiter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2051
 *         return bests
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,             # <<<<<<<<<<<<<<
 *             callback=None, **kwds):  # Driver
 *         """Lancement d'un apprentissage.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_161train(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_160train[] = "Lancement d'un apprentissage.\n        Utilise les algorithmes d'optimisation de sciPy ou de Netral\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_161train = {"train", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_161train, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_160train};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_161train(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_startWeights = 0;
  PyObject *__pyx_v_maxiter = 0;
  PyObject *__pyx_v_algo = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_callback = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("train (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_startWeights,&__pyx_n_s_maxiter,&__pyx_n_s_algo,&__pyx_n_s_verbose,&__pyx_n_s_callback_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_100));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_u_LM_NT));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "metaphor/monal/driver/_driver.py":2052
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,
 *             callback=None, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         """Lancement d'un apprentissage.
 *         Utilise les algorithmes d'optimisation de sciPy ou de Netral
 */
    values[5] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startWeights);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxiter);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_algo);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback_2);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "train") < 0)) __PYX_ERR(0, 2051, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_startWeights = values[1];
    __pyx_v_maxiter = values[2];
    __pyx_v_algo = values[3];
    __pyx_v_verbose = values[4];
    __pyx_v_callback = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("train", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2051, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_160train(__pyx_self, __pyx_v_self, __pyx_v_startWeights, __pyx_v_maxiter, __pyx_v_algo, __pyx_v_verbose, __pyx_v_callback, __pyx_v_kwds);

  /* "metaphor/monal/driver/_driver.py":2051
 *         return bests
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,             # <<<<<<<<<<<<<<
 *             callback=None, **kwds):  # Driver
 *         """Lancement d'un apprentissage.
 */

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_160train(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_startWeights, PyObject *__pyx_v_maxiter, PyObject *__pyx_v_algo, PyObject *__pyx_v_verbose, PyObject *__pyx_v_callback, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_style = NULL;
  PyObject *__pyx_v_optimize = NULL;
  int __pyx_v_OKScipy;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_fcost = NULL;
  PyObject *__pyx_v_prime = NULL;
  PyObject *__pyx_v_residuals = NULL;
  PyObject *__pyx_v_vecPrime = NULL;
  PyObject *__pyx_v_mess = NULL;
  PyObject *__pyx_v_targets = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_fopt = NULL;
  PyObject *__pyx_v_popt = NULL;
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_res = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_Nf = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_Ng = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_cov = NULL;
  PyObject *__pyx_v_infodict = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_mesg = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_ier = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_warnflag = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_gopt = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_Bopt = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_funcalls = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_allvecs = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_dat = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *(*__pyx_t_16)(PyObject *);
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  __Pyx_RefNannySetupContext("train", 0);
  __Pyx_INCREF(__pyx_v_startWeights);

  /* "metaphor/monal/driver/_driver.py":2056
 *         Utilise les algorithmes d'optimisation de sciPy ou de Netral
 *         """
 *         style = algo             # <<<<<<<<<<<<<<
 *         if startWeights is None:
 *             startWeights = asarray(self.weights.copy())
 */
  __Pyx_INCREF(__pyx_v_algo);
  __pyx_v_style = __pyx_v_algo;

  /* "metaphor/monal/driver/_driver.py":2057
 *         """
 *         style = algo
 *         if startWeights is None:             # <<<<<<<<<<<<<<
 *             startWeights = asarray(self.weights.copy())
 *         else:
 */
  __pyx_t_1 = (__pyx_v_startWeights == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2058
 *         style = algo
 *         if startWeights is None:
 *             startWeights = asarray(self.weights.copy())             # <<<<<<<<<<<<<<
 *         else:
 *             startWeights = asarray(startWeights)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2058, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2058, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2058, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_startWeights, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2057
 *         """
 *         style = algo
 *         if startWeights is None:             # <<<<<<<<<<<<<<
 *             startWeights = asarray(self.weights.copy())
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":2060
 *             startWeights = asarray(self.weights.copy())
 *         else:
 *             startWeights = asarray(startWeights)             # <<<<<<<<<<<<<<
 *         try:
 *             from scipy import optimize
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_startWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_startWeights};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_startWeights};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_startWeights);
        __Pyx_GIVEREF(__pyx_v_startWeights);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_startWeights);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_startWeights, __pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":2061
 *         else:
 *             startWeights = asarray(startWeights)
 *         try:             # <<<<<<<<<<<<<<
 *             from scipy import optimize
 *             OKScipy = True
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":2062
 *             startWeights = asarray(startWeights)
 *         try:
 *             from scipy import optimize             # <<<<<<<<<<<<<<
 *             OKScipy = True
 *         except ImportError:
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2062, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_optimize);
      __Pyx_GIVEREF(__pyx_n_s_optimize);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_optimize);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy, __pyx_t_3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2062, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_optimize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2062, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_optimize = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2063
 *         try:
 *             from scipy import optimize
 *             OKScipy = True             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             OKScipy = False
 */
      __pyx_v_OKScipy = 1;

      /* "metaphor/monal/driver/_driver.py":2061
 *         else:
 *             startWeights = asarray(startWeights)
 *         try:             # <<<<<<<<<<<<<<
 *             from scipy import optimize
 *             OKScipy = True
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2064
 *             from scipy import optimize
 *             OKScipy = True
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             OKScipy = False
 *         N = -1
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_11) {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.train", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 2064, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "metaphor/monal/driver/_driver.py":2065
 *             OKScipy = True
 *         except ImportError:
 *             OKScipy = False             # <<<<<<<<<<<<<<
 *         N = -1
 *         fcost = None
 */
      __pyx_v_OKScipy = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "metaphor/monal/driver/_driver.py":2061
 *         else:
 *             startWeights = asarray(startWeights)
 *         try:             # <<<<<<<<<<<<<<
 *             from scipy import optimize
 *             OKScipy = True
 */
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L9_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":2066
 *         except ImportError:
 *             OKScipy = False
 *         N = -1             # <<<<<<<<<<<<<<
 *         fcost = None
 *         prime = None
 */
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_v_N = __pyx_int_neg_1;

  /* "metaphor/monal/driver/_driver.py":2067
 *             OKScipy = False
 *         N = -1
 *         fcost = None             # <<<<<<<<<<<<<<
 *         prime = None
 *         if isinstance(self.mainModel, __builtins__.__class__):
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_fcost = Py_None;

  /* "metaphor/monal/driver/_driver.py":2068
 *         N = -1
 *         fcost = None
 *         prime = None             # <<<<<<<<<<<<<<
 *         if isinstance(self.mainModel, __builtins__.__class__):
 *             residuals = self.mainModel.getresiduals
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_prime = Py_None;

  /* "metaphor/monal/driver/_driver.py":2069
 *         fcost = None
 *         prime = None
 *         if isinstance(self.mainModel, __builtins__.__class__):             # <<<<<<<<<<<<<<
 *             residuals = self.mainModel.getresiduals
 *             vecPrime = self.mainModel.getjacobian
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_builtins); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = PyObject_IsInstance(__pyx_t_5, __pyx_t_4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2070
 *         prime = None
 *         if isinstance(self.mainModel, __builtins__.__class__):
 *             residuals = self.mainModel.getresiduals             # <<<<<<<<<<<<<<
 *             vecPrime = self.mainModel.getjacobian
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getresiduals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_residuals = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2071
 *         if isinstance(self.mainModel, __builtins__.__class__):
 *             residuals = self.mainModel.getresiduals
 *             vecPrime = self.mainModel.getjacobian             # <<<<<<<<<<<<<<
 *         else:
 *             if self.isParallel:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getjacobian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_vecPrime = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2069
 *         fcost = None
 *         prime = None
 *         if isinstance(self.mainModel, __builtins__.__class__):             # <<<<<<<<<<<<<<
 *             residuals = self.mainModel.getresiduals
 *             vecPrime = self.mainModel.getjacobian
 */
    goto __pyx_L12;
  }

  /* "metaphor/monal/driver/_driver.py":2073
 *             vecPrime = self.mainModel.getjacobian
 *         else:
 *             if self.isParallel:             # <<<<<<<<<<<<<<
 *                 vecPrime = self.Jacobian2
 *                 residuals = self.residuals2
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isParallel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2074
 *         else:
 *             if self.isParallel:
 *                 vecPrime = self.Jacobian2             # <<<<<<<<<<<<<<
 *                 residuals = self.residuals2
 *                 fcost = self.cost2
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Jacobian2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_vecPrime = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2075
 *             if self.isParallel:
 *                 vecPrime = self.Jacobian2
 *                 residuals = self.residuals2             # <<<<<<<<<<<<<<
 *                 fcost = self.cost2
 *                 prime = self.prime2
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_residuals2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_residuals = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2076
 *                 vecPrime = self.Jacobian2
 *                 residuals = self.residuals2
 *                 fcost = self.cost2             # <<<<<<<<<<<<<<
 *                 prime = self.prime2
 *             else:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cost2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_fcost, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2077
 *                 residuals = self.residuals2
 *                 fcost = self.cost2
 *                 prime = self.prime2             # <<<<<<<<<<<<<<
 *             else:
 *                 vecPrime = self.residualsPrime
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prime2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_prime, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2073
 *             vecPrime = self.mainModel.getjacobian
 *         else:
 *             if self.isParallel:             # <<<<<<<<<<<<<<
 *                 vecPrime = self.Jacobian2
 *                 residuals = self.residuals2
 */
      goto __pyx_L13;
    }

    /* "metaphor/monal/driver/_driver.py":2079
 *                 prime = self.prime2
 *             else:
 *                 vecPrime = self.residualsPrime             # <<<<<<<<<<<<<<
 *                 residuals = self.residuals
 *                 fcost = self.cost
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_residualsPrime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_vecPrime = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2080
 *             else:
 *                 vecPrime = self.residualsPrime
 *                 residuals = self.residuals             # <<<<<<<<<<<<<<
 *                 fcost = self.cost
 *                 prime = self.prime
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_residuals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_residuals = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2081
 *                 vecPrime = self.residualsPrime
 *                 residuals = self.residuals
 *                 fcost = self.cost             # <<<<<<<<<<<<<<
 *                 prime = self.prime
 *                 #curweights = self.mainModel.weights
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cost); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2081, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_fcost, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2082
 *                 residuals = self.residuals
 *                 fcost = self.cost
 *                 prime = self.prime             # <<<<<<<<<<<<<<
 *                 #curweights = self.mainModel.weights
 *             #curweights = self.mainModel._weights.copy()
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2082, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_prime, __pyx_t_4);
      __pyx_t_4 = 0;
    }
    __pyx_L13:;
  }
  __pyx_L12:;

  /* "metaphor/monal/driver/_driver.py":2086
 *             #curweights = self.mainModel._weights.copy()
 * 
 *         if maxiter:             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = None
 *             self._conditionning = None
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maxiter); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2086, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2087
 * 
 *         if maxiter:
 *             self._dispersionMatrix = None             # <<<<<<<<<<<<<<
 *             self._conditionning = None
 *             self._stdtrain = 0
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, Py_None) < 0) __PYX_ERR(0, 2087, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2088
 *         if maxiter:
 *             self._dispersionMatrix = None
 *             self._conditionning = None             # <<<<<<<<<<<<<<
 *             self._stdtrain = 0
 *         if verbose >= 3:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_conditionning, Py_None) < 0) __PYX_ERR(0, 2088, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2089
 *             self._dispersionMatrix = None
 *             self._conditionning = None
 *             self._stdtrain = 0             # <<<<<<<<<<<<<<
 *         if verbose >= 3:
 *             mess = "\nInformation: training {0}, max iterations {1}\n"
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain, __pyx_int_0) < 0) __PYX_ERR(0, 2089, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2086
 *             #curweights = self.mainModel._weights.copy()
 * 
 *         if maxiter:             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = None
 *             self._conditionning = None
 */
  }

  /* "metaphor/monal/driver/_driver.py":2090
 *             self._conditionning = None
 *             self._stdtrain = 0
 *         if verbose >= 3:             # <<<<<<<<<<<<<<
 *             mess = "\nInformation: training {0}, max iterations {1}\n"
 *             sys.stderr.write(mess.format(style, maxiter))
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2091
 *             self._stdtrain = 0
 *         if verbose >= 3:
 *             mess = "\nInformation: training {0}, max iterations {1}\n"             # <<<<<<<<<<<<<<
 *             sys.stderr.write(mess.format(style, maxiter))
 *         if hasattr(self.mainModel, "targets"):
 */
    __Pyx_INCREF(__pyx_kp_u_Information_training_0_max_iter);
    __pyx_v_mess = __pyx_kp_u_Information_training_0_max_iter;

    /* "metaphor/monal/driver/_driver.py":2092
 *         if verbose >= 3:
 *             mess = "\nInformation: training {0}, max iterations {1}\n"
 *             sys.stderr.write(mess.format(style, maxiter))             # <<<<<<<<<<<<<<
 *         if hasattr(self.mainModel, "targets"):
 *             targets = self.mainModel.targets
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyUnicode_Type_format, __pyx_v_mess, __pyx_v_style, __pyx_v_maxiter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2090
 *             self._conditionning = None
 *             self._stdtrain = 0
 *         if verbose >= 3:             # <<<<<<<<<<<<<<
 *             mess = "\nInformation: training {0}, max iterations {1}\n"
 *             sys.stderr.write(mess.format(style, maxiter))
 */
  }

  /* "metaphor/monal/driver/_driver.py":2093
 *             mess = "\nInformation: training {0}, max iterations {1}\n"
 *             sys.stderr.write(mess.format(style, maxiter))
 *         if hasattr(self.mainModel, "targets"):             # <<<<<<<<<<<<<<
 *             targets = self.mainModel.targets
 *         elif self._outputArray is not None:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_HasAttr(__pyx_t_4, __pyx_n_u_targets); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2094
 *             sys.stderr.write(mess.format(style, maxiter))
 *         if hasattr(self.mainModel, "targets"):
 *             targets = self.mainModel.targets             # <<<<<<<<<<<<<<
 *         elif self._outputArray is not None:
 *             targets = squeeze(self._outputArray)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_targets); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_targets = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2093
 *             mess = "\nInformation: training {0}, max iterations {1}\n"
 *             sys.stderr.write(mess.format(style, maxiter))
 *         if hasattr(self.mainModel, "targets"):             # <<<<<<<<<<<<<<
 *             targets = self.mainModel.targets
 *         elif self._outputArray is not None:
 */
    goto __pyx_L16;
  }

  /* "metaphor/monal/driver/_driver.py":2095
 *         if hasattr(self.mainModel, "targets"):
 *             targets = self.mainModel.targets
 *         elif self._outputArray is not None:             # <<<<<<<<<<<<<<
 *             targets = squeeze(self._outputArray)
 *         else:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = (__pyx_t_5 != Py_None);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2096
 *             targets = self.mainModel.targets
 *         elif self._outputArray is not None:
 *             targets = squeeze(self._outputArray)             # <<<<<<<<<<<<<<
 *         else:
 *             targets = asarray([dat[-1] for dat in self.trainingData])
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2096, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2096, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2096, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_targets = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2095
 *         if hasattr(self.mainModel, "targets"):
 *             targets = self.mainModel.targets
 *         elif self._outputArray is not None:             # <<<<<<<<<<<<<<
 *             targets = squeeze(self._outputArray)
 *         else:
 */
    goto __pyx_L16;
  }

  /* "metaphor/monal/driver/_driver.py":2098
 *             targets = squeeze(self._outputArray)
 *         else:
 *             targets = asarray([dat[-1] for dat in self.trainingData])             # <<<<<<<<<<<<<<
 *         self.mainModel.targets = targets
 *         args = (targets,)  #, inputs
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2098, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trainingData); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2098, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_3 = __pyx_t_7; __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2098, __pyx_L19_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2098, __pyx_L19_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2098, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2098, __pyx_L19_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2098, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_13(__pyx_t_3);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2098, __pyx_L19_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_dat, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_9genexpr10__pyx_v_dat, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2098, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 2098, __pyx_L19_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_dat); __pyx_9genexpr10__pyx_v_dat = 0;
      goto __pyx_L22_exit_scope;
      __pyx_L19_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_dat); __pyx_9genexpr10__pyx_v_dat = 0;
      goto __pyx_L1_error;
      __pyx_L22_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_targets = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L16:;

  /* "metaphor/monal/driver/_driver.py":2099
 *         else:
 *             targets = asarray([dat[-1] for dat in self.trainingData])
 *         self.mainModel.targets = targets             # <<<<<<<<<<<<<<
 *         args = (targets,)  #, inputs
 *         fopt = 0.0
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_targets, __pyx_v_targets) < 0) __PYX_ERR(0, 2099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2100
 *             targets = asarray([dat[-1] for dat in self.trainingData])
 *         self.mainModel.targets = targets
 *         args = (targets,)  #, inputs             # <<<<<<<<<<<<<<
 *         fopt = 0.0
 *         popt = None
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_targets);
  __Pyx_GIVEREF(__pyx_v_targets);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_targets);
  __pyx_v_args = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2101
 *         self.mainModel.targets = targets
 *         args = (targets,)  #, inputs
 *         fopt = 0.0             # <<<<<<<<<<<<<<
 *         popt = None
 *         code = 0
 */
  __Pyx_INCREF(__pyx_float_0_0);
  __pyx_v_fopt = __pyx_float_0_0;

  /* "metaphor/monal/driver/_driver.py":2102
 *         args = (targets,)  #, inputs
 *         fopt = 0.0
 *         popt = None             # <<<<<<<<<<<<<<
 *         code = 0
 *         if style == "LM_NT":  # LM by JLP
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_popt = Py_None;

  /* "metaphor/monal/driver/_driver.py":2103
 *         fopt = 0.0
 *         popt = None
 *         code = 0             # <<<<<<<<<<<<<<
 *         if style == "LM_NT":  # LM by JLP
 *             res = optim_leastsq(residuals, startWeights, args=args,
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_code = __pyx_int_0;

  /* "metaphor/monal/driver/_driver.py":2104
 *         popt = None
 *         code = 0
 *         if style == "LM_NT":  # LM by JLP             # <<<<<<<<<<<<<<
 *             res = optim_leastsq(residuals, startWeights, args=args,
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_style, __pyx_n_u_LM_NT, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2104, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2105
 *         code = 0
 *         if style == "LM_NT":  # LM by JLP
 *             res = optim_leastsq(residuals, startWeights, args=args,             # <<<<<<<<<<<<<<
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,
 *               callback=callback)#
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_optim_leastsq); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_residuals);
    __Pyx_GIVEREF(__pyx_v_residuals);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_residuals);
    __Pyx_INCREF(__pyx_v_startWeights);
    __Pyx_GIVEREF(__pyx_v_startWeights);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_startWeights);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2106
 *         if style == "LM_NT":  # LM by JLP
 *             res = optim_leastsq(residuals, startWeights, args=args,
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,             # <<<<<<<<<<<<<<
 *               callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_maxiter, __pyx_v_maxiter) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_Dfun, __pyx_v_vecPrime) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_full_output, __pyx_int_1) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2106, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_disp, __pyx_t_6) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2107
 *             res = optim_leastsq(residuals, startWeights, args=args,
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,
 *               callback=callback)#             # <<<<<<<<<<<<<<
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif style == "BFGS_NT":  # BFGS by JLP
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2105
 *         code = 0
 *         if style == "LM_NT":  # LM by JLP
 *             res = optim_leastsq(residuals, startWeights, args=args,             # <<<<<<<<<<<<<<
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,
 *               callback=callback)#
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_res = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2108
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,
 *               callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res             # <<<<<<<<<<<<<<
 *         elif style == "BFGS_NT":  # BFGS by JLP
 *             res = optim_bfgs(fcost, startWeights, args=args,
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
      PyObject* sequence = __pyx_v_res;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 6)) {
        if (size > 6) __Pyx_RaiseTooManyValuesError(6);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2108, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 4); 
        __pyx_t_14 = PyTuple_GET_ITEM(sequence, 5); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 4); 
        __pyx_t_14 = PyList_GET_ITEM(sequence, 5); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_14);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[6] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_4,&__pyx_t_5,&__pyx_t_3,&__pyx_t_14};
        for (i=0; i < 6; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2108, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[6] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_4,&__pyx_t_5,&__pyx_t_3,&__pyx_t_14};
      __pyx_t_15 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
      for (index=0; index < 6; index++) {
        PyObject* item = __pyx_t_16(__pyx_t_15); if (unlikely(!item)) goto __pyx_L24_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 6) < 0) __PYX_ERR(0, 2108, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2108, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_popt, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_code, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_v_Nf = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_Ng = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_t_14);
    __pyx_t_14 = 0;

    /* "metaphor/monal/driver/_driver.py":2104
 *         popt = None
 *         code = 0
 *         if style == "LM_NT":  # LM by JLP             # <<<<<<<<<<<<<<
 *             res = optim_leastsq(residuals, startWeights, args=args,
 *               maxiter=maxiter, Dfun=vecPrime, full_output=1, disp=verbose >= 3,
 */
    goto __pyx_L23;
  }

  /* "metaphor/monal/driver/_driver.py":2109
 *               callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif style == "BFGS_NT":  # BFGS by JLP             # <<<<<<<<<<<<<<
 *             res = optim_bfgs(fcost, startWeights, args=args,
 *                 maxiter=maxiter, Dfun=prime,
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_style, __pyx_n_u_BFGS_NT, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2109, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2110
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif style == "BFGS_NT":  # BFGS by JLP
 *             res = optim_bfgs(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                 maxiter=maxiter, Dfun=prime,
 *                 full_output=1, disp=verbose >= 3, callback=callback)#
 */
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_optim_bfgs); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_fcost);
    __Pyx_GIVEREF(__pyx_v_fcost);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fcost);
    __Pyx_INCREF(__pyx_v_startWeights);
    __Pyx_GIVEREF(__pyx_v_startWeights);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_startWeights);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2111
 *         elif style == "BFGS_NT":  # BFGS by JLP
 *             res = optim_bfgs(fcost, startWeights, args=args,
 *                 maxiter=maxiter, Dfun=prime,             # <<<<<<<<<<<<<<
 *                 full_output=1, disp=verbose >= 3, callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res
 */
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_maxiter, __pyx_v_maxiter) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_Dfun, __pyx_v_prime) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_full_output, __pyx_int_1) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2112
 *             res = optim_bfgs(fcost, startWeights, args=args,
 *                 maxiter=maxiter, Dfun=prime,
 *                 full_output=1, disp=verbose >= 3, callback=callback)#             # <<<<<<<<<<<<<<
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif not OKScipy:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_disp, __pyx_t_4) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2110
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif style == "BFGS_NT":  # BFGS by JLP
 *             res = optim_bfgs(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                 maxiter=maxiter, Dfun=prime,
 *                 full_output=1, disp=verbose >= 3, callback=callback)#
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_res = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2113
 *                 maxiter=maxiter, Dfun=prime,
 *                 full_output=1, disp=verbose >= 3, callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res             # <<<<<<<<<<<<<<
 *         elif not OKScipy:
 *             raise NotImplementedError("Not Implemented without Scipy")
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
      PyObject* sequence = __pyx_v_res;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 6)) {
        if (size > 6) __Pyx_RaiseTooManyValuesError(6);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2113, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_14 = PyTuple_GET_ITEM(sequence, 3); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 5); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_14 = PyList_GET_ITEM(sequence, 3); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 5); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[6] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_3,&__pyx_t_14,&__pyx_t_7,&__pyx_t_6};
        for (i=0; i < 6; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2113, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[6] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_3,&__pyx_t_14,&__pyx_t_7,&__pyx_t_6};
      __pyx_t_15 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
      for (index=0; index < 6; index++) {
        PyObject* item = __pyx_t_16(__pyx_t_15); if (unlikely(!item)) goto __pyx_L26_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 6) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L27_unpacking_done;
      __pyx_L26_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2113, __pyx_L1_error)
      __pyx_L27_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_popt, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_code, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_v_Nf = __pyx_t_14;
    __pyx_t_14 = 0;
    __pyx_v_Ng = __pyx_t_7;
    __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2109
 *               callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif style == "BFGS_NT":  # BFGS by JLP             # <<<<<<<<<<<<<<
 *             res = optim_bfgs(fcost, startWeights, args=args,
 *                 maxiter=maxiter, Dfun=prime,
 */
    goto __pyx_L23;
  }

  /* "metaphor/monal/driver/_driver.py":2114
 *                 full_output=1, disp=verbose >= 3, callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif not OKScipy:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Not Implemented without Scipy")
 *         else:
 */
  __pyx_t_1 = ((!(__pyx_v_OKScipy != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "metaphor/monal/driver/_driver.py":2115
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif not OKScipy:
 *             raise NotImplementedError("Not Implemented without Scipy")             # <<<<<<<<<<<<<<
 *         else:
 *             if style == "LM":  # LM by SciPy
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 2115, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2114
 *                 full_output=1, disp=verbose >= 3, callback=callback)#
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif not OKScipy:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Not Implemented without Scipy")
 *         else:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2117
 *             raise NotImplementedError("Not Implemented without Scipy")
 *         else:
 *             if style == "LM":  # LM by SciPy             # <<<<<<<<<<<<<<
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 */
  /*else*/ {
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_style, __pyx_n_u_LM, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2117, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2118
 *         else:
 *             if style == "LM":  # LM by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 *                 res = optimize.leastsq(residuals, res, args=args,
 */
      if (unlikely(!__pyx_v_optimize)) { __Pyx_RaiseUnboundLocalError("optimize"); __PYX_ERR(0, 2118, __pyx_L1_error) }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_optimize, __pyx_n_s_fmin_cg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_fcost);
      __Pyx_GIVEREF(__pyx_v_fcost);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fcost);
      __Pyx_INCREF(__pyx_v_startWeights);
      __Pyx_GIVEREF(__pyx_v_startWeights);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_startWeights);
      __pyx_t_14 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2118, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2119
 *             if style == "LM":  # LM by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)             # <<<<<<<<<<<<<<
 *                 res = optimize.leastsq(residuals, res, args=args,
 *                      maxfev=maxiter,  Dfun=vecPrime, factor=97, full_output=1)  #
 */
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_fprime, __pyx_v_prime) < 0) __PYX_ERR(0, 2118, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_maxiter, __pyx_int_15) < 0) __PYX_ERR(0, 2118, __pyx_L1_error)
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2119, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_disp, __pyx_t_3) < 0) __PYX_ERR(0, 2118, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2118
 *         else:
 *             if style == "LM":  # LM by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 *                 res = optimize.leastsq(residuals, res, args=args,
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_v_res = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2120
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 *                 res = optimize.leastsq(residuals, res, args=args,             # <<<<<<<<<<<<<<
 *                      maxfev=maxiter,  Dfun=vecPrime, factor=97, full_output=1)  #
 *                 popt, cov, infodict, mesg, ier = res
 */
      if (unlikely(!__pyx_v_optimize)) { __Pyx_RaiseUnboundLocalError("optimize"); __PYX_ERR(0, 2120, __pyx_L1_error) }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_optimize, __pyx_n_s_leastsq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_v_residuals);
      __Pyx_GIVEREF(__pyx_v_residuals);
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_residuals);
      __Pyx_INCREF(__pyx_v_res);
      __Pyx_GIVEREF(__pyx_v_res);
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_res);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2120, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2121
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 *                 res = optimize.leastsq(residuals, res, args=args,
 *                      maxfev=maxiter,  Dfun=vecPrime, factor=97, full_output=1)  #             # <<<<<<<<<<<<<<
 *                 popt, cov, infodict, mesg, ier = res
 *                 N = infodict["nfev"]
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_maxfev, __pyx_v_maxiter) < 0) __PYX_ERR(0, 2120, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_Dfun, __pyx_v_vecPrime) < 0) __PYX_ERR(0, 2120, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_factor, __pyx_int_97) < 0) __PYX_ERR(0, 2120, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_full_output, __pyx_int_1) < 0) __PYX_ERR(0, 2120, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2120
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 *                 res = optimize.leastsq(residuals, res, args=args,             # <<<<<<<<<<<<<<
 *                      maxfev=maxiter,  Dfun=vecPrime, factor=97, full_output=1)  #
 *                 popt, cov, infodict, mesg, ier = res
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2122
 *                 res = optimize.leastsq(residuals, res, args=args,
 *                      maxfev=maxiter,  Dfun=vecPrime, factor=97, full_output=1)  #
 *                 popt, cov, infodict, mesg, ier = res             # <<<<<<<<<<<<<<
 *                 N = infodict["nfev"]
 *                 fopt = npsum(infodict['fvec']**2)/2
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
        PyObject* sequence = __pyx_v_res;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 5)) {
          if (size > 5) __Pyx_RaiseTooManyValuesError(5);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2122, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 3); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 4); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 4); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[5] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_14,&__pyx_t_3,&__pyx_t_5};
          for (i=0; i < 5; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2122, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[5] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_14,&__pyx_t_3,&__pyx_t_5};
        __pyx_t_4 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext;
        for (index=0; index < 5; index++) {
          PyObject* item = __pyx_t_16(__pyx_t_4); if (unlikely(!item)) goto __pyx_L29_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_4), 5) < 0) __PYX_ERR(0, 2122, __pyx_L1_error)
        __pyx_t_16 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L30_unpacking_done;
        __pyx_L29_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_16 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2122, __pyx_L1_error)
        __pyx_L30_unpacking_done:;
      }
      __Pyx_DECREF_SET(__pyx_v_popt, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_v_cov = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_v_infodict = __pyx_t_14;
      __pyx_t_14 = 0;
      __pyx_v_mesg = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_ier = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2123
 *                      maxfev=maxiter,  Dfun=vecPrime, factor=97, full_output=1)  #
 *                 popt, cov, infodict, mesg, ier = res
 *                 N = infodict["nfev"]             # <<<<<<<<<<<<<<
 *                 fopt = npsum(infodict['fvec']**2)/2
 *             elif style == "CG":  # CG by SciPy
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_infodict, __pyx_n_u_nfev); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2124
 *                 popt, cov, infodict, mesg, ier = res
 *                 N = infodict["nfev"]
 *                 fopt = npsum(infodict['fvec']**2)/2             # <<<<<<<<<<<<<<
 *             elif style == "CG":  # CG by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_v_infodict, __pyx_n_u_fvec); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_7 = PyNumber_Power(__pyx_t_14, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_14) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2124, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_7};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2124, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_7};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2124, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2124, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_14); __pyx_t_14 = NULL;
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
          __pyx_t_7 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2124, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_5, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2117
 *             raise NotImplementedError("Not Implemented without Scipy")
 *         else:
 *             if style == "LM":  # LM by SciPy             # <<<<<<<<<<<<<<
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=15, disp=verbose >= 3)
 */
      goto __pyx_L28;
    }

    /* "metaphor/monal/driver/_driver.py":2125
 *                 N = infodict["nfev"]
 *                 fopt = npsum(infodict['fvec']**2)/2
 *             elif style == "CG":  # CG by SciPy             # <<<<<<<<<<<<<<
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter,
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_style, __pyx_n_u_CG, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2125, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2126
 *                 fopt = npsum(infodict['fvec']**2)/2
 *             elif style == "CG":  # CG by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     fprime=prime, maxiter=maxiter,
 *                     full_output=1, disp=verbose >= 3, callback=callback)
 */
      if (unlikely(!__pyx_v_optimize)) { __Pyx_RaiseUnboundLocalError("optimize"); __PYX_ERR(0, 2126, __pyx_L1_error) }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_optimize, __pyx_n_s_fmin_cg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_fcost);
      __Pyx_GIVEREF(__pyx_v_fcost);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_fcost);
      __Pyx_INCREF(__pyx_v_startWeights);
      __Pyx_GIVEREF(__pyx_v_startWeights);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_startWeights);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2126, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2127
 *             elif style == "CG":  # CG by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter,             # <<<<<<<<<<<<<<
 *                     full_output=1, disp=verbose >= 3, callback=callback)
 *                 popt, fopt, N, Ng, warnflag = res
 */
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_fprime, __pyx_v_prime) < 0) __PYX_ERR(0, 2126, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_maxiter, __pyx_v_maxiter) < 0) __PYX_ERR(0, 2126, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_full_output, __pyx_int_1) < 0) __PYX_ERR(0, 2126, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2128
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter,
 *                     full_output=1, disp=verbose >= 3, callback=callback)             # <<<<<<<<<<<<<<
 *                 popt, fopt, N, Ng, warnflag = res
 *             elif style == "BFGS":  # BFGS by SciPy
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2128, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_disp, __pyx_t_7) < 0) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2126, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2126
 *                 fopt = npsum(infodict['fvec']**2)/2
 *             elif style == "CG":  # CG by SciPy
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     fprime=prime, maxiter=maxiter,
 *                     full_output=1, disp=verbose >= 3, callback=callback)
 */
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_res = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2129
 *                     fprime=prime, maxiter=maxiter,
 *                     full_output=1, disp=verbose >= 3, callback=callback)
 *                 popt, fopt, N, Ng, warnflag = res             # <<<<<<<<<<<<<<
 *             elif style == "BFGS":  # BFGS by SciPy
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
        PyObject* sequence = __pyx_v_res;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 5)) {
          if (size > 5) __Pyx_RaiseTooManyValuesError(5);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2129, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 3); 
          __pyx_t_14 = PyTuple_GET_ITEM(sequence, 4); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
          __pyx_t_14 = PyList_GET_ITEM(sequence, 4); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_14);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[5] = {&__pyx_t_7,&__pyx_t_6,&__pyx_t_5,&__pyx_t_3,&__pyx_t_14};
          for (i=0; i < 5; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2129, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[5] = {&__pyx_t_7,&__pyx_t_6,&__pyx_t_5,&__pyx_t_3,&__pyx_t_14};
        __pyx_t_4 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext;
        for (index=0; index < 5; index++) {
          PyObject* item = __pyx_t_16(__pyx_t_4); if (unlikely(!item)) goto __pyx_L31_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_4), 5) < 0) __PYX_ERR(0, 2129, __pyx_L1_error)
        __pyx_t_16 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L32_unpacking_done;
        __pyx_L31_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_16 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2129, __pyx_L1_error)
        __pyx_L32_unpacking_done:;
      }
      __Pyx_DECREF_SET(__pyx_v_popt, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_v_Ng = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_warnflag = __pyx_t_14;
      __pyx_t_14 = 0;

      /* "metaphor/monal/driver/_driver.py":2125
 *                 N = infodict["nfev"]
 *                 fopt = npsum(infodict['fvec']**2)/2
 *             elif style == "CG":  # CG by SciPy             # <<<<<<<<<<<<<<
 *                 res = optimize.fmin_cg(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter,
 */
      goto __pyx_L28;
    }

    /* "metaphor/monal/driver/_driver.py":2130
 *                     full_output=1, disp=verbose >= 3, callback=callback)
 *                 popt, fopt, N, Ng, warnflag = res
 *             elif style == "BFGS":  # BFGS by SciPy             # <<<<<<<<<<<<<<
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_style, __pyx_n_u_BFGS, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2130, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2131
 *                 popt, fopt, N, Ng, warnflag = res
 *             elif style == "BFGS":  # BFGS by SciPy
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 *             elif style == "SPX":  # SPX by SciPy
 */
      if (unlikely(!__pyx_v_optimize)) { __Pyx_RaiseUnboundLocalError("optimize"); __PYX_ERR(0, 2131, __pyx_L1_error) }
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_optimize, __pyx_n_s_fmin_bfgs); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_fcost);
      __Pyx_GIVEREF(__pyx_v_fcost);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fcost);
      __Pyx_INCREF(__pyx_v_startWeights);
      __Pyx_GIVEREF(__pyx_v_startWeights);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_startWeights);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2132
 *             elif style == "BFGS":  # BFGS by SciPy
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)             # <<<<<<<<<<<<<<
 *             elif style == "SPX":  # SPX by SciPy
 *                 res = optimize.fmin(fcost, startWeights, args=args,
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fprime, __pyx_v_prime) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_maxiter, __pyx_v_maxiter) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_full_output, __pyx_int_1) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2132, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_disp, __pyx_t_6) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2131
 *                 popt, fopt, N, Ng, warnflag = res
 *             elif style == "BFGS":  # BFGS by SciPy
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 *             elif style == "SPX":  # SPX by SciPy
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 7)) {
          if (size > 7) __Pyx_RaiseTooManyValuesError(7);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2131, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 4); 
          __pyx_t_15 = PyTuple_GET_ITEM(sequence, 5); 
          __pyx_t_17 = PyTuple_GET_ITEM(sequence, 6); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 4); 
          __pyx_t_15 = PyList_GET_ITEM(sequence, 5); 
          __pyx_t_17 = PyList_GET_ITEM(sequence, 6); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[7] = {&__pyx_t_5,&__pyx_t_3,&__pyx_t_14,&__pyx_t_7,&__pyx_t_4,&__pyx_t_15,&__pyx_t_17};
          for (i=0; i < 7; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2131, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[7] = {&__pyx_t_5,&__pyx_t_3,&__pyx_t_14,&__pyx_t_7,&__pyx_t_4,&__pyx_t_15,&__pyx_t_17};
        __pyx_t_18 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2131, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_16 = Py_TYPE(__pyx_t_18)->tp_iternext;
        for (index=0; index < 7; index++) {
          PyObject* item = __pyx_t_16(__pyx_t_18); if (unlikely(!item)) goto __pyx_L33_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_18), 7) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
        __pyx_t_16 = NULL;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        goto __pyx_L34_unpacking_done;
        __pyx_L33_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_16 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2131, __pyx_L1_error)
        __pyx_L34_unpacking_done:;
      }
      __Pyx_DECREF_SET(__pyx_v_popt, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_v_gopt = __pyx_t_14;
      __pyx_t_14 = 0;
      __pyx_v_Bopt = __pyx_t_7;
      __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_v_Ng = __pyx_t_15;
      __pyx_t_15 = 0;
      __pyx_v_warnflag = __pyx_t_17;
      __pyx_t_17 = 0;

      /* "metaphor/monal/driver/_driver.py":2130
 *                     full_output=1, disp=verbose >= 3, callback=callback)
 *                 popt, fopt, N, Ng, warnflag = res
 *             elif style == "BFGS":  # BFGS by SciPy             # <<<<<<<<<<<<<<
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 */
      goto __pyx_L28;
    }

    /* "metaphor/monal/driver/_driver.py":2133
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 *             elif style == "SPX":  # SPX by SciPy             # <<<<<<<<<<<<<<
 *                 res = optimize.fmin(fcost, startWeights, args=args,
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_style, __pyx_n_u_SPX, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2133, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2134
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 *             elif style == "SPX":  # SPX by SciPy
 *                 res = optimize.fmin(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,
 *                     callback=callback)
 */
      if (unlikely(!__pyx_v_optimize)) { __Pyx_RaiseUnboundLocalError("optimize"); __PYX_ERR(0, 2134, __pyx_L1_error) }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_optimize, __pyx_n_s_fmin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_INCREF(__pyx_v_fcost);
      __Pyx_GIVEREF(__pyx_v_fcost);
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_fcost);
      __Pyx_INCREF(__pyx_v_startWeights);
      __Pyx_GIVEREF(__pyx_v_startWeights);
      PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_v_startWeights);
      __pyx_t_15 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 2134, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2135
 *             elif style == "SPX":  # SPX by SciPy
 *                 res = optimize.fmin(fcost, startWeights, args=args,
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,             # <<<<<<<<<<<<<<
 *                     callback=callback)
 *                 popt, fopt, N, funcalls, warnflag, allvecs = res
 */
      if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_maxiter, __pyx_v_maxiter) < 0) __PYX_ERR(0, 2134, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_full_output, __pyx_int_1) < 0) __PYX_ERR(0, 2134, __pyx_L1_error)
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2135, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_disp, __pyx_t_4) < 0) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2136
 *                 res = optimize.fmin(fcost, startWeights, args=args,
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,
 *                     callback=callback)             # <<<<<<<<<<<<<<
 *                 popt, fopt, N, funcalls, warnflag, allvecs = res
 * #             else:
 */
      if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2134, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2134
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 *             elif style == "SPX":  # SPX by SciPy
 *                 res = optimize.fmin(fcost, startWeights, args=args,             # <<<<<<<<<<<<<<
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,
 *                     callback=callback)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, __pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_v_res = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2137
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,
 *                     callback=callback)
 *                 popt, fopt, N, funcalls, warnflag, allvecs = res             # <<<<<<<<<<<<<<
 * #             else:
 * #                 popt = None
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
        PyObject* sequence = __pyx_v_res;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 6)) {
          if (size > 6) __Pyx_RaiseTooManyValuesError(6);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2137, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
          __pyx_t_14 = PyTuple_GET_ITEM(sequence, 5); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_17 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
          __pyx_t_14 = PyList_GET_ITEM(sequence, 5); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_14);
        #else
        {
          Py_ssize_t i;
          PyObject** temps[6] = {&__pyx_t_4,&__pyx_t_15,&__pyx_t_17,&__pyx_t_6,&__pyx_t_7,&__pyx_t_14};
          for (i=0; i < 6; i++) {
            PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2137, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[6] = {&__pyx_t_4,&__pyx_t_15,&__pyx_t_17,&__pyx_t_6,&__pyx_t_7,&__pyx_t_14};
        __pyx_t_3 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_16 = Py_TYPE(__pyx_t_3)->tp_iternext;
        for (index=0; index < 6; index++) {
          PyObject* item = __pyx_t_16(__pyx_t_3); if (unlikely(!item)) goto __pyx_L35_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_3), 6) < 0) __PYX_ERR(0, 2137, __pyx_L1_error)
        __pyx_t_16 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L36_unpacking_done;
        __pyx_L35_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_16 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2137, __pyx_L1_error)
        __pyx_L36_unpacking_done:;
      }
      __Pyx_DECREF_SET(__pyx_v_popt, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_fopt, __pyx_t_15);
      __pyx_t_15 = 0;
      __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_v_funcalls = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_v_warnflag = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_v_allvecs = __pyx_t_14;
      __pyx_t_14 = 0;

      /* "metaphor/monal/driver/_driver.py":2133
 *                 popt, fopt, gopt, Bopt, N, Ng, warnflag = optimize.fmin_bfgs(fcost, startWeights, args=args,
 *                     fprime=prime, maxiter=maxiter, full_output=1, disp=verbose >= 3, callback=callback)
 *             elif style == "SPX":  # SPX by SciPy             # <<<<<<<<<<<<<<
 *                 res = optimize.fmin(fcost, startWeights, args=args,
 *                     maxiter=maxiter, full_output=1, disp=verbose >= 3,
 */
    }
    __pyx_L28:;
  }
  __pyx_L23:;

  /* "metaphor/monal/driver/_driver.py":2140
 * #             else:
 * #                 popt = None
 *         self._stdtrain = fopt             # <<<<<<<<<<<<<<
 *         if code:
 *             return None, code, 0.0
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain, __pyx_v_fopt) < 0) __PYX_ERR(0, 2140, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2141
 * #                 popt = None
 *         self._stdtrain = fopt
 *         if code:             # <<<<<<<<<<<<<<
 *             return None, code, 0.0
 *         return popt, N, fopt
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_code); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2141, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2142
 *         self._stdtrain = fopt
 *         if code:
 *             return None, code, 0.0             # <<<<<<<<<<<<<<
 *         return popt, N, fopt
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_14, 0, Py_None);
    __Pyx_INCREF(__pyx_v_code);
    __Pyx_GIVEREF(__pyx_v_code);
    PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_code);
    __Pyx_INCREF(__pyx_float_0_0);
    __Pyx_GIVEREF(__pyx_float_0_0);
    PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_float_0_0);
    __pyx_r = __pyx_t_14;
    __pyx_t_14 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2141
 * #                 popt = None
 *         self._stdtrain = fopt
 *         if code:             # <<<<<<<<<<<<<<
 *             return None, code, 0.0
 *         return popt, N, fopt
 */
  }

  /* "metaphor/monal/driver/_driver.py":2143
 *         if code:
 *             return None, code, 0.0
 *         return popt, N, fopt             # <<<<<<<<<<<<<<
 * 
 * #    def train_nt(self, cycle, algo=op.id_LM, initialize=True, timeit=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_INCREF(__pyx_v_popt);
  __Pyx_GIVEREF(__pyx_v_popt);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_popt);
  __Pyx_INCREF(__pyx_v_N);
  __Pyx_GIVEREF(__pyx_v_N);
  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_N);
  __Pyx_INCREF(__pyx_v_fopt);
  __Pyx_GIVEREF(__pyx_v_fopt);
  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_v_fopt);
  __pyx_r = __pyx_t_14;
  __pyx_t_14 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2051
 *         return bests
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,             # <<<<<<<<<<<<<<
 *             callback=None, **kwds):  # Driver
 *         """Lancement d'un apprentissage.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_style);
  __Pyx_XDECREF(__pyx_v_optimize);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_fcost);
  __Pyx_XDECREF(__pyx_v_prime);
  __Pyx_XDECREF(__pyx_v_residuals);
  __Pyx_XDECREF(__pyx_v_vecPrime);
  __Pyx_XDECREF(__pyx_v_mess);
  __Pyx_XDECREF(__pyx_v_targets);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_fopt);
  __Pyx_XDECREF(__pyx_v_popt);
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_Nf);
  __Pyx_XDECREF(__pyx_v_Ng);
  __Pyx_XDECREF(__pyx_v_cov);
  __Pyx_XDECREF(__pyx_v_infodict);
  __Pyx_XDECREF(__pyx_v_mesg);
  __Pyx_XDECREF(__pyx_v_ier);
  __Pyx_XDECREF(__pyx_v_warnflag);
  __Pyx_XDECREF(__pyx_v_gopt);
  __Pyx_XDECREF(__pyx_v_Bopt);
  __Pyx_XDECREF(__pyx_v_funcalls);
  __Pyx_XDECREF(__pyx_v_allvecs);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_dat);
  __Pyx_XDECREF(__pyx_v_startWeights);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2165
 * #        return res[0], res[1]/self.dataCount, res[2]
 * 
 *     def gradientCompute(self, inputs = None, outindex = 0):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_163gradientCompute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_163gradientCompute = {"gradientCompute", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_163gradientCompute, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_163gradientCompute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_outindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gradientCompute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_outindex,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outindex);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gradientCompute") < 0)) __PYX_ERR(0, 2165, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_outindex = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gradientCompute", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2165, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.gradientCompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_162gradientCompute(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_outindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_162gradientCompute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_outindex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("gradientCompute", 0);

  /* "metaphor/monal/driver/_driver.py":2166
 * 
 *     def gradientCompute(self, inputs = None, outindex = 0):  # Driver
 *         return self.mainModel.gradientCompute(inputs, outindex)             # <<<<<<<<<<<<<<
 * 
 *     def directInputGradient(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gradientCompute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_inputs, __pyx_v_outindex};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_inputs, __pyx_v_outindex};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_inputs);
    __Pyx_INCREF(__pyx_v_outindex);
    __Pyx_GIVEREF(__pyx_v_outindex);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_outindex);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2165
 * #        return res[0], res[1]/self.dataCount, res[2]
 * 
 *     def gradientCompute(self, inputs = None, outindex = 0):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.gradientCompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2168
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 *     def directInputGradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul du gradient du modle complet par rapport aux entres par la mthode directe
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_165directInputGradient(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_164directInputGradient[] = "Calcul du gradient du mod\303\257\302\277\305\223le complet par rapport aux entr\303\257\302\277\305\223es par la m\303\257\302\277\305\223thode directe\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_165directInputGradient = {"directInputGradient", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_165directInputGradient, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_164directInputGradient};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_165directInputGradient(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("directInputGradient (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_164directInputGradient(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_164directInputGradient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("directInputGradient", 0);

  /* "metaphor/monal/driver/_driver.py":2171
 *         """Calcul du gradient du modle complet par rapport aux entres par la mthode directe
 *         """
 *         res = self.mainModel.directInputGradient()             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             for ind in range(self.mainModel.inputCount):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_directInputGradient); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2172
 *         """
 *         res = self.mainModel.directInputGradient()
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.inputCount):
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":2173
 *         res = self.mainModel.directInputGradient()
 *         if self.inNormModel:
 *             for ind in range(self.mainModel.inputCount):             # <<<<<<<<<<<<<<
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 *         if self.outNormModel:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2173, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2173, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2173, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2173, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2174
 *         if self.inNormModel:
 *             for ind in range(self.mainModel.inputCount):
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):
 */
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_slice__113);
      __Pyx_GIVEREF(__pyx_slice__113);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_slice__113);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ind);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_0);
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_res, __pyx_t_1, __pyx_t_7) < 0)) __PYX_ERR(0, 2174, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2173
 *         res = self.mainModel.directInputGradient()
 *         if self.inNormModel:
 *             for ind in range(self.mainModel.inputCount):             # <<<<<<<<<<<<<<
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 *         if self.outNormModel:
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2172
 *         """
 *         res = self.mainModel.directInputGradient()
 *         if self.inNormModel:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.inputCount):
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2175
 *             for ind in range(self.mainModel.inputCount):
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.outputCount):
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":2176
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 *         if self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]
 *         return res
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2176, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2176, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2176, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2176, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2176, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2176, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2177
 *         if self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_slice__114);
      __Pyx_GIVEREF(__pyx_slice__114);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_slice__114);
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_0);
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyNumber_InPlaceMultiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_res, __pyx_t_3, __pyx_t_9) < 0)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2176
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 *         if self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]
 *         return res
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2175
 *             for ind in range(self.mainModel.inputCount):
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]
 *         if self.outNormModel:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.outputCount):
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2178
 *             for ind in range(self.mainModel.outputCount):
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def transferAndDirectGradient(self, inputs, gradient=None, donorm=True):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2168
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 *     def directInputGradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul du gradient du modle complet par rapport aux entres par la mthode directe
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.directInputGradient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2180
 *         return res
 * 
 *     def transferAndDirectGradient(self, inputs, gradient=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul simultan du transfert  travers le modle complet, et du gradient du
 *         modle complet par rapport aux paramtres par la mthode directe.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_167transferAndDirectGradient(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_166transferAndDirectGradient[] = "Calcul simultan\303\257\302\277\305\223 du transfert \303\257\302\277\305\223 travers le mod\303\257\302\277\305\223le complet, et du gradient du \n        mod\303\257\302\277\305\223le complet par rapport aux param\303\257\302\277\305\223tres par la m\303\257\302\277\305\223thode directe.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_167transferAndDirectGradient = {"transferAndDirectGradient", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_167transferAndDirectGradient, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_166transferAndDirectGradient};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_167transferAndDirectGradient(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_gradient = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferAndDirectGradient (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_gradient,&__pyx_n_s_donorm,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("transferAndDirectGradient", 0, 2, 4, 1); __PYX_ERR(0, 2180, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gradient);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferAndDirectGradient") < 0)) __PYX_ERR(0, 2180, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_gradient = values[2];
    __pyx_v_donorm = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferAndDirectGradient", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2180, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferAndDirectGradient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_166transferAndDirectGradient(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_gradient, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_166transferAndDirectGradient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_gradient, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_middleoutputs = NULL;
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("transferAndDirectGradient", 0);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_INCREF(__pyx_v_gradient);

  /* "metaphor/monal/driver/_driver.py":2184
 *         modle complet par rapport aux paramtres par la mthode directe.
 *         """
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2184, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2185
 *         """
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)
 *         middleoutputs, gradient = self.mainModel.propagateAndDirectGradient(inputs, gradient)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_inputs);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2184
 *         modle complet par rapport aux paramtres par la mthode directe.
 *         """
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2186
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)             # <<<<<<<<<<<<<<
 *         middleoutputs, gradient = self.mainModel.propagateAndDirectGradient(inputs, gradient)
 *         if donorm:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_computeLevel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
  } else {
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_2 = __pyx_t_5;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_t_2;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_computeLevel, __pyx_t_3) < 0) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":2187
 *             inputs = self.normalizeInputs(inputs)
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)
 *         middleoutputs, gradient = self.mainModel.propagateAndDirectGradient(inputs, gradient)             # <<<<<<<<<<<<<<
 *         if donorm:
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_propagateAndDirectGradient); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_inputs, __pyx_v_gradient};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_inputs, __pyx_v_gradient};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_inputs);
    __Pyx_INCREF(__pyx_v_gradient);
    __Pyx_GIVEREF(__pyx_v_gradient);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_gradient);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2187, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2187, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2187, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_middleoutputs = __pyx_t_5;
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_gradient, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2188
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)
 *         middleoutputs, gradient = self.mainModel.propagateAndDirectGradient(inputs, gradient)
 *         if donorm:             # <<<<<<<<<<<<<<
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 *         if donorm and self.outNormModel:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2188, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2189
 *         middleoutputs, gradient = self.mainModel.propagateAndDirectGradient(inputs, gradient)
 *         if donorm:
 *             outputs = self.unnormalizeOutputs(middleoutputs)             # <<<<<<<<<<<<<<
 *         if donorm and self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_middleoutputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_middleoutputs};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_middleoutputs};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_middleoutputs);
        __Pyx_GIVEREF(__pyx_v_middleoutputs);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_middleoutputs);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_outputs = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2188
 *         self.mainModel.computeLevel = max(C.ID_DIFF, self.mainModel.computeLevel)
 *         middleoutputs, gradient = self.mainModel.propagateAndDirectGradient(inputs, gradient)
 *         if donorm:             # <<<<<<<<<<<<<<
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 *         if donorm and self.outNormModel:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2190
 *         if donorm:
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.outputCount):
 *                 gradient[ind] *= self.outNormModel.data[ind, 0]
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2190, __pyx_L1_error)
  if (__pyx_t_8) {
  } else {
    __pyx_t_1 = __pyx_t_8;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_8;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2191
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 *         if donorm and self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *                 gradient[ind] *= self.outNormModel.data[ind, 0]
 *         return outputs, gradient
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2191, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2191, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2191, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2191, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2192
 *         if donorm and self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):
 *                 gradient[ind] *= self.outNormModel.data[ind, 0]             # <<<<<<<<<<<<<<
 *         return outputs, gradient
 * 
 */
      __Pyx_INCREF(__pyx_v_ind);
      __pyx_t_2 = __pyx_v_ind;
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_gradient, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
      __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_gradient, __pyx_t_2, __pyx_t_5) < 0)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2191
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 *         if donorm and self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):             # <<<<<<<<<<<<<<
 *                 gradient[ind] *= self.outNormModel.data[ind, 0]
 *         return outputs, gradient
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2190
 *         if donorm:
 *             outputs = self.unnormalizeOutputs(middleoutputs)
 *         if donorm and self.outNormModel:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.outputCount):
 *                 gradient[ind] *= self.outNormModel.data[ind, 0]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2193
 *             for ind in range(self.mainModel.outputCount):
 *                 gradient[ind] *= self.outNormModel.data[ind, 0]
 *         return outputs, gradient             # <<<<<<<<<<<<<<
 * 
 *     def _expandvec(self, vec, inivec, fixed):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_outputs)) { __Pyx_RaiseUnboundLocalError("outputs"); __PYX_ERR(0, 2193, __pyx_L1_error) }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_outputs);
  __Pyx_GIVEREF(__pyx_v_outputs);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_outputs);
  __Pyx_INCREF(__pyx_v_gradient);
  __Pyx_GIVEREF(__pyx_v_gradient);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_gradient);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2180
 *         return res
 * 
 *     def transferAndDirectGradient(self, inputs, gradient=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul simultan du transfert  travers le modle complet, et du gradient du
 *         modle complet par rapport aux paramtres par la mthode directe.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferAndDirectGradient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_middleoutputs);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XDECREF(__pyx_v_gradient);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2195
 *         return outputs, gradient
 * 
 *     def _expandvec(self, vec, inivec, fixed):             # <<<<<<<<<<<<<<
 *         index = 0
 *         target = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_169_expandvec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_169_expandvec = {"_expandvec", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_169_expandvec, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_169_expandvec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_vec = 0;
  PyObject *__pyx_v_inivec = 0;
  PyObject *__pyx_v_fixed = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_expandvec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vec,&__pyx_n_s_inivec,&__pyx_n_s_fixed,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_expandvec", 1, 4, 4, 1); __PYX_ERR(0, 2195, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inivec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_expandvec", 1, 4, 4, 2); __PYX_ERR(0, 2195, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixed)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_expandvec", 1, 4, 4, 3); __PYX_ERR(0, 2195, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_expandvec") < 0)) __PYX_ERR(0, 2195, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_vec = values[1];
    __pyx_v_inivec = values[2];
    __pyx_v_fixed = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_expandvec", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2195, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._expandvec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_168_expandvec(__pyx_self, __pyx_v_self, __pyx_v_vec, __pyx_v_inivec, __pyx_v_fixed);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_168_expandvec(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_inivec, PyObject *__pyx_v_fixed) {
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_target = NULL;
  PyObject *__pyx_v_inivalue = NULL;
  PyObject *__pyx_v_fix = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("_expandvec", 0);

  /* "metaphor/monal/driver/_driver.py":2196
 * 
 *     def _expandvec(self, vec, inivec, fixed):
 *         index = 0             # <<<<<<<<<<<<<<
 *         target = []
 *         for inivalue, fix in zip(inivec, fixed):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_index = __pyx_int_0;

  /* "metaphor/monal/driver/_driver.py":2197
 *     def _expandvec(self, vec, inivec, fixed):
 *         index = 0
 *         target = []             # <<<<<<<<<<<<<<
 *         for inivalue, fix in zip(inivec, fixed):
 *             if fix:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_target = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2198
 *         index = 0
 *         target = []
 *         for inivalue, fix in zip(inivec, fixed):             # <<<<<<<<<<<<<<
 *             if fix:
 *                 val = inivalue
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_inivec);
  __Pyx_GIVEREF(__pyx_v_inivec);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_inivec);
  __Pyx_INCREF(__pyx_v_fixed);
  __Pyx_GIVEREF(__pyx_v_fixed);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_fixed);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2198, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2198, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2198, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2198, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2198, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2198, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2198, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_inivalue, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_fix, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2199
 *         target = []
 *         for inivalue, fix in zip(inivec, fixed):
 *             if fix:             # <<<<<<<<<<<<<<
 *                 val = inivalue
 *             else:
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fix); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2199, __pyx_L1_error)
    if (__pyx_t_9) {

      /* "metaphor/monal/driver/_driver.py":2200
 *         for inivalue, fix in zip(inivec, fixed):
 *             if fix:
 *                 val = inivalue             # <<<<<<<<<<<<<<
 *             else:
 *                 val = vec[index]
 */
      __Pyx_INCREF(__pyx_v_inivalue);
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_v_inivalue);

      /* "metaphor/monal/driver/_driver.py":2199
 *         target = []
 *         for inivalue, fix in zip(inivec, fixed):
 *             if fix:             # <<<<<<<<<<<<<<
 *                 val = inivalue
 *             else:
 */
      goto __pyx_L7;
    }

    /* "metaphor/monal/driver/_driver.py":2202
 *                 val = inivalue
 *             else:
 *                 val = vec[index]             # <<<<<<<<<<<<<<
 *                 index += 1
 *             target.append(val)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_vec, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2203
 *             else:
 *                 val = vec[index]
 *                 index += 1             # <<<<<<<<<<<<<<
 *             target.append(val)
 *         return asarray(target)
 */
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L7:;

    /* "metaphor/monal/driver/_driver.py":2204
 *                 val = vec[index]
 *                 index += 1
 *             target.append(val)             # <<<<<<<<<<<<<<
 *         return asarray(target)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_target, __pyx_v_val); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2204, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2198
 *         index = 0
 *         target = []
 *         for inivalue, fix in zip(inivec, fixed):             # <<<<<<<<<<<<<<
 *             if fix:
 *                 val = inivalue
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2205
 *                 index += 1
 *             target.append(val)
 *         return asarray(target)             # <<<<<<<<<<<<<<
 * 
 *     def _reducevec(self, vec, fixed):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_target};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_target};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v_target);
      __Pyx_GIVEREF(__pyx_v_target);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_target);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2195
 *         return outputs, gradient
 * 
 *     def _expandvec(self, vec, inivec, fixed):             # <<<<<<<<<<<<<<
 *         index = 0
 *         target = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._expandvec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XDECREF(__pyx_v_inivalue);
  __Pyx_XDECREF(__pyx_v_fix);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2207
 *         return asarray(target)
 * 
 *     def _reducevec(self, vec, fixed):             # <<<<<<<<<<<<<<
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_171_reducevec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_171_reducevec = {"_reducevec", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_171_reducevec, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_171_reducevec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_vec = 0;
  PyObject *__pyx_v_fixed = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_reducevec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vec,&__pyx_n_s_fixed,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_reducevec", 1, 3, 3, 1); __PYX_ERR(0, 2207, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixed)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_reducevec", 1, 3, 3, 2); __PYX_ERR(0, 2207, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_reducevec") < 0)) __PYX_ERR(0, 2207, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_vec = values[1];
    __pyx_v_fixed = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_reducevec", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2207, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._reducevec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_170_reducevec(__pyx_self, __pyx_v_self, __pyx_v_vec, __pyx_v_fixed);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_170_reducevec(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_fixed) {
  PyObject *__pyx_9genexpr11__pyx_v_test = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_t_13;
  __Pyx_RefNannySetupContext("_reducevec", 0);

  /* "metaphor/monal/driver/_driver.py":2208
 * 
 *     def _reducevec(self, vec, fixed):
 *         return asarray([val for test, val in zip(fixed, vec) if not test])             # <<<<<<<<<<<<<<
 * 
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2208, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2208, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_fixed);
    __Pyx_GIVEREF(__pyx_v_fixed);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fixed);
    __Pyx_INCREF(__pyx_v_vec);
    __Pyx_GIVEREF(__pyx_v_vec);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_vec);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2208, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2208, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2208, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2208, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2208, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2208, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2208, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2208, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2208, __pyx_L5_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2208, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2208, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2208, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2208, __pyx_L5_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2208, __pyx_L5_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_test, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_val, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_9genexpr11__pyx_v_test); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2208, __pyx_L5_error)
      __pyx_t_13 = ((!__pyx_t_12) != 0);
      if (__pyx_t_13) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr11__pyx_v_val))) __PYX_ERR(0, 2208, __pyx_L5_error)
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_test); __pyx_9genexpr11__pyx_v_test = 0;
    __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_val); __pyx_9genexpr11__pyx_v_val = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_test); __pyx_9genexpr11__pyx_v_test = 0;
    __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_val); __pyx_9genexpr11__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2207
 *         return asarray(target)
 * 
 *     def _reducevec(self, vec, fixed):             # <<<<<<<<<<<<<<
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._reducevec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_test);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2210
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         res = self.inputTrainFunc(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 *         return npsum(res**2)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_173inputTrainCost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_173inputTrainCost = {"inputTrainCost", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_173inputTrainCost, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_173inputTrainCost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputsloc = 0;
  PyObject *__pyx_v_inputini = 0;
  PyObject *__pyx_v_fixedinputs = 0;
  PyObject *__pyx_v_outputtarget = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputTrainCost (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputsloc,&__pyx_n_s_inputini,&__pyx_n_s_fixedinputs,&__pyx_n_s_outputtarget,&__pyx_n_s_modelindex,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputsloc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainCost", 1, 6, 6, 1); __PYX_ERR(0, 2210, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputini)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainCost", 1, 6, 6, 2); __PYX_ERR(0, 2210, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedinputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainCost", 1, 6, 6, 3); __PYX_ERR(0, 2210, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputtarget)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainCost", 1, 6, 6, 4); __PYX_ERR(0, 2210, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainCost", 1, 6, 6, 5); __PYX_ERR(0, 2210, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputTrainCost") < 0)) __PYX_ERR(0, 2210, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_inputsloc = values[1];
    __pyx_v_inputini = values[2];
    __pyx_v_fixedinputs = values[3];
    __pyx_v_outputtarget = values[4];
    __pyx_v_modelindex = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputTrainCost", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2210, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_172inputTrainCost(__pyx_self, __pyx_v_self, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_172inputTrainCost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("inputTrainCost", 0);

  /* "metaphor/monal/driver/_driver.py":2211
 * 
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):
 *         res = self.inputTrainFunc(inputsloc, inputini, fixedinputs, outputtarget, modelindex)             # <<<<<<<<<<<<<<
 *         return npsum(res**2)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputTrainFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputsloc);
    __Pyx_GIVEREF(__pyx_v_inputsloc);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_inputsloc);
    __Pyx_INCREF(__pyx_v_inputini);
    __Pyx_GIVEREF(__pyx_v_inputini);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_inputini);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_fixedinputs);
    __Pyx_INCREF(__pyx_v_outputtarget);
    __Pyx_GIVEREF(__pyx_v_outputtarget);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_outputtarget);
    __Pyx_INCREF(__pyx_v_modelindex);
    __Pyx_GIVEREF(__pyx_v_modelindex);
    PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_modelindex);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2212
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):
 *         res = self.inputTrainFunc(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 *         return npsum(res**2)             # <<<<<<<<<<<<<<
 * 
 *     def inputTrainFunc(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Power(__pyx_v_res, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2212, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2210
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         res = self.inputTrainFunc(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 *         return npsum(res**2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2214
 *         return npsum(res**2)
 * 
 *     def inputTrainFunc(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         """Cost function for input reverse computation
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_175inputTrainFunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_174inputTrainFunc[] = "Cost function for input reverse computation\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_175inputTrainFunc = {"inputTrainFunc", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_175inputTrainFunc, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_174inputTrainFunc};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_175inputTrainFunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputsloc = 0;
  PyObject *__pyx_v_inputini = 0;
  PyObject *__pyx_v_fixedinputs = 0;
  PyObject *__pyx_v_outputtarget = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputTrainFunc (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputsloc,&__pyx_n_s_inputini,&__pyx_n_s_fixedinputs,&__pyx_n_s_outputtarget,&__pyx_n_s_modelindex,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputsloc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainFunc", 1, 6, 6, 1); __PYX_ERR(0, 2214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputini)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainFunc", 1, 6, 6, 2); __PYX_ERR(0, 2214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedinputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainFunc", 1, 6, 6, 3); __PYX_ERR(0, 2214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputtarget)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainFunc", 1, 6, 6, 4); __PYX_ERR(0, 2214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainFunc", 1, 6, 6, 5); __PYX_ERR(0, 2214, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputTrainFunc") < 0)) __PYX_ERR(0, 2214, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_inputsloc = values[1];
    __pyx_v_inputini = values[2];
    __pyx_v_fixedinputs = values[3];
    __pyx_v_outputtarget = values[4];
    __pyx_v_modelindex = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputTrainFunc", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2214, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_174inputTrainFunc(__pyx_self, __pyx_v_self, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2223
 *             outputs = [outputs]
 *         if modelindex == -1:
 *             result = reduce(lambda x, y: x + y, outputs) / float(len(outputs))             # <<<<<<<<<<<<<<
 *         else:
 *             result = outputs
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_14inputTrainFunc_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_14inputTrainFunc_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_14inputTrainFunc_lambda1, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_14inputTrainFunc_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, 1); __PYX_ERR(0, 2223, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) __PYX_ERR(0, 2223, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2223, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainFunc.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainFunc.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2214
 *         return npsum(res**2)
 * 
 *     def inputTrainFunc(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         """Cost function for input reverse computation
 *         """
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_174inputTrainFunc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_v_fullinputs = NULL;
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  __Pyx_RefNannySetupContext("inputTrainFunc", 0);

  /* "metaphor/monal/driver/_driver.py":2217
 *         """Cost function for input reverse computation
 *         """
 *         fullinputs = self._expandvec(inputsloc, inputini, fixedinputs)             # <<<<<<<<<<<<<<
 * 
 *         outputs = self.transferExtra(fullinputs, donorm=False, modelindex=modelindex)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_expandvec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputsloc);
    __Pyx_GIVEREF(__pyx_v_inputsloc);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_inputsloc);
    __Pyx_INCREF(__pyx_v_inputini);
    __Pyx_GIVEREF(__pyx_v_inputini);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_inputini);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_fixedinputs);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_fullinputs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2219
 *         fullinputs = self._expandvec(inputsloc, inputini, fixedinputs)
 * 
 *         outputs = self.transferExtra(fullinputs, donorm=False, modelindex=modelindex)             # <<<<<<<<<<<<<<
 *         if isinstance(outputs, float):
 *             outputs = [outputs]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferExtra); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_fullinputs);
  __Pyx_GIVEREF(__pyx_v_fullinputs);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fullinputs);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_donorm, Py_False) < 0) __PYX_ERR(0, 2219, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_modelindex, __pyx_v_modelindex) < 0) __PYX_ERR(0, 2219, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_outputs = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":2220
 * 
 *         outputs = self.transferExtra(fullinputs, donorm=False, modelindex=modelindex)
 *         if isinstance(outputs, float):             # <<<<<<<<<<<<<<
 *             outputs = [outputs]
 *         if modelindex == -1:
 */
  __pyx_t_6 = PyFloat_Check(__pyx_v_outputs); 
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":2221
 *         outputs = self.transferExtra(fullinputs, donorm=False, modelindex=modelindex)
 *         if isinstance(outputs, float):
 *             outputs = [outputs]             # <<<<<<<<<<<<<<
 *         if modelindex == -1:
 *             result = reduce(lambda x, y: x + y, outputs) / float(len(outputs))
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_outputs);
    __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2220
 * 
 *         outputs = self.transferExtra(fullinputs, donorm=False, modelindex=modelindex)
 *         if isinstance(outputs, float):             # <<<<<<<<<<<<<<
 *             outputs = [outputs]
 *         if modelindex == -1:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2222
 *         if isinstance(outputs, float):
 *             outputs = [outputs]
 *         if modelindex == -1:             # <<<<<<<<<<<<<<
 *             result = reduce(lambda x, y: x + y, outputs) / float(len(outputs))
 *         else:
 */
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_modelindex, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "metaphor/monal/driver/_driver.py":2223
 *             outputs = [outputs]
 *         if modelindex == -1:
 *             result = reduce(lambda x, y: x + y, outputs) / float(len(outputs))             # <<<<<<<<<<<<<<
 *         else:
 *             result = outputs
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_reduce); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_14inputTrainFunc_lambda1, 0, __pyx_n_s_Driver_inputTrainFunc_locals_lam, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_v_outputs};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_v_outputs};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_outputs);
      __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = PyObject_Length(__pyx_v_outputs); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2223, __pyx_L1_error)
    __pyx_t_5 = PyFloat_FromDouble(((double)__pyx_t_9)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_result = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":2222
 *         if isinstance(outputs, float):
 *             outputs = [outputs]
 *         if modelindex == -1:             # <<<<<<<<<<<<<<
 *             result = reduce(lambda x, y: x + y, outputs) / float(len(outputs))
 *         else:
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":2225
 *             result = reduce(lambda x, y: x + y, outputs) / float(len(outputs))
 *         else:
 *             result = outputs             # <<<<<<<<<<<<<<
 *         return asarray([result - outputtarget])
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_outputs);
    __pyx_v_result = __pyx_v_outputs;
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":2226
 *         else:
 *             result = outputs
 *         return asarray([result - outputtarget])             # <<<<<<<<<<<<<<
 * 
 *     def inputTrainGrad(self, inputsloc, inputini, fixedinputs,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_result, __pyx_v_outputtarget); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_8);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2214
 *         return npsum(res**2)
 * 
 *     def inputTrainFunc(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         """Cost function for input reverse computation
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fullinputs);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2228
 *         return asarray([result - outputtarget])
 * 
 *     def inputTrainGrad(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         jacob, residual = self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_177inputTrainGrad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_177inputTrainGrad = {"inputTrainGrad", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_177inputTrainGrad, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_177inputTrainGrad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputsloc = 0;
  PyObject *__pyx_v_inputini = 0;
  PyObject *__pyx_v_fixedinputs = 0;
  PyObject *__pyx_v_outputtarget = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputTrainGrad (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputsloc,&__pyx_n_s_inputini,&__pyx_n_s_fixedinputs,&__pyx_n_s_outputtarget,&__pyx_n_s_modelindex,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputsloc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainGrad", 1, 6, 6, 1); __PYX_ERR(0, 2228, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputini)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainGrad", 1, 6, 6, 2); __PYX_ERR(0, 2228, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedinputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainGrad", 1, 6, 6, 3); __PYX_ERR(0, 2228, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputtarget)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainGrad", 1, 6, 6, 4); __PYX_ERR(0, 2228, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainGrad", 1, 6, 6, 5); __PYX_ERR(0, 2228, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputTrainGrad") < 0)) __PYX_ERR(0, 2228, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_inputsloc = values[1];
    __pyx_v_inputini = values[2];
    __pyx_v_fixedinputs = values[3];
    __pyx_v_outputtarget = values[4];
    __pyx_v_modelindex = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputTrainGrad", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2228, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainGrad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_176inputTrainGrad(__pyx_self, __pyx_v_self, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_176inputTrainGrad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_v_jacob = NULL;
  PyObject *__pyx_v_residual = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannySetupContext("inputTrainGrad", 0);

  /* "metaphor/monal/driver/_driver.py":2230
 *     def inputTrainGrad(self, inputsloc, inputini, fixedinputs,
 *         outputtarget, modelindex):
 *         jacob, residual = self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)             # <<<<<<<<<<<<<<
 *         return npsum(jacob, axis=0) * residual
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputTrainPrimeFull); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputsloc);
    __Pyx_GIVEREF(__pyx_v_inputsloc);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_inputsloc);
    __Pyx_INCREF(__pyx_v_inputini);
    __Pyx_GIVEREF(__pyx_v_inputini);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_inputini);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_fixedinputs);
    __Pyx_INCREF(__pyx_v_outputtarget);
    __Pyx_GIVEREF(__pyx_v_outputtarget);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_outputtarget);
    __Pyx_INCREF(__pyx_v_modelindex);
    __Pyx_GIVEREF(__pyx_v_modelindex);
    PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_modelindex);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2230, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2230, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2230, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_jacob = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_residual = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2231
 *         outputtarget, modelindex):
 *         jacob, residual = self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 *         return npsum(jacob, axis=0) * residual             # <<<<<<<<<<<<<<
 * 
 *     def inputTrainPrime(self, inputsloc, inputini, fixedinputs,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_npsum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_jacob);
  __Pyx_GIVEREF(__pyx_v_jacob);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_jacob);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2231, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_v_residual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2228
 *         return asarray([result - outputtarget])
 * 
 *     def inputTrainGrad(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         jacob, residual = self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainGrad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_jacob);
  __Pyx_XDECREF(__pyx_v_residual);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2233
 *         return npsum(jacob, axis=0) * residual
 * 
 *     def inputTrainPrime(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_179inputTrainPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_178inputTrainPrime[] = "Prime function for input reverse computation\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_179inputTrainPrime = {"inputTrainPrime", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_179inputTrainPrime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_178inputTrainPrime};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_179inputTrainPrime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputsloc = 0;
  PyObject *__pyx_v_inputini = 0;
  PyObject *__pyx_v_fixedinputs = 0;
  PyObject *__pyx_v_outputtarget = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputTrainPrime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputsloc,&__pyx_n_s_inputini,&__pyx_n_s_fixedinputs,&__pyx_n_s_outputtarget,&__pyx_n_s_modelindex,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputsloc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrime", 1, 6, 6, 1); __PYX_ERR(0, 2233, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputini)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrime", 1, 6, 6, 2); __PYX_ERR(0, 2233, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedinputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrime", 1, 6, 6, 3); __PYX_ERR(0, 2233, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputtarget)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrime", 1, 6, 6, 4); __PYX_ERR(0, 2233, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrime", 1, 6, 6, 5); __PYX_ERR(0, 2233, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputTrainPrime") < 0)) __PYX_ERR(0, 2233, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_inputsloc = values[1];
    __pyx_v_inputini = values[2];
    __pyx_v_fixedinputs = values[3];
    __pyx_v_outputtarget = values[4];
    __pyx_v_modelindex = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputTrainPrime", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_178inputTrainPrime(__pyx_self, __pyx_v_self, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_178inputTrainPrime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("inputTrainPrime", 0);

  /* "metaphor/monal/driver/_driver.py":2237
 *         """Prime function for input reverse computation
 *         """
 *         return self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)[0]             # <<<<<<<<<<<<<<
 * 
 *     def inputTrainPrimeFull(self, inputsloc, inputini, fixedinputs,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputTrainPrimeFull); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2237, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2237, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputsloc);
    __Pyx_GIVEREF(__pyx_v_inputsloc);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_inputsloc);
    __Pyx_INCREF(__pyx_v_inputini);
    __Pyx_GIVEREF(__pyx_v_inputini);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_inputini);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_fixedinputs);
    __Pyx_INCREF(__pyx_v_outputtarget);
    __Pyx_GIVEREF(__pyx_v_outputtarget);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_outputtarget);
    __Pyx_INCREF(__pyx_v_modelindex);
    __Pyx_GIVEREF(__pyx_v_modelindex);
    PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_modelindex);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2233
 *         return npsum(jacob, axis=0) * residual
 * 
 *     def inputTrainPrime(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2239
 *         return self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)[0]
 * 
 *     def inputTrainPrimeFull(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_181inputTrainPrimeFull(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_180inputTrainPrimeFull[] = "Prime function for input reverse computation\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_181inputTrainPrimeFull = {"inputTrainPrimeFull", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_181inputTrainPrimeFull, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_180inputTrainPrimeFull};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_181inputTrainPrimeFull(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputsloc = 0;
  PyObject *__pyx_v_inputini = 0;
  PyObject *__pyx_v_fixedinputs = 0;
  PyObject *__pyx_v_outputtarget = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inputTrainPrimeFull (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputsloc,&__pyx_n_s_inputini,&__pyx_n_s_fixedinputs,&__pyx_n_s_outputtarget,&__pyx_n_s_modelindex,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputsloc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrimeFull", 1, 6, 6, 1); __PYX_ERR(0, 2239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputini)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrimeFull", 1, 6, 6, 2); __PYX_ERR(0, 2239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedinputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrimeFull", 1, 6, 6, 3); __PYX_ERR(0, 2239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputtarget)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrimeFull", 1, 6, 6, 4); __PYX_ERR(0, 2239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inputTrainPrimeFull", 1, 6, 6, 5); __PYX_ERR(0, 2239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inputTrainPrimeFull") < 0)) __PYX_ERR(0, 2239, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_inputsloc = values[1];
    __pyx_v_inputini = values[2];
    __pyx_v_fixedinputs = values[3];
    __pyx_v_outputtarget = values[4];
    __pyx_v_modelindex = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inputTrainPrimeFull", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2239, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_180inputTrainPrimeFull(__pyx_self, __pyx_v_self, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs, __pyx_v_outputtarget, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2253
 *             outs = [outs]
 *         if modelindex == -1:
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))             # <<<<<<<<<<<<<<
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))
 *         else:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_lambda2 = {"lambda2", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_lambda2, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); __PYX_ERR(0, 2253, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda2") < 0)) __PYX_ERR(0, 2253, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2253, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2254
 *         if modelindex == -1:
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))             # <<<<<<<<<<<<<<
 *         else:
 *             ingrad = ingrads[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_1lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_1lambda3 = {"lambda3", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_1lambda3, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_1lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, 1); __PYX_ERR(0, 2254, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda3") < 0)) __PYX_ERR(0, 2254, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2254, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2239
 *         return self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)[0]
 * 
 *     def inputTrainPrimeFull(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_180inputTrainPrimeFull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputsloc, PyObject *__pyx_v_inputini, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_v_fullinputs = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_outs = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_ingrads = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_ingrad = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_residual = NULL;
  PyObject *__pyx_v_trueGradList = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __Pyx_RefNannySetupContext("inputTrainPrimeFull", 0);

  /* "metaphor/monal/driver/_driver.py":2243
 *         """Prime function for input reverse computation
 *         """
 *         fullinputs = self._expandvec(inputsloc, inputini, fixedinputs)             # <<<<<<<<<<<<<<
 * 
 *         result = self.transferExtra(fullinputs, style=C.TFR_GRADIENTINPUTS, donorm=False, modelindex=modelindex)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_expandvec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2243, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_inputsloc, __pyx_v_inputini, __pyx_v_fixedinputs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2243, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputsloc);
    __Pyx_GIVEREF(__pyx_v_inputsloc);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_inputsloc);
    __Pyx_INCREF(__pyx_v_inputini);
    __Pyx_GIVEREF(__pyx_v_inputini);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_inputini);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_fixedinputs);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_fullinputs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2245
 *         fullinputs = self._expandvec(inputsloc, inputini, fixedinputs)
 * 
 *         result = self.transferExtra(fullinputs, style=C.TFR_GRADIENTINPUTS, donorm=False, modelindex=modelindex)             # <<<<<<<<<<<<<<
 *         try:
 *             outs, _, ingrads = result
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferExtra); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_fullinputs);
  __Pyx_GIVEREF(__pyx_v_fullinputs);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fullinputs);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TFR_GRADIENTINPUTS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_style, __pyx_t_6) < 0) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_donorm, Py_False) < 0) __PYX_ERR(0, 2245, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_modelindex, __pyx_v_modelindex) < 0) __PYX_ERR(0, 2245, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2246
 * 
 *         result = self.transferExtra(fullinputs, style=C.TFR_GRADIENTINPUTS, donorm=False, modelindex=modelindex)
 *         try:             # <<<<<<<<<<<<<<
 *             outs, _, ingrads = result
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":2247
 *         result = self.transferExtra(fullinputs, style=C.TFR_GRADIENTINPUTS, donorm=False, modelindex=modelindex)
 *         try:
 *             outs, _, ingrads = result             # <<<<<<<<<<<<<<
 *         except:
 *             outs, _, ingrads = result[0]
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
        PyObject* sequence = __pyx_v_result;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2247, __pyx_L3_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2247, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 2; __pyx_t_2 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_1), 3) < 0) __PYX_ERR(0, 2247, __pyx_L3_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L10_unpacking_done;
        __pyx_L9_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2247, __pyx_L3_error)
        __pyx_L10_unpacking_done:;
      }
      __pyx_v_outs = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_v__ = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_ingrads = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2246
 * 
 *         result = self.transferExtra(fullinputs, style=C.TFR_GRADIENTINPUTS, donorm=False, modelindex=modelindex)
 *         try:             # <<<<<<<<<<<<<<
 *             outs, _, ingrads = result
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2248
 *         try:
 *             outs, _, ingrads = result
 *         except:             # <<<<<<<<<<<<<<
 *             outs, _, ingrads = result[0]
 *         if isinstance(outs, float):
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 2248, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/monal/driver/_driver.py":2249
 *             outs, _, ingrads = result
 *         except:
 *             outs, _, ingrads = result[0]             # <<<<<<<<<<<<<<
 *         if isinstance(outs, float):
 *             outs = [outs]
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2249, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2249, __pyx_L5_except_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_12 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2249, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2249, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2249, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2249, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = Py_TYPE(__pyx_t_13)->tp_iternext;
        index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_11 = __pyx_t_10(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_11);
        index = 2; __pyx_t_12 = __pyx_t_10(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_13), 3) < 0) __PYX_ERR(0, 2249, __pyx_L5_except_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L14_unpacking_done;
        __pyx_L13_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2249, __pyx_L5_except_error)
        __pyx_L14_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_outs, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ingrads, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":2246
 * 
 *         result = self.transferExtra(fullinputs, style=C.TFR_GRADIENTINPUTS, donorm=False, modelindex=modelindex)
 *         try:             # <<<<<<<<<<<<<<
 *             outs, _, ingrads = result
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    __pyx_L8_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":2250
 *         except:
 *             outs, _, ingrads = result[0]
 *         if isinstance(outs, float):             # <<<<<<<<<<<<<<
 *             outs = [outs]
 *         if modelindex == -1:
 */
  __pyx_t_14 = PyFloat_Check(__pyx_v_outs); 
  __pyx_t_15 = (__pyx_t_14 != 0);
  if (__pyx_t_15) {

    /* "metaphor/monal/driver/_driver.py":2251
 *             outs, _, ingrads = result[0]
 *         if isinstance(outs, float):
 *             outs = [outs]             # <<<<<<<<<<<<<<
 *         if modelindex == -1:
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))
 */
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_outs);
    __Pyx_GIVEREF(__pyx_v_outs);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_outs);
    __Pyx_DECREF_SET(__pyx_v_outs, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2250
 *         except:
 *             outs, _, ingrads = result[0]
 *         if isinstance(outs, float):             # <<<<<<<<<<<<<<
 *             outs = [outs]
 *         if modelindex == -1:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2252
 *         if isinstance(outs, float):
 *             outs = [outs]
 *         if modelindex == -1:             # <<<<<<<<<<<<<<
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))
 */
  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_modelindex, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_15) {

    /* "metaphor/monal/driver/_driver.py":2253
 *             outs = [outs]
 *         if modelindex == -1:
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))             # <<<<<<<<<<<<<<
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))
 *         else:
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_reduce); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_lambda2, 0, __pyx_n_s_Driver_inputTrainPrimeFull_local, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_v_ingrads};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_v_ingrads};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_4, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_ingrads);
      __Pyx_GIVEREF(__pyx_v_ingrads);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_4, __pyx_v_ingrads);
      __pyx_t_2 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_16 = PyObject_Length(__pyx_v_ingrads); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2253, __pyx_L1_error)
    __pyx_t_5 = PyFloat_FromDouble(((double)__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_ingrad = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "metaphor/monal/driver/_driver.py":2254
 *         if modelindex == -1:
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))             # <<<<<<<<<<<<<<
 *         else:
 *             ingrad = ingrads[0]
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_reduce); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_19inputTrainPrimeFull_1lambda3, 0, __pyx_n_s_Driver_inputTrainPrimeFull_local, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_v_outs};
      __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2254, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_v_outs};
      __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2254, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_4, __pyx_t_6);
      __Pyx_INCREF(__pyx_v_outs);
      __Pyx_GIVEREF(__pyx_v_outs);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_4, __pyx_v_outs);
      __pyx_t_6 = 0;
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_16 = PyObject_Length(__pyx_v_outs); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2254, __pyx_L1_error)
    __pyx_t_5 = PyFloat_FromDouble(((double)__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_12, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_out = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2252
 *         if isinstance(outs, float):
 *             outs = [outs]
 *         if modelindex == -1:             # <<<<<<<<<<<<<<
 *             ingrad = reduce(lambda x, y: x + y, ingrads) / float(len(ingrads))
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))
 */
    goto __pyx_L16;
  }

  /* "metaphor/monal/driver/_driver.py":2256
 *             out = reduce(lambda x, y: x + y, outs) / float(len(outs))
 *         else:
 *             ingrad = ingrads[0]             # <<<<<<<<<<<<<<
 *             out = outs[0]
 *         residual = out - outputtarget
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ingrads, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_ingrad = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2257
 *         else:
 *             ingrad = ingrads[0]
 *             out = outs[0]             # <<<<<<<<<<<<<<
 *         residual = out - outputtarget
 *         trueGradList = self._reducevec(ingrads, fixedinputs)
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_outs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_out = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L16:;

  /* "metaphor/monal/driver/_driver.py":2258
 *             ingrad = ingrads[0]
 *             out = outs[0]
 *         residual = out - outputtarget             # <<<<<<<<<<<<<<
 *         trueGradList = self._reducevec(ingrads, fixedinputs)
 *         return asarray([trueGradList]), residual
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_out, __pyx_v_outputtarget); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_residual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2259
 *             out = outs[0]
 *         residual = out - outputtarget
 *         trueGradList = self._reducevec(ingrads, fixedinputs)             # <<<<<<<<<<<<<<
 *         return asarray([trueGradList]), residual
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reducevec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_ingrads, __pyx_v_fixedinputs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_ingrads, __pyx_v_fixedinputs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_12) {
      __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL;
    }
    __Pyx_INCREF(__pyx_v_ingrads);
    __Pyx_GIVEREF(__pyx_v_ingrads);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_v_ingrads);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_fixedinputs);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_trueGradList = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2260
 *         residual = out - outputtarget
 *         trueGradList = self._reducevec(ingrads, fixedinputs)
 *         return asarray([trueGradList]), residual             # <<<<<<<<<<<<<<
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_trueGradList);
  __Pyx_GIVEREF(__pyx_v_trueGradList);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_trueGradList);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_12) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12); __pyx_t_12 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_residual);
  __Pyx_GIVEREF(__pyx_v_residual);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_residual);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2239
 *         return self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)[0]
 * 
 *     def inputTrainPrimeFull(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.inputTrainPrimeFull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fullinputs);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_outs);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_ingrads);
  __Pyx_XDECREF(__pyx_v_ingrad);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_residual);
  __Pyx_XDECREF(__pyx_v_trueGradList);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2262
 *         return asarray([trueGradList]), residual
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,             # <<<<<<<<<<<<<<
 *         epochs=None, modelindex=-1, callback=None, debug=0, verbose=0):
 *         """Obtain the result of model reverse transfer.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_183reverse_train(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_182reverse_train[] = "Obtain the result of model reverse transfer.\n        \n        Parameters:\n        \n         - outputtarget -> output value target.\n         - inputs -> initial input values. It may be a vector-like, a dictionary or None:\n             - vector-like : vector of the initial input values, in the order of the inputs.\n             - dictionary: initial input value for each input name.\n             - None : no new initial input values (default).\n         - fixedinputs -> fixed input values.  It may be a vector-like, a dictionary or None:\n             - vector-like : vector of boolean values, in the order of the inputs.\n             - dictionary : each input may be fixed (or not) by its name. A missing input is considered as free.\n             - None : all input values are free\n         - acc -> accuracy of targetting. Optimizing computation is stopped as soon as this accuracy is obtained, no matter the epochs value.\n         - epochs -> maximum number of optimizing computation epochs.\n         - callback -> callback function. It takes a current index as parameter.\n         - modelindex -> if -1, the computation take into account all the extra weights. Otherwise, if positive, give the index of the model used.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_183reverse_train = {"reverse_train", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_183reverse_train, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_182reverse_train};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_183reverse_train(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_outputtarget = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_fixedinputs = 0;
  PyObject *__pyx_v_epochs = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_debug = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reverse_train (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_outputtarget,&__pyx_n_s_inputs,&__pyx_n_s_fixedinputs,&__pyx_n_s_epochs,&__pyx_n_s_modelindex,&__pyx_n_s_callback_2,&__pyx_n_s_debug,&__pyx_n_s_verbose,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));

    /* "metaphor/monal/driver/_driver.py":2263
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,
 *         epochs=None, modelindex=-1, callback=None, debug=0, verbose=0):             # <<<<<<<<<<<<<<
 *         """Obtain the result of model reverse transfer.
 * 
 */
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    values[7] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[8] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputtarget)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reverse_train", 0, 2, 9, 1); __PYX_ERR(0, 2262, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fixedinputs);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_epochs);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback_2);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_debug);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[8] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reverse_train") < 0)) __PYX_ERR(0, 2262, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_outputtarget = values[1];
    __pyx_v_inputs = values[2];
    __pyx_v_fixedinputs = values[3];
    __pyx_v_epochs = values[4];
    __pyx_v_modelindex = values[5];
    __pyx_v_callback = values[6];
    __pyx_v_debug = values[7];
    __pyx_v_verbose = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reverse_train", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2262, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.reverse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_182reverse_train(__pyx_self, __pyx_v_self, __pyx_v_outputtarget, __pyx_v_inputs, __pyx_v_fixedinputs, __pyx_v_epochs, __pyx_v_modelindex, __pyx_v_callback, __pyx_v_debug, __pyx_v_verbose);

  /* "metaphor/monal/driver/_driver.py":2262
 *         return asarray([trueGradList]), residual
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,             # <<<<<<<<<<<<<<
 *         epochs=None, modelindex=-1, callback=None, debug=0, verbose=0):
 *         """Obtain the result of model reverse transfer.
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_182reverse_train(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_outputtarget, PyObject *__pyx_v_inputs, PyObject *__pyx_v_fixedinputs, PyObject *__pyx_v_epochs, PyObject *__pyx_v_modelindex, PyObject *__pyx_v_callback, PyObject *__pyx_v_debug, PyObject *__pyx_v_verbose) {
  CYTHON_UNUSED double __pyx_v_acc;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_inname = NULL;
  PyObject *__pyx_v_inputini = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_factor = NULL;
  PyObject *__pyx_v_reducedinputs = NULL;
  PyObject *__pyx_v_newreducedinputs = NULL;
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_newinputs = NULL;
  CYTHON_UNUSED PyObject *__pyx_9genexpr12__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("reverse_train", 0);
  __Pyx_INCREF(__pyx_v_outputtarget);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_INCREF(__pyx_v_fixedinputs);

  /* "metaphor/monal/driver/_driver.py":2282
 *          - modelindex -> if -1, the computation take into account all the extra weights. Otherwise, if positive, give the index of the model used.
 *         """
 *         if not self.inputCount:             # <<<<<<<<<<<<<<
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")
 *         acc=1.49012e-08
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "metaphor/monal/driver/_driver.py":2283
 *         """
 *         if not self.inputCount:
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")             # <<<<<<<<<<<<<<
 *         acc=1.49012e-08
 *         if fixedinputs is None:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2283, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2282
 *          - modelindex -> if -1, the computation take into account all the extra weights. Otherwise, if positive, give the index of the model used.
 *         """
 *         if not self.inputCount:             # <<<<<<<<<<<<<<
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")
 *         acc=1.49012e-08
 */
  }

  /* "metaphor/monal/driver/_driver.py":2284
 *         if not self.inputCount:
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")
 *         acc=1.49012e-08             # <<<<<<<<<<<<<<
 *         if fixedinputs is None:
 *             fixedinputs = [0 for _ in range(self.inputCount)]
 */
  __pyx_v_acc = 1.49012e-08;

  /* "metaphor/monal/driver/_driver.py":2285
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")
 *         acc=1.49012e-08
 *         if fixedinputs is None:             # <<<<<<<<<<<<<<
 *             fixedinputs = [0 for _ in range(self.inputCount)]
 *         if isinstance(fixedinputs, dict):
 */
  __pyx_t_3 = (__pyx_v_fixedinputs == Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2286
 *         acc=1.49012e-08
 *         if fixedinputs is None:
 *             fixedinputs = [0 for _ in range(self.inputCount)]             # <<<<<<<<<<<<<<
 *         if isinstance(fixedinputs, dict):
 *             lst = []
 */
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2286, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2286, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2286, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2286, __pyx_L7_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2286, __pyx_L7_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2286, __pyx_L7_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_7(__pyx_t_1);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2286, __pyx_L7_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v__, __pyx_t_5);
        __pyx_t_5 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 2286, __pyx_L7_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v__); __pyx_9genexpr12__pyx_v__ = 0;
      goto __pyx_L10_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v__); __pyx_9genexpr12__pyx_v__ = 0;
      goto __pyx_L1_error;
      __pyx_L10_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_fixedinputs, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2285
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")
 *         acc=1.49012e-08
 *         if fixedinputs is None:             # <<<<<<<<<<<<<<
 *             fixedinputs = [0 for _ in range(self.inputCount)]
 *         if isinstance(fixedinputs, dict):
 */
  }

  /* "metaphor/monal/driver/_driver.py":2287
 *         if fixedinputs is None:
 *             fixedinputs = [0 for _ in range(self.inputCount)]
 *         if isinstance(fixedinputs, dict):             # <<<<<<<<<<<<<<
 *             lst = []
 *             for inname in self.inputNames:
 */
  __pyx_t_2 = PyDict_Check(__pyx_v_fixedinputs); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2288
 *             fixedinputs = [0 for _ in range(self.inputCount)]
 *         if isinstance(fixedinputs, dict):
 *             lst = []             # <<<<<<<<<<<<<<
 *             for inname in self.inputNames:
 *                 if inname in fixedinputs:
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_lst = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2289
 *         if isinstance(fixedinputs, dict):
 *             lst = []
 *             for inname in self.inputNames:             # <<<<<<<<<<<<<<
 *                 if inname in fixedinputs:
 *                     lst.append(fixedinputs[inname])
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2289, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2289, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2289, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_1);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2289, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_inname, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2290
 *             lst = []
 *             for inname in self.inputNames:
 *                 if inname in fixedinputs:             # <<<<<<<<<<<<<<
 *                     lst.append(fixedinputs[inname])
 *                 else:
 */
      __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_inname, __pyx_v_fixedinputs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2290, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_3 != 0);
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":2291
 *             for inname in self.inputNames:
 *                 if inname in fixedinputs:
 *                     lst.append(fixedinputs[inname])             # <<<<<<<<<<<<<<
 *                 else:
 *                     lst.append(0)
 */
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_fixedinputs, __pyx_v_inname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 2291, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2290
 *             lst = []
 *             for inname in self.inputNames:
 *                 if inname in fixedinputs:             # <<<<<<<<<<<<<<
 *                     lst.append(fixedinputs[inname])
 *                 else:
 */
        goto __pyx_L14;
      }

      /* "metaphor/monal/driver/_driver.py":2293
 *                     lst.append(fixedinputs[inname])
 *                 else:
 *                     lst.append(0)             # <<<<<<<<<<<<<<
 *             fixedinputs = lst
 *         if inputs is None:
 */
      /*else*/ {
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_int_0); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 2293, __pyx_L1_error)
      }
      __pyx_L14:;

      /* "metaphor/monal/driver/_driver.py":2289
 *         if isinstance(fixedinputs, dict):
 *             lst = []
 *             for inname in self.inputNames:             # <<<<<<<<<<<<<<
 *                 if inname in fixedinputs:
 *                     lst.append(fixedinputs[inname])
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2294
 *                 else:
 *                     lst.append(0)
 *             fixedinputs = lst             # <<<<<<<<<<<<<<
 *         if inputs is None:
 *             inputs = asarray(self.inputs)
 */
    __Pyx_INCREF(__pyx_v_lst);
    __Pyx_DECREF_SET(__pyx_v_fixedinputs, __pyx_v_lst);

    /* "metaphor/monal/driver/_driver.py":2287
 *         if fixedinputs is None:
 *             fixedinputs = [0 for _ in range(self.inputCount)]
 *         if isinstance(fixedinputs, dict):             # <<<<<<<<<<<<<<
 *             lst = []
 *             for inname in self.inputNames:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2295
 *                     lst.append(0)
 *             fixedinputs = lst
 *         if inputs is None:             # <<<<<<<<<<<<<<
 *             inputs = asarray(self.inputs)
 *         inputs = self.normalizeInputs(inputs)
 */
  __pyx_t_2 = (__pyx_v_inputs == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2296
 *             fixedinputs = lst
 *         if inputs is None:
 *             inputs = asarray(self.inputs)             # <<<<<<<<<<<<<<
 *         inputs = self.normalizeInputs(inputs)
 *         inputini = inputs[:]
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2295
 *                     lst.append(0)
 *             fixedinputs = lst
 *         if inputs is None:             # <<<<<<<<<<<<<<
 *             inputs = asarray(self.inputs)
 *         inputs = self.normalizeInputs(inputs)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2297
 *         if inputs is None:
 *             inputs = asarray(self.inputs)
 *         inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         inputini = inputs[:]
 *         outputtarget = self.unnormalizeOutputs(outputtarget, reverse=True)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_10) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_inputs};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_inputs};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
      __Pyx_INCREF(__pyx_v_inputs);
      __Pyx_GIVEREF(__pyx_v_inputs);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_inputs);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2298
 *             inputs = asarray(self.inputs)
 *         inputs = self.normalizeInputs(inputs)
 *         inputini = inputs[:]             # <<<<<<<<<<<<<<
 *         outputtarget = self.unnormalizeOutputs(outputtarget, reverse=True)
 *         args=(inputini, fixedinputs, outputtarget, modelindex)
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_inputs, 0, 0, NULL, NULL, &__pyx_slice__116, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_inputini = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2299
 *         inputs = self.normalizeInputs(inputs)
 *         inputini = inputs[:]
 *         outputtarget = self.unnormalizeOutputs(outputtarget, reverse=True)             # <<<<<<<<<<<<<<
 *         args=(inputini, fixedinputs, outputtarget, modelindex)
 *         factor = self.inputCount
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_outputtarget);
  __Pyx_GIVEREF(__pyx_v_outputtarget);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_outputtarget);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 2299, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_outputtarget, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "metaphor/monal/driver/_driver.py":2300
 *         inputini = inputs[:]
 *         outputtarget = self.unnormalizeOutputs(outputtarget, reverse=True)
 *         args=(inputini, fixedinputs, outputtarget, modelindex)             # <<<<<<<<<<<<<<
 *         factor = self.inputCount
 *         reducedinputs = self._reducevec(inputs, fixedinputs)
 */
  __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_v_inputini);
  __Pyx_GIVEREF(__pyx_v_inputini);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_inputini);
  __Pyx_INCREF(__pyx_v_fixedinputs);
  __Pyx_GIVEREF(__pyx_v_fixedinputs);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_fixedinputs);
  __Pyx_INCREF(__pyx_v_outputtarget);
  __Pyx_GIVEREF(__pyx_v_outputtarget);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_outputtarget);
  __Pyx_INCREF(__pyx_v_modelindex);
  __Pyx_GIVEREF(__pyx_v_modelindex);
  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_v_modelindex);
  __pyx_v_args = ((PyObject*)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "metaphor/monal/driver/_driver.py":2301
 *         outputtarget = self.unnormalizeOutputs(outputtarget, reverse=True)
 *         args=(inputini, fixedinputs, outputtarget, modelindex)
 *         factor = self.inputCount             # <<<<<<<<<<<<<<
 *         reducedinputs = self._reducevec(inputs, fixedinputs)
 * 
 */
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_v_factor = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "metaphor/monal/driver/_driver.py":2302
 *         args=(inputini, fixedinputs, outputtarget, modelindex)
 *         factor = self.inputCount
 *         reducedinputs = self._reducevec(inputs, fixedinputs)             # <<<<<<<<<<<<<<
 * 
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reducevec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_inputs, __pyx_v_fixedinputs};
    __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2302, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_10);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_inputs, __pyx_v_fixedinputs};
    __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2302, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_10);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_v_inputs);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_fixedinputs);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_reducedinputs = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "metaphor/monal/driver/_driver.py":2304
 *         reducedinputs = self._reducevec(inputs, fixedinputs)
 * 
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,             # <<<<<<<<<<<<<<
 *             self.inputTrainGrad, maxiter=epochs, disp=verbose >= 3, factor=factor,
 *             callback=callback)
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_optim_bfgs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputTrainCost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2305
 * 
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,
 *             self.inputTrainGrad, maxiter=epochs, disp=verbose >= 3, factor=factor,             # <<<<<<<<<<<<<<
 *             callback=callback)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inputTrainGrad); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "metaphor/monal/driver/_driver.py":2304
 *         reducedinputs = self._reducevec(inputs, fixedinputs)
 * 
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,             # <<<<<<<<<<<<<<
 *             self.inputTrainGrad, maxiter=epochs, disp=verbose >= 3, factor=factor,
 *             callback=callback)
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_INCREF(__pyx_v_reducedinputs);
  __Pyx_GIVEREF(__pyx_v_reducedinputs);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_reducedinputs);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_args);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2305
 * 
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,
 *             self.inputTrainGrad, maxiter=epochs, disp=verbose >= 3, factor=factor,             # <<<<<<<<<<<<<<
 *             callback=callback)
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_maxiter, __pyx_v_epochs) < 0) __PYX_ERR(0, 2305, __pyx_L1_error)
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_verbose, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2305, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_disp, __pyx_t_5) < 0) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_factor, __pyx_v_factor) < 0) __PYX_ERR(0, 2305, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2306
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,
 *             self.inputTrainGrad, maxiter=epochs, disp=verbose >= 3, factor=factor,
 *             callback=callback)             # <<<<<<<<<<<<<<
 * 
 *         if debug:
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_callback_2, __pyx_v_callback) < 0) __PYX_ERR(0, 2305, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2304
 *         reducedinputs = self._reducevec(inputs, fixedinputs)
 * 
 *         newreducedinputs, code = optim_bfgs(self.inputTrainCost, reducedinputs, args,             # <<<<<<<<<<<<<<
 *             self.inputTrainGrad, maxiter=epochs, disp=verbose >= 3, factor=factor,
 *             callback=callback)
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2304, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L16_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L16_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2304, __pyx_L1_error)
    __pyx_t_12 = NULL;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L17_unpacking_done;
    __pyx_L16_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_12 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2304, __pyx_L1_error)
    __pyx_L17_unpacking_done:;
  }
  __pyx_v_newreducedinputs = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_code = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2308
 *             callback=callback)
 * 
 *         if debug:             # <<<<<<<<<<<<<<
 *             if code & 1:
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_debug); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2308, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2309
 * 
 *         if debug:
 *             if code & 1:             # <<<<<<<<<<<<<<
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 *             if code & 2:
 */
    __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_v_code, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2309, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2310
 *         if debug:
 *             if code & 1:
 *                 print_('Information: no acceptable point found', file=sys.stderr)             # <<<<<<<<<<<<<<
 *             if code & 2:
 *                 print_('Information: accuracy reached', file=sys.stderr)
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_print_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_file, __pyx_t_10) < 0) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__117, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "metaphor/monal/driver/_driver.py":2309
 * 
 *         if debug:
 *             if code & 1:             # <<<<<<<<<<<<<<
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 *             if code & 2:
 */
    }

    /* "metaphor/monal/driver/_driver.py":2311
 *             if code & 1:
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 *             if code & 2:             # <<<<<<<<<<<<<<
 *                 print_('Information: accuracy reached', file=sys.stderr)
 *             if code & 4:
 */
    __pyx_t_10 = __Pyx_PyInt_AndObjC(__pyx_v_code, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2312
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 *             if code & 2:
 *                 print_('Information: accuracy reached', file=sys.stderr)             # <<<<<<<<<<<<<<
 *             if code & 4:
 *                 print_('Information: stop for maxiter', file=sys.stderr)
 */
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_print_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_file, __pyx_t_1) < 0) __PYX_ERR(0, 2312, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__118, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2311
 *             if code & 1:
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 *             if code & 2:             # <<<<<<<<<<<<<<
 *                 print_('Information: accuracy reached', file=sys.stderr)
 *             if code & 4:
 */
    }

    /* "metaphor/monal/driver/_driver.py":2313
 *             if code & 2:
 *                 print_('Information: accuracy reached', file=sys.stderr)
 *             if code & 4:             # <<<<<<<<<<<<<<
 *                 print_('Information: stop for maxiter', file=sys.stderr)
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)
 */
    __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_code, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2313, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2314
 *                 print_('Information: accuracy reached', file=sys.stderr)
 *             if code & 4:
 *                 print_('Information: stop for maxiter', file=sys.stderr)             # <<<<<<<<<<<<<<
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)
 *         newinputs = self.normalizeInputs(newinputs, reverse=True)
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_print_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_stderr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_file, __pyx_t_5) < 0) __PYX_ERR(0, 2314, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__119, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2313
 *             if code & 2:
 *                 print_('Information: accuracy reached', file=sys.stderr)
 *             if code & 4:             # <<<<<<<<<<<<<<
 *                 print_('Information: stop for maxiter', file=sys.stderr)
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)
 */
    }

    /* "metaphor/monal/driver/_driver.py":2308
 *             callback=callback)
 * 
 *         if debug:             # <<<<<<<<<<<<<<
 *             if code & 1:
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2315
 *             if code & 4:
 *                 print_('Information: stop for maxiter', file=sys.stderr)
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)             # <<<<<<<<<<<<<<
 *         newinputs = self.normalizeInputs(newinputs, reverse=True)
 *         return newinputs, code
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_expandvec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_newreducedinputs, __pyx_v_inputini, __pyx_v_fixedinputs};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_newreducedinputs, __pyx_v_inputini, __pyx_v_fixedinputs};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_newreducedinputs);
    __Pyx_GIVEREF(__pyx_v_newreducedinputs);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, __pyx_v_newreducedinputs);
    __Pyx_INCREF(__pyx_v_inputini);
    __Pyx_GIVEREF(__pyx_v_inputini);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, __pyx_v_inputini);
    __Pyx_INCREF(__pyx_v_fixedinputs);
    __Pyx_GIVEREF(__pyx_v_fixedinputs);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_v_fixedinputs);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_newinputs = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2316
 *                 print_('Information: stop for maxiter', file=sys.stderr)
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)
 *         newinputs = self.normalizeInputs(newinputs, reverse=True)             # <<<<<<<<<<<<<<
 *         return newinputs, code
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_newinputs);
  __Pyx_GIVEREF(__pyx_v_newinputs);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_newinputs);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 2316, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_newinputs, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2317
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)
 *         newinputs = self.normalizeInputs(newinputs, reverse=True)
 *         return newinputs, code             # <<<<<<<<<<<<<<
 * 
 *     def transferExtra(self, inputs=None, style=C.TFR_STD, donorm=True,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_newinputs);
  __Pyx_GIVEREF(__pyx_v_newinputs);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_newinputs);
  __Pyx_INCREF(__pyx_v_code);
  __Pyx_GIVEREF(__pyx_v_code);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_code);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2262
 *         return asarray([trueGradList]), residual
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,             # <<<<<<<<<<<<<<
 *         epochs=None, modelindex=-1, callback=None, debug=0, verbose=0):
 *         """Obtain the result of model reverse transfer.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.reverse_train", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_inname);
  __Pyx_XDECREF(__pyx_v_inputini);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_factor);
  __Pyx_XDECREF(__pyx_v_reducedinputs);
  __Pyx_XDECREF(__pyx_v_newreducedinputs);
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_newinputs);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v__);
  __Pyx_XDECREF(__pyx_v_outputtarget);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XDECREF(__pyx_v_fixedinputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2319
 *         return newinputs, code
 * 
 *     def transferExtra(self, inputs=None, style=C.TFR_STD, donorm=True,             # <<<<<<<<<<<<<<
 *             modelindex=-1):  #original=True,
 * 
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_24__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_style);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_style);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_style);
  __Pyx_INCREF(((PyObject *)Py_True));
  __Pyx_GIVEREF(((PyObject *)Py_True));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_True));
  __Pyx_INCREF(((PyObject *)__pyx_int_neg_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_neg_1));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_int_neg_1));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_185transferExtra(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_185transferExtra = {"transferExtra", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_185transferExtra, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_185transferExtra(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferExtra (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_style,&__pyx_n_s_donorm,&__pyx_n_s_modelindex,0};
    PyObject* values[5] = {0,0,0,0,0};
    __pyx_defaults8 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self);
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = __pyx_dynamic_args->__pyx_arg_style;
    values[3] = ((PyObject *)((PyObject *)Py_True));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferExtra") < 0)) __PYX_ERR(0, 2319, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_style = values[2];
    __pyx_v_donorm = values[3];
    __pyx_v_modelindex = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferExtra", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2319, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferExtra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_184transferExtra(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_style, __pyx_v_donorm, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_184transferExtra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_style, PyObject *__pyx_v_donorm, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_v_style0 = NULL;
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_grads = NULL;
  PyObject *__pyx_v_ingrads = NULL;
  PyObject *__pyx_v_levs = NULL;
  PyObject *__pyx_v_gradval = NULL;
  PyObject *__pyx_v_ingradval = NULL;
  PyObject *__pyx_v_memweights = NULL;
  PyObject *__pyx_v_res0 = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_output = NULL;
  PyObject *__pyx_v_weightloc = NULL;
  PyObject *__pyx_v_disploc = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_gradvalue = NULL;
  PyObject *__pyx_v_ingradvalue = NULL;
  PyObject *__pyx_v_lev = NULL;
  PyObject *__pyx_v_outlevs = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_res = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_lev = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("transferExtra", 0);
  __Pyx_INCREF(__pyx_v_style);

  /* "metaphor/monal/driver/_driver.py":2322
 *             modelindex=-1):  #original=True,
 * 
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.weights
 *         style0 = style
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2323
 * 
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights             # <<<<<<<<<<<<<<
 *         style0 = style
 *         outputs = []
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_weights, __pyx_t_7) < 0) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2322
 *             modelindex=-1):  #original=True,
 * 
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.weights
 *         style0 = style
 */
  }

  /* "metaphor/monal/driver/_driver.py":2324
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 *         style0 = style             # <<<<<<<<<<<<<<
 *         outputs = []
 *         grads = []
 */
  __Pyx_INCREF(__pyx_v_style);
  __pyx_v_style0 = __pyx_v_style;

  /* "metaphor/monal/driver/_driver.py":2325
 *             self.mainModel.weights = self.weights
 *         style0 = style
 *         outputs = []             # <<<<<<<<<<<<<<
 *         grads = []
 *         ingrads = []
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_outputs = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2326
 *         style0 = style
 *         outputs = []
 *         grads = []             # <<<<<<<<<<<<<<
 *         ingrads = []
 *         levs = []
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_grads = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2327
 *         outputs = []
 *         grads = []
 *         ingrads = []             # <<<<<<<<<<<<<<
 *         levs = []
 *         gradval = ingradval = None
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_ingrads = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2328
 *         grads = []
 *         ingrads = []
 *         levs = []             # <<<<<<<<<<<<<<
 *         gradval = ingradval = None
 *         memweights = self.weights.copy()
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_levs = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2329
 *         ingrads = []
 *         levs = []
 *         gradval = ingradval = None             # <<<<<<<<<<<<<<
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_gradval = Py_None;
  __Pyx_INCREF(Py_None);
  __pyx_v_ingradval = Py_None;

  /* "metaphor/monal/driver/_driver.py":2330
 *         levs = []
 *         gradval = ingradval = None
 *         memweights = self.weights.copy()             # <<<<<<<<<<<<<<
 *         self.mainModel.weights = self.weights
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_7) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2330, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2330, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_memweights = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2331
 *         gradval = ingradval = None
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights             # <<<<<<<<<<<<<<
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_weights, __pyx_t_6) < 0) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":2332
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)             # <<<<<<<<<<<<<<
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:
 *             if style == C.TFR_STD:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_GIVEREF(__pyx_v_inputs);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_inputs);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 2332, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 2332, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_res0 = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2333
 *         self.mainModel.weights = self.weights
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:             # <<<<<<<<<<<<<<
 *             if style == C.TFR_STD:
 *                 return res0  #, [res]
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = (__pyx_t_8 == Py_None);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2334
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:
 *             if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *                 return res0  #, [res]
 *             else:
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_style, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2335
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:
 *             if style == C.TFR_STD:
 *                 return res0  #, [res]             # <<<<<<<<<<<<<<
 *             else:
 *                 return [res0]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res0);
      __pyx_r = __pyx_v_res0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":2334
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:
 *             if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *                 return res0  #, [res]
 *             else:
 */
    }

    /* "metaphor/monal/driver/_driver.py":2337
 *                 return res0  #, [res]
 *             else:
 *                 return [res0]             # <<<<<<<<<<<<<<
 * #                 output, gradval, ingradval = res0
 * #                 return  [output], [gradval], [ingradval]
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_res0);
      __Pyx_GIVEREF(__pyx_v_res0);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_res0);
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L0;
    }

    /* "metaphor/monal/driver/_driver.py":2333
 *         self.mainModel.weights = self.weights
 *         res0 = self.transfer(inputs, style=style, donorm=donorm)
 *         if self.extraweights is None or self.extraweights.shape[0] <= 1:             # <<<<<<<<<<<<<<
 *             if style == C.TFR_STD:
 *                 return res0  #, [res]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2340
 * #                 output, gradval, ingradval = res0
 * #                 return  [output], [gradval], [ingradval]
 *         elif 0 <= modelindex < self.extraCount:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.extraweights[modelindex]
 *             res = self.transfer(inputs, style=style, donorm=donorm)
 */
  __pyx_t_7 = PyObject_RichCompare(__pyx_int_0, __pyx_v_modelindex, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2340, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_7)) {
    __Pyx_DECREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraCount_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_modelindex, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2341
 * #                 return  [output], [gradval], [ingradval]
 *         elif 0 <= modelindex < self.extraCount:
 *             self.mainModel.weights = self.extraweights[modelindex]             # <<<<<<<<<<<<<<
 *             res = self.transfer(inputs, style=style, donorm=donorm)
 *             self.weights = memweights
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_modelindex); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_weights, __pyx_t_8) < 0) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2342
 *         elif 0 <= modelindex < self.extraCount:
 *             self.mainModel.weights = self.extraweights[modelindex]
 *             res = self.transfer(inputs, style=style, donorm=donorm)             # <<<<<<<<<<<<<<
 *             self.weights = memweights
 *             if style == C.TFR_STD:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_inputs);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 2342, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 2342, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_res = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2343
 *             self.mainModel.weights = self.extraweights[modelindex]
 *             res = self.transfer(inputs, style=style, donorm=donorm)
 *             self.weights = memweights             # <<<<<<<<<<<<<<
 *             if style == C.TFR_STD:
 *                 return res  #, [res]
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights, __pyx_v_memweights) < 0) __PYX_ERR(0, 2343, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2344
 *             res = self.transfer(inputs, style=style, donorm=donorm)
 *             self.weights = memweights
 *             if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *                 return res  #, [res]
 *             else:
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_style, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2345
 *             self.weights = memweights
 *             if style == C.TFR_STD:
 *                 return res  #, [res]             # <<<<<<<<<<<<<<
 *             else:
 *                 output, gradval, ingradval = res
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":2344
 *             res = self.transfer(inputs, style=style, donorm=donorm)
 *             self.weights = memweights
 *             if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *                 return res  #, [res]
 *             else:
 */
    }

    /* "metaphor/monal/driver/_driver.py":2347
 *                 return res  #, [res]
 *             else:
 *                 output, gradval, ingradval = res             # <<<<<<<<<<<<<<
 *                 return  [output], [gradval], [ingradval]
 *         else:
 */
    /*else*/ {
      if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
        PyObject* sequence = __pyx_v_res;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2347, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_7 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 2; __pyx_t_8 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_7), 3) < 0) __PYX_ERR(0, 2347, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2347, __pyx_L1_error)
        __pyx_L12_unpacking_done:;
      }
      __pyx_v_output = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_gradval, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_ingradval, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "metaphor/monal/driver/_driver.py":2348
 *             else:
 *                 output, gradval, ingradval = res
 *                 return  [output], [gradval], [ingradval]             # <<<<<<<<<<<<<<
 *         else:
 *             for weightloc, disploc in zip(self.extraweights, self.extradispersions):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_output);
      __Pyx_GIVEREF(__pyx_v_output);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_output);
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_gradval);
      __Pyx_GIVEREF(__pyx_v_gradval);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_gradval);
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_ingradval);
      __Pyx_GIVEREF(__pyx_v_ingradval);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_ingradval);
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_6 = 0;
      __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L0;
    }

    /* "metaphor/monal/driver/_driver.py":2340
 * #                 output, gradval, ingradval = res0
 * #                 return  [output], [gradval], [ingradval]
 *         elif 0 <= modelindex < self.extraCount:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.extraweights[modelindex]
 *             res = self.transfer(inputs, style=style, donorm=donorm)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2350
 *                 return  [output], [gradval], [ingradval]
 *         else:
 *             for weightloc, disploc in zip(self.extraweights, self.extradispersions):             # <<<<<<<<<<<<<<
 *                 self.mainModel.weights = weightloc
 *                 if style == C.TFR_LEVERAGE:
 */
  /*else*/ {
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extradispersions_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __pyx_t_7 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2350, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2350, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2350, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_6);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2350, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2350, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_11)->tp_iternext;
        index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_11), 2) < 0) __PYX_ERR(0, 2350, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L16_unpacking_done;
        __pyx_L15_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2350, __pyx_L1_error)
        __pyx_L16_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_weightloc, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_disploc, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "metaphor/monal/driver/_driver.py":2351
 *         else:
 *             for weightloc, disploc in zip(self.extraweights, self.extradispersions):
 *                 self.mainModel.weights = weightloc             # <<<<<<<<<<<<<<
 *                 if style == C.TFR_LEVERAGE:
 *                     style = C.TFR_GRADIENT
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_weights, __pyx_v_weightloc) < 0) __PYX_ERR(0, 2351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2352
 *             for weightloc, disploc in zip(self.extraweights, self.extradispersions):
 *                 self.mainModel.weights = weightloc
 *                 if style == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *                     style = C.TFR_GRADIENT
 *                 res = self.transfer(inputs, style=style, donorm=donorm)
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_LEVERAGE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_style, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2352, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2352, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":2353
 *                 self.mainModel.weights = weightloc
 *                 if style == C.TFR_LEVERAGE:
 *                     style = C.TFR_GRADIENT             # <<<<<<<<<<<<<<
 *                 res = self.transfer(inputs, style=style, donorm=donorm)
 *                 if style == C.TFR_STD:
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_GRADIENT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_style, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "metaphor/monal/driver/_driver.py":2352
 *             for weightloc, disploc in zip(self.extraweights, self.extradispersions):
 *                 self.mainModel.weights = weightloc
 *                 if style == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *                     style = C.TFR_GRADIENT
 *                 res = self.transfer(inputs, style=style, donorm=donorm)
 */
      }

      /* "metaphor/monal/driver/_driver.py":2354
 *                 if style == C.TFR_LEVERAGE:
 *                     style = C.TFR_GRADIENT
 *                 res = self.transfer(inputs, style=style, donorm=donorm)             # <<<<<<<<<<<<<<
 *                 if style == C.TFR_STD:
 *                     value = res
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_inputs);
      __Pyx_GIVEREF(__pyx_v_inputs);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_inputs);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 2354, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 2354, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/monal/driver/_driver.py":2355
 *                     style = C.TFR_GRADIENT
 *                 res = self.transfer(inputs, style=style, donorm=donorm)
 *                 if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *                     value = res
 *                 else:
 */
      __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_style, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2355, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2355, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":2356
 *                 res = self.transfer(inputs, style=style, donorm=donorm)
 *                 if style == C.TFR_STD:
 *                     value = res             # <<<<<<<<<<<<<<
 *                 else:
 *                     value, gradvalue, ingradvalue = res
 */
        __Pyx_INCREF(__pyx_v_res);
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_v_res);

        /* "metaphor/monal/driver/_driver.py":2355
 *                     style = C.TFR_GRADIENT
 *                 res = self.transfer(inputs, style=style, donorm=donorm)
 *                 if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *                     value = res
 *                 else:
 */
        goto __pyx_L18;
      }

      /* "metaphor/monal/driver/_driver.py":2358
 *                     value = res
 *                 else:
 *                     value, gradvalue, ingradvalue = res             # <<<<<<<<<<<<<<
 *                     grads.append(gradvalue)
 *                     ingrads.append(ingradvalue)
 */
      /*else*/ {
        if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
          PyObject* sequence = __pyx_v_res;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 2358, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          #else
          __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          Py_ssize_t index = -1;
          __pyx_t_8 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
          index = 0; __pyx_t_11 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_11)) goto __pyx_L19_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_11);
          index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L19_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          index = 2; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L19_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(0, 2358, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L20_unpacking_done;
          __pyx_L19_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 2358, __pyx_L1_error)
          __pyx_L20_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
        __pyx_t_11 = 0;
        __Pyx_XDECREF_SET(__pyx_v_gradvalue, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_ingradvalue, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "metaphor/monal/driver/_driver.py":2359
 *                 else:
 *                     value, gradvalue, ingradvalue = res
 *                     grads.append(gradvalue)             # <<<<<<<<<<<<<<
 *                     ingrads.append(ingradvalue)
 *                 if style0 == C.TFR_LEVERAGE:
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_grads, __pyx_v_gradvalue); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2359, __pyx_L1_error)

        /* "metaphor/monal/driver/_driver.py":2360
 *                     value, gradvalue, ingradvalue = res
 *                     grads.append(gradvalue)
 *                     ingrads.append(ingradvalue)             # <<<<<<<<<<<<<<
 *                 if style0 == C.TFR_LEVERAGE:
 *                     lev = gradvalue.T.dot(disploc.dot(gradvalue))
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ingrads, __pyx_v_ingradvalue); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2360, __pyx_L1_error)
      }
      __pyx_L18:;

      /* "metaphor/monal/driver/_driver.py":2361
 *                     grads.append(gradvalue)
 *                     ingrads.append(ingradvalue)
 *                 if style0 == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *                     lev = gradvalue.T.dot(disploc.dot(gradvalue))
 *                     levs.append(lev)
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_LEVERAGE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_style0, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2361, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2361, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":2362
 *                     ingrads.append(ingradvalue)
 *                 if style0 == C.TFR_LEVERAGE:
 *                     lev = gradvalue.T.dot(disploc.dot(gradvalue))             # <<<<<<<<<<<<<<
 *                     levs.append(lev)
 *                 outputs.append(value)
 */
        if (unlikely(!__pyx_v_gradvalue)) { __Pyx_RaiseUnboundLocalError("gradvalue"); __PYX_ERR(0, 2362, __pyx_L1_error) }
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gradvalue, __pyx_n_s_T); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2362, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dot); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2362, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_disploc, __pyx_n_s_dot); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2362, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(!__pyx_v_gradvalue)) { __Pyx_RaiseUnboundLocalError("gradvalue"); __PYX_ERR(0, 2362, __pyx_L1_error) }
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (!__pyx_t_13) {
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_gradvalue); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2362, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_gradvalue};
            __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_GOTREF(__pyx_t_7);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_gradvalue};
            __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_GOTREF(__pyx_t_7);
          } else
          #endif
          {
            __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
            __Pyx_INCREF(__pyx_v_gradvalue);
            __Pyx_GIVEREF(__pyx_v_gradvalue);
            PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_gradvalue);
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_7);
            __pyx_t_7 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF_SET(__pyx_v_lev, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "metaphor/monal/driver/_driver.py":2363
 *                 if style0 == C.TFR_LEVERAGE:
 *                     lev = gradvalue.T.dot(disploc.dot(gradvalue))
 *                     levs.append(lev)             # <<<<<<<<<<<<<<
 *                 outputs.append(value)
 *         self.weights = memweights
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_levs, __pyx_v_lev); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2363, __pyx_L1_error)

        /* "metaphor/monal/driver/_driver.py":2361
 *                     grads.append(gradvalue)
 *                     ingrads.append(ingradvalue)
 *                 if style0 == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *                     lev = gradvalue.T.dot(disploc.dot(gradvalue))
 *                     levs.append(lev)
 */
      }

      /* "metaphor/monal/driver/_driver.py":2364
 *                     lev = gradvalue.T.dot(disploc.dot(gradvalue))
 *                     levs.append(lev)
 *                 outputs.append(value)             # <<<<<<<<<<<<<<
 *         self.weights = memweights
 *         if style == C.TFR_STD:
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_outputs, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2364, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2350
 *                 return  [output], [gradval], [ingradval]
 *         else:
 *             for weightloc, disploc in zip(self.extraweights, self.extradispersions):             # <<<<<<<<<<<<<<
 *                 self.mainModel.weights = weightloc
 *                 if style == C.TFR_LEVERAGE:
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "metaphor/monal/driver/_driver.py":2365
 *                     levs.append(lev)
 *                 outputs.append(value)
 *         self.weights = memweights             # <<<<<<<<<<<<<<
 *         if style == C.TFR_STD:
 *             return outputs[0], outputs
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights, __pyx_v_memweights) < 0) __PYX_ERR(0, 2365, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2366
 *                 outputs.append(value)
 *         self.weights = memweights
 *         if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *             return outputs[0], outputs
 *         elif style0 == C.TFR_LEVERAGE:
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2367
 *         self.weights = memweights
 *         if style == C.TFR_STD:
 *             return outputs[0], outputs             # <<<<<<<<<<<<<<
 *         elif style0 == C.TFR_LEVERAGE:
 *             outlevs = [(res, lev) for res, lev in zip(outputs, levs)]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_outputs, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_outputs);
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2366
 *                 outputs.append(value)
 *         self.weights = memweights
 *         if style == C.TFR_STD:             # <<<<<<<<<<<<<<
 *             return outputs[0], outputs
 *         elif style0 == C.TFR_LEVERAGE:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2368
 *         if style == C.TFR_STD:
 *             return outputs[0], outputs
 *         elif style0 == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *             outlevs = [(res, lev) for res, lev in zip(outputs, levs)]
 *             return res0, outlevs
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_LEVERAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_style0, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2369
 *             return outputs[0], outputs
 *         elif style0 == C.TFR_LEVERAGE:
 *             outlevs = [(res, lev) for res, lev in zip(outputs, levs)]             # <<<<<<<<<<<<<<
 *             return res0, outlevs
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2369, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_outputs);
      __Pyx_INCREF(__pyx_v_levs);
      __Pyx_GIVEREF(__pyx_v_levs);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_levs);
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2369, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
        __pyx_t_6 = __pyx_t_11; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2369, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2369, __pyx_L25_error)
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2369, __pyx_L25_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2369, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          } else {
            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2369, __pyx_L25_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2369, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          }
        } else {
          __pyx_t_11 = __pyx_t_10(__pyx_t_6);
          if (unlikely(!__pyx_t_11)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2369, __pyx_L25_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_11);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
          PyObject* sequence = __pyx_t_11;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 2369, __pyx_L25_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_7);
          #else
          __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2369, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2369, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_8 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2369, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
          index = 0; __pyx_t_14 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_14)) goto __pyx_L28_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_14);
          index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L28_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2369, __pyx_L25_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L29_unpacking_done;
          __pyx_L28_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 2369, __pyx_L25_error)
          __pyx_L29_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_res, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_lev, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2369, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_9genexpr13__pyx_v_res);
        __Pyx_GIVEREF(__pyx_9genexpr13__pyx_v_res);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr13__pyx_v_res);
        __Pyx_INCREF(__pyx_9genexpr13__pyx_v_lev);
        __Pyx_GIVEREF(__pyx_9genexpr13__pyx_v_lev);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr13__pyx_v_lev);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 2369, __pyx_L25_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_lev); __pyx_9genexpr13__pyx_v_lev = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_res); __pyx_9genexpr13__pyx_v_res = 0;
      goto __pyx_L30_exit_scope;
      __pyx_L25_error:;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_lev); __pyx_9genexpr13__pyx_v_lev = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_res); __pyx_9genexpr13__pyx_v_res = 0;
      goto __pyx_L1_error;
      __pyx_L30_exit_scope:;
    } /* exit inner scope */
    __pyx_v_outlevs = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2370
 *         elif style0 == C.TFR_LEVERAGE:
 *             outlevs = [(res, lev) for res, lev in zip(outputs, levs)]
 *             return res0, outlevs             # <<<<<<<<<<<<<<
 *         else:
 *             return outputs, grads, ingrads
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_res0);
    __Pyx_GIVEREF(__pyx_v_res0);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_res0);
    __Pyx_INCREF(__pyx_v_outlevs);
    __Pyx_GIVEREF(__pyx_v_outlevs);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_outlevs);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2368
 *         if style == C.TFR_STD:
 *             return outputs[0], outputs
 *         elif style0 == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *             outlevs = [(res, lev) for res, lev in zip(outputs, levs)]
 *             return res0, outlevs
 */
  }

  /* "metaphor/monal/driver/_driver.py":2372
 *             return res0, outlevs
 *         else:
 *             return outputs, grads, ingrads             # <<<<<<<<<<<<<<
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_outputs);
    __Pyx_INCREF(__pyx_v_grads);
    __Pyx_GIVEREF(__pyx_v_grads);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_grads);
    __Pyx_INCREF(__pyx_v_ingrads);
    __Pyx_GIVEREF(__pyx_v_ingrads);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ingrads);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":2319
 *         return newinputs, code
 * 
 *     def transferExtra(self, inputs=None, style=C.TFR_STD, donorm=True,             # <<<<<<<<<<<<<<
 *             modelindex=-1):  #original=True,
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferExtra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_style0);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_grads);
  __Pyx_XDECREF(__pyx_v_ingrads);
  __Pyx_XDECREF(__pyx_v_levs);
  __Pyx_XDECREF(__pyx_v_gradval);
  __Pyx_XDECREF(__pyx_v_ingradval);
  __Pyx_XDECREF(__pyx_v_memweights);
  __Pyx_XDECREF(__pyx_v_res0);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_weightloc);
  __Pyx_XDECREF(__pyx_v_disploc);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_gradvalue);
  __Pyx_XDECREF(__pyx_v_ingradvalue);
  __Pyx_XDECREF(__pyx_v_lev);
  __Pyx_XDECREF(__pyx_v_outlevs);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_res);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_lev);
  __Pyx_XDECREF(__pyx_v_style);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2374
 *             return outputs, grads, ingrads
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_187transferExtraCI(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_187transferExtraCI = {"transferExtraCI", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_187transferExtraCI, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_187transferExtraCI(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferExtraCI (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_donorm,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferExtraCI") < 0)) __PYX_ERR(0, 2374, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_donorm = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferExtraCI", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2374, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferExtraCI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_186transferExtraCI(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_186transferExtraCI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_output = NULL;
  PyObject *__pyx_v_outputsicp = NULL;
  PyObject *__pyx_v_outputsicm = NULL;
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_memweights = NULL;
  PyObject *__pyx_v_weightloc = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("transferExtraCI", 0);
  __Pyx_INCREF(__pyx_v_inputs);

  /* "metaphor/monal/driver/_driver.py":2375
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.weights
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2376
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights             # <<<<<<<<<<<<<<
 * 
 *         output, outputsicp, outputsicm = self.transferCI(inputs, donorm=donorm)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_weights, __pyx_t_7) < 0) __PYX_ERR(0, 2376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2375
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.weights
 * 
 */
  }

  /* "metaphor/monal/driver/_driver.py":2378
 *             self.mainModel.weights = self.weights
 * 
 *         output, outputsicp, outputsicm = self.transferCI(inputs, donorm=donorm)             # <<<<<<<<<<<<<<
 * 
 *         outputs = []
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferCI); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_GIVEREF(__pyx_v_inputs);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_inputs);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_donorm, __pyx_v_donorm) < 0) __PYX_ERR(0, 2378, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
    PyObject* sequence = __pyx_t_8;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2378, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_7);
    index = 2; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 2378, __pyx_L1_error)
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2378, __pyx_L1_error)
    __pyx_L7_unpacking_done:;
  }
  __pyx_v_output = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_outputsicp = __pyx_t_7;
  __pyx_t_7 = 0;
  __pyx_v_outputsicm = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2380
 *         output, outputsicp, outputsicm = self.transferCI(inputs, donorm=donorm)
 * 
 *         outputs = []             # <<<<<<<<<<<<<<
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights
 */
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_outputs = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2381
 * 
 *         outputs = []
 *         memweights = self.weights.copy()             # <<<<<<<<<<<<<<
 *         self.mainModel.weights = self.weights
 *         if donorm:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2381, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2381, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_memweights = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2382
 *         outputs = []
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights             # <<<<<<<<<<<<<<
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_weights, __pyx_t_8) < 0) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":2383
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         #output = self.transfer(inputs)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2383, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2384
 *         self.mainModel.weights = self.weights
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         #output = self.transfer(inputs)
 *         for weightloc in self.extraweights:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_inputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_inputs};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2384, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_inputs};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2384, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_inputs);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2383
 *         memweights = self.weights.copy()
 *         self.mainModel.weights = self.weights
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         #output = self.transfer(inputs)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2386
 *             inputs = self.normalizeInputs(inputs)
 *         #output = self.transfer(inputs)
 *         for weightloc in self.extraweights:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = weightloc
 *             value = self.transfer(inputs)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_8))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_11(__pyx_t_8);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2386, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_weightloc, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2387
 *         #output = self.transfer(inputs)
 *         for weightloc in self.extraweights:
 *             self.mainModel.weights = weightloc             # <<<<<<<<<<<<<<
 *             value = self.transfer(inputs)
 *             outputs.append(value)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_weights, __pyx_v_weightloc) < 0) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2388
 *         for weightloc in self.extraweights:
 *             self.mainModel.weights = weightloc
 *             value = self.transfer(inputs)             # <<<<<<<<<<<<<<
 *             outputs.append(value)
 *         self.weights = memweights
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_inputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_inputs};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_inputs};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_inputs);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2389
 *             self.mainModel.weights = weightloc
 *             value = self.transfer(inputs)
 *             outputs.append(value)             # <<<<<<<<<<<<<<
 *         self.weights = memweights
 *         if donorm:
 */
    __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_outputs, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2389, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2386
 *             inputs = self.normalizeInputs(inputs)
 *         #output = self.transfer(inputs)
 *         for weightloc in self.extraweights:             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = weightloc
 *             value = self.transfer(inputs)
 */
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2390
 *             value = self.transfer(inputs)
 *             outputs.append(value)
 *         self.weights = memweights             # <<<<<<<<<<<<<<
 *         if donorm:
 *             #output = self.unnormalizeOutputs(output)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_weights, __pyx_v_memweights) < 0) __PYX_ERR(0, 2390, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2391
 *             outputs.append(value)
 *         self.weights = memweights
 *         if donorm:             # <<<<<<<<<<<<<<
 *             #output = self.unnormalizeOutputs(output)
 *             outputs = self.unnormalizeOutputs(outputs)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2391, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2393
 *         if donorm:
 *             #output = self.unnormalizeOutputs(output)
 *             outputs = self.unnormalizeOutputs(outputs)             # <<<<<<<<<<<<<<
 *         return output, outputsicp, outputsicm, outputs
 * # new KO ->OK avec suppression de donorm, et modif de  transferLeverages
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_outputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputs};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2393, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputs};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2393, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_outputs);
        __Pyx_GIVEREF(__pyx_v_outputs);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_outputs);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":2391
 *             outputs.append(value)
 *         self.weights = memweights
 *         if donorm:             # <<<<<<<<<<<<<<
 *             #output = self.unnormalizeOutputs(output)
 *             outputs = self.unnormalizeOutputs(outputs)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2394
 *             #output = self.unnormalizeOutputs(output)
 *             outputs = self.unnormalizeOutputs(outputs)
 *         return output, outputsicp, outputsicm, outputs             # <<<<<<<<<<<<<<
 * # new KO ->OK avec suppression de donorm, et modif de  transferLeverages
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_output);
  __Pyx_GIVEREF(__pyx_v_output);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_output);
  __Pyx_INCREF(__pyx_v_outputsicp);
  __Pyx_GIVEREF(__pyx_v_outputsicp);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_outputsicp);
  __Pyx_INCREF(__pyx_v_outputsicm);
  __Pyx_GIVEREF(__pyx_v_outputsicm);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_outputsicm);
  __Pyx_INCREF(__pyx_v_outputs);
  __Pyx_GIVEREF(__pyx_v_outputs);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_outputs);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2374
 *             return outputs, grads, ingrads
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferExtraCI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_outputsicp);
  __Pyx_XDECREF(__pyx_v_outputsicm);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_memweights);
  __Pyx_XDECREF(__pyx_v_weightloc);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2397
 * # new KO ->OK avec suppression de donorm, et modif de  transferLeverages
 * 
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_189transferEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_189transferEx = {"transferEx", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_189transferEx, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_189transferEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_withCI = 0;
  PyObject *__pyx_v_modelindex = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferEx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_withCI,&__pyx_n_s_modelindex,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withCI);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modelindex);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferEx") < 0)) __PYX_ERR(0, 2397, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_withCI = values[2];
    __pyx_v_modelindex = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferEx", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2397, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_188transferEx(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_withCI, __pyx_v_modelindex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_188transferEx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_withCI, PyObject *__pyx_v_modelindex) {
  PyObject *__pyx_v_outs = NULL;
  PyObject *__pyx_v_levs = NULL;
  PyObject *__pyx_v_stds = NULL;
  PyObject *__pyx_v_CIp = NULL;
  PyObject *__pyx_v_CIm = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_lev = NULL;
  PyObject *__pyx_v_extrastddev = NULL;
  PyObject *__pyx_v_weight = NULL;
  PyObject *__pyx_v_disp = NULL;
  PyObject *__pyx_v_std = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_students = NULL;
  PyObject *__pyx_v_ic = NULL;
  CYTHON_UNUSED Py_ssize_t __pyx_9genexpr14__pyx_v__;
  CYTHON_UNUSED Py_ssize_t __pyx_9genexpr15__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *(*__pyx_t_17)(PyObject *);
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  char const *__pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  __Pyx_RefNannySetupContext("transferEx", 0);

  /* "metaphor/monal/driver/_driver.py":2398
 * 
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.weights
 *         outs = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_paramCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2399
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights             # <<<<<<<<<<<<<<
 *         outs = []
 *         levs = []
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weights); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_weights, __pyx_t_7) < 0) __PYX_ERR(0, 2399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2398
 * 
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):             # <<<<<<<<<<<<<<
 *             self.mainModel.weights = self.weights
 *         outs = []
 */
  }

  /* "metaphor/monal/driver/_driver.py":2400
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 *         outs = []             # <<<<<<<<<<<<<<
 *         levs = []
 *         stds = []
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_outs = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2401
 *             self.mainModel.weights = self.weights
 *         outs = []
 *         levs = []             # <<<<<<<<<<<<<<
 *         stds = []
 *         CIp = []
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_levs = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2402
 *         outs = []
 *         levs = []
 *         stds = []             # <<<<<<<<<<<<<<
 *         CIp = []
 *         CIm = []
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_stds = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2403
 *         levs = []
 *         stds = []
 *         CIp = []             # <<<<<<<<<<<<<<
 *         CIm = []
 *         if (self._extraweights is None) or (self._extradispersions is None):
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_CIp = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2404
 *         stds = []
 *         CIp = []
 *         CIm = []             # <<<<<<<<<<<<<<
 *         if (self._extraweights is None) or (self._extradispersions is None):
 *             out, lev = self.transferLeverages(inputs=inputs)  #original=original
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_CIm = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2405
 *         CIp = []
 *         CIm = []
 *         if (self._extraweights is None) or (self._extradispersions is None):             # <<<<<<<<<<<<<<
 *             out, lev = self.transferLeverages(inputs=inputs)  #original=original
 *             outs.append(squeeze(out))
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = (__pyx_t_6 == Py_None);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extradispersions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = (__pyx_t_6 == Py_None);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2406
 *         CIm = []
 *         if (self._extraweights is None) or (self._extradispersions is None):
 *             out, lev = self.transferLeverages(inputs=inputs)  #original=original             # <<<<<<<<<<<<<<
 *             outs.append(squeeze(out))
 *             levs.append(squeeze(lev))
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferLeverages); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inputs, __pyx_v_inputs) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2406, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2406, __pyx_L1_error)
      __pyx_L10_unpacking_done:;
    }
    __pyx_v_out = __pyx_t_7;
    __pyx_t_7 = 0;
    __pyx_v_lev = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2407
 *         if (self._extraweights is None) or (self._extradispersions is None):
 *             out, lev = self.transferLeverages(inputs=inputs)  #original=original
 *             outs.append(squeeze(out))             # <<<<<<<<<<<<<<
 *             levs.append(squeeze(lev))
 *         else:
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_out};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_out};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_out);
        __Pyx_GIVEREF(__pyx_v_out);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_out);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_outs, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2407, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2408
 *             out, lev = self.transferLeverages(inputs=inputs)  #original=original
 *             outs.append(squeeze(out))
 *             levs.append(squeeze(lev))             # <<<<<<<<<<<<<<
 *         else:
 *             if self._extrastddev is None:
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_lev); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_lev};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_lev};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_lev);
        __Pyx_GIVEREF(__pyx_v_lev);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_lev);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_levs, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2405
 *         CIp = []
 *         CIm = []
 *         if (self._extraweights is None) or (self._extradispersions is None):             # <<<<<<<<<<<<<<
 *             out, lev = self.transferLeverages(inputs=inputs)  #original=original
 *             outs.append(squeeze(out))
 */
    goto __pyx_L6;
  }

  /* "metaphor/monal/driver/_driver.py":2410
 *             levs.append(squeeze(lev))
 *         else:
 *             if self._extrastddev is None:             # <<<<<<<<<<<<<<
 *                 extrastddev = [0 for _ in range(len(self._extraweights))]
 *             else:
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extrastddev); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {

      /* "metaphor/monal/driver/_driver.py":2411
 *         else:
 *             if self._extrastddev is None:
 *                 extrastddev = [0 for _ in range(len(self._extraweights))]             # <<<<<<<<<<<<<<
 *             else:
 *                 extrastddev = self._extrastddev
 */
      { /* enter inner scope */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11 = __pyx_t_5;
        for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
          __pyx_9genexpr14__pyx_v__ = __pyx_t_12;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 2411, __pyx_L1_error)
        }
      } /* exit inner scope */
      __pyx_v_extrastddev = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2410
 *             levs.append(squeeze(lev))
 *         else:
 *             if self._extrastddev is None:             # <<<<<<<<<<<<<<
 *                 extrastddev = [0 for _ in range(len(self._extraweights))]
 *             else:
 */
      goto __pyx_L11;
    }

    /* "metaphor/monal/driver/_driver.py":2413
 *                 extrastddev = [0 for _ in range(len(self._extraweights))]
 *             else:
 *                 extrastddev = self._extrastddev             # <<<<<<<<<<<<<<
 *             if 0 <= modelindex < self.extraCount:
 *                 try:
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extrastddev); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_extrastddev = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L11:;

    /* "metaphor/monal/driver/_driver.py":2414
 *             else:
 *                 extrastddev = self._extrastddev
 *             if 0 <= modelindex < self.extraCount:             # <<<<<<<<<<<<<<
 *                 try:
 *                     weight = self._extraweights[modelindex]
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_modelindex, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2414, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraCount_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_modelindex, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2414, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2414, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "metaphor/monal/driver/_driver.py":2415
 *                 extrastddev = self._extrastddev
 *             if 0 <= modelindex < self.extraCount:
 *                 try:             # <<<<<<<<<<<<<<
 *                     weight = self._extraweights[modelindex]
 *                     disp = self._extradispersions[modelindex]
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_15);
        /*try:*/ {

          /* "metaphor/monal/driver/_driver.py":2416
 *             if 0 <= modelindex < self.extraCount:
 *                 try:
 *                     weight = self._extraweights[modelindex]             # <<<<<<<<<<<<<<
 *                     disp = self._extradispersions[modelindex]
 *                     std = extrastddev[modelindex]
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_modelindex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_weight = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "metaphor/monal/driver/_driver.py":2417
 *                 try:
 *                     weight = self._extraweights[modelindex]
 *                     disp = self._extradispersions[modelindex]             # <<<<<<<<<<<<<<
 *                     std = extrastddev[modelindex]
 *                     out, lev = self.transferLeverages(inputs, weight, disp)
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extradispersions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2417, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_modelindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2417, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_v_disp = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":2418
 *                     weight = self._extraweights[modelindex]
 *                     disp = self._extradispersions[modelindex]
 *                     std = extrastddev[modelindex]             # <<<<<<<<<<<<<<
 *                     out, lev = self.transferLeverages(inputs, weight, disp)
 *                     outs.append(out.squeeze())
 */
          __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_extrastddev, __pyx_v_modelindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2418, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_std = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":2419
 *                     disp = self._extradispersions[modelindex]
 *                     std = extrastddev[modelindex]
 *                     out, lev = self.transferLeverages(inputs, weight, disp)             # <<<<<<<<<<<<<<
 *                     outs.append(out.squeeze())
 *                     levs.append(lev.squeeze())
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferLeverages); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2419, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = NULL;
          __pyx_t_16 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_16 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_inputs, __pyx_v_weight, __pyx_v_disp};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_inputs, __pyx_v_weight, __pyx_v_disp};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_8 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_8);
            if (__pyx_t_7) {
              __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
            }
            __Pyx_INCREF(__pyx_v_inputs);
            __Pyx_GIVEREF(__pyx_v_inputs);
            PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_16, __pyx_v_inputs);
            __Pyx_INCREF(__pyx_v_weight);
            __Pyx_GIVEREF(__pyx_v_weight);
            PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_16, __pyx_v_weight);
            __Pyx_INCREF(__pyx_v_disp);
            __Pyx_GIVEREF(__pyx_v_disp);
            PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_16, __pyx_v_disp);
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
            PyObject* sequence = __pyx_t_2;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 2419, __pyx_L15_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            #else
            __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2419, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
            index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L21_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_6);
            index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L21_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_8);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2419, __pyx_L15_error)
            __pyx_t_9 = NULL;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L22_unpacking_done;
            __pyx_L21_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_9 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 2419, __pyx_L15_error)
            __pyx_L22_unpacking_done:;
          }
          __pyx_v_out = __pyx_t_6;
          __pyx_t_6 = 0;
          __pyx_v_lev = __pyx_t_8;
          __pyx_t_8 = 0;

          /* "metaphor/monal/driver/_driver.py":2420
 *                     std = extrastddev[modelindex]
 *                     out, lev = self.transferLeverages(inputs, weight, disp)
 *                     outs.append(out.squeeze())             # <<<<<<<<<<<<<<
 *                     levs.append(lev.squeeze())
 *                     stds.append(std.squeeze())
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2420, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L15_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L15_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_outs, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2420, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":2421
 *                     out, lev = self.transferLeverages(inputs, weight, disp)
 *                     outs.append(out.squeeze())
 *                     levs.append(lev.squeeze())             # <<<<<<<<<<<<<<
 *                     stds.append(std.squeeze())
 *                 except AttributeError:
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_lev, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2421, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __pyx_L15_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __pyx_L15_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_levs, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2421, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":2422
 *                     outs.append(out.squeeze())
 *                     levs.append(lev.squeeze())
 *                     stds.append(std.squeeze())             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_std, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2422, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
            }
          }
          if (__pyx_t_6) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2422, __pyx_L15_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2422, __pyx_L15_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_stds, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2422, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":2415
 *                 extrastddev = self._extrastddev
 *             if 0 <= modelindex < self.extraCount:
 *                 try:             # <<<<<<<<<<<<<<
 *                     weight = self._extraweights[modelindex]
 *                     disp = self._extradispersions[modelindex]
 */
        }
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        goto __pyx_L20_try_end;
        __pyx_L15_error:;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "metaphor/monal/driver/_driver.py":2423
 *                     levs.append(lev.squeeze())
 *                     stds.append(std.squeeze())
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise
 *             else:
 */
        __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_16) {
          __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 2423, __pyx_L17_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_6);

          /* "metaphor/monal/driver/_driver.py":2424
 *                     stds.append(std.squeeze())
 *                 except AttributeError:
 *                     raise             # <<<<<<<<<<<<<<
 *             else:
 *                 try:
 */
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_8, __pyx_t_6);
          __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_6 = 0; 
          __PYX_ERR(0, 2424, __pyx_L17_except_error)
        }
        goto __pyx_L17_except_error;
        __pyx_L17_except_error:;

        /* "metaphor/monal/driver/_driver.py":2415
 *                 extrastddev = self._extrastddev
 *             if 0 <= modelindex < self.extraCount:
 *                 try:             # <<<<<<<<<<<<<<
 *                     weight = self._extraweights[modelindex]
 *                     disp = self._extradispersions[modelindex]
 */
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        goto __pyx_L1_error;
        __pyx_L20_try_end:;
      }

      /* "metaphor/monal/driver/_driver.py":2414
 *             else:
 *                 extrastddev = self._extrastddev
 *             if 0 <= modelindex < self.extraCount:             # <<<<<<<<<<<<<<
 *                 try:
 *                     weight = self._extraweights[modelindex]
 */
      goto __pyx_L14;
    }

    /* "metaphor/monal/driver/_driver.py":2426
 *                     raise
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 */
    /*else*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_13);
        /*try:*/ {

          /* "metaphor/monal/driver/_driver.py":2427
 *             else:
 *                 try:
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):             # <<<<<<<<<<<<<<
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 *                         outs.append(out.squeeze())
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extraweights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2427, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extradispersions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2427, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2427, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
          __Pyx_INCREF(__pyx_v_extrastddev);
          __Pyx_GIVEREF(__pyx_v_extrastddev);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_extrastddev);
          __pyx_t_6 = 0;
          __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2427, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
            __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
            __pyx_t_17 = NULL;
          } else {
            __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2427, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_17 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2427, __pyx_L25_error)
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          for (;;) {
            if (likely(!__pyx_t_17)) {
              if (likely(PyList_CheckExact(__pyx_t_2))) {
                if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2427, __pyx_L25_error)
                #else
                __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2427, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
              } else {
                if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2427, __pyx_L25_error)
                #else
                __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2427, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
              }
            } else {
              __pyx_t_8 = __pyx_t_17(__pyx_t_2);
              if (unlikely(!__pyx_t_8)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 2427, __pyx_L25_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_8);
            }
            if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
              PyObject* sequence = __pyx_t_8;
              Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
              if (unlikely(size != 3)) {
                if (size > 3) __Pyx_RaiseTooManyValuesError(3);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                __PYX_ERR(0, 2427, __pyx_L25_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
                __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2); 
              } else {
                __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
                __pyx_t_18 = PyList_GET_ITEM(sequence, 2); 
              }
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_18);
              #else
              __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2427, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2427, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_18 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2427, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_18);
              #endif
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_19 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2427, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_9 = Py_TYPE(__pyx_t_19)->tp_iternext;
              index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_19); if (unlikely(!__pyx_t_6)) goto __pyx_L33_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_6);
              index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_19); if (unlikely(!__pyx_t_7)) goto __pyx_L33_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_7);
              index = 2; __pyx_t_18 = __pyx_t_9(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L33_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_18);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_19), 3) < 0) __PYX_ERR(0, 2427, __pyx_L25_error)
              __pyx_t_9 = NULL;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
              goto __pyx_L34_unpacking_done;
              __pyx_L33_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
              __pyx_t_9 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(0, 2427, __pyx_L25_error)
              __pyx_L34_unpacking_done:;
            }
            __Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_6);
            __pyx_t_6 = 0;
            __Pyx_XDECREF_SET(__pyx_v_disp, __pyx_t_7);
            __pyx_t_7 = 0;
            __Pyx_XDECREF_SET(__pyx_v_std, __pyx_t_18);
            __pyx_t_18 = 0;

            /* "metaphor/monal/driver/_driver.py":2428
 *                 try:
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):
 *                         out, lev = self.transferLeverages(inputs, weight, disp)             # <<<<<<<<<<<<<<
 *                         outs.append(out.squeeze())
 *                         levs.append(lev.squeeze())
 */
            __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferLeverages); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2428, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_7 = NULL;
            __pyx_t_16 = 0;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_18);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_18, function);
                __pyx_t_16 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_18)) {
              PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_inputs, __pyx_v_weight, __pyx_v_disp};
              __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_GOTREF(__pyx_t_8);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
              PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_inputs, __pyx_v_weight, __pyx_v_disp};
              __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_GOTREF(__pyx_t_8);
            } else
            #endif
            {
              __pyx_t_6 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_6);
              if (__pyx_t_7) {
                __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
              }
              __Pyx_INCREF(__pyx_v_inputs);
              __Pyx_GIVEREF(__pyx_v_inputs);
              PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_16, __pyx_v_inputs);
              __Pyx_INCREF(__pyx_v_weight);
              __Pyx_GIVEREF(__pyx_v_weight);
              PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_16, __pyx_v_weight);
              __Pyx_INCREF(__pyx_v_disp);
              __Pyx_GIVEREF(__pyx_v_disp);
              PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_16, __pyx_v_disp);
              __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            }
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
              PyObject* sequence = __pyx_t_8;
              Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
              if (unlikely(size != 2)) {
                if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                __PYX_ERR(0, 2428, __pyx_L25_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_18 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
              } else {
                __pyx_t_18 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
              }
              __Pyx_INCREF(__pyx_t_18);
              __Pyx_INCREF(__pyx_t_6);
              #else
              __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_18);
              __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2428, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
              index = 0; __pyx_t_18 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_18)) goto __pyx_L35_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_18);
              index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L35_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_6);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2428, __pyx_L25_error)
              __pyx_t_9 = NULL;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L36_unpacking_done;
              __pyx_L35_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __pyx_t_9 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(0, 2428, __pyx_L25_error)
              __pyx_L36_unpacking_done:;
            }
            __Pyx_XDECREF_SET(__pyx_v_out, __pyx_t_18);
            __pyx_t_18 = 0;
            __Pyx_XDECREF_SET(__pyx_v_lev, __pyx_t_6);
            __pyx_t_6 = 0;

            /* "metaphor/monal/driver/_driver.py":2429
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 *                         outs.append(out.squeeze())             # <<<<<<<<<<<<<<
 *                         levs.append(lev.squeeze())
 *                         try:
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2429, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_18 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_18)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_18);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            if (__pyx_t_18) {
              __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2429, __pyx_L25_error)
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            } else {
              __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2429, __pyx_L25_error)
            }
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_outs, __pyx_t_8); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2429, __pyx_L25_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "metaphor/monal/driver/_driver.py":2430
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 *                         outs.append(out.squeeze())
 *                         levs.append(lev.squeeze())             # <<<<<<<<<<<<<<
 *                         try:
 *                             stds.append(std.squeeze())
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_lev, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2430, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_18 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_18)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_18);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            if (__pyx_t_18) {
              __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2430, __pyx_L25_error)
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            } else {
              __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2430, __pyx_L25_error)
            }
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_levs, __pyx_t_8); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2430, __pyx_L25_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "metaphor/monal/driver/_driver.py":2431
 *                         outs.append(out.squeeze())
 *                         levs.append(lev.squeeze())
 *                         try:             # <<<<<<<<<<<<<<
 *                             stds.append(std.squeeze())
 *                         except AttributeError:
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
              __Pyx_XGOTREF(__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_22);
              /*try:*/ {

                /* "metaphor/monal/driver/_driver.py":2432
 *                         levs.append(lev.squeeze())
 *                         try:
 *                             stds.append(std.squeeze())             # <<<<<<<<<<<<<<
 *                         except AttributeError:
 *                             stds.append(std)
 */
                __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_std, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2432, __pyx_L37_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_18 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
                  __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6);
                  if (likely(__pyx_t_18)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                    __Pyx_INCREF(__pyx_t_18);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_6, function);
                  }
                }
                if (__pyx_t_18) {
                  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2432, __pyx_L37_error)
                  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                } else {
                  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2432, __pyx_L37_error)
                }
                __Pyx_GOTREF(__pyx_t_8);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_stds, __pyx_t_8); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2432, __pyx_L37_error)
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                /* "metaphor/monal/driver/_driver.py":2431
 *                         outs.append(out.squeeze())
 *                         levs.append(lev.squeeze())
 *                         try:             # <<<<<<<<<<<<<<
 *                             stds.append(std.squeeze())
 *                         except AttributeError:
 */
              }
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
              goto __pyx_L44_try_end;
              __pyx_L37_error:;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

              /* "metaphor/monal/driver/_driver.py":2433
 *                         try:
 *                             stds.append(std.squeeze())
 *                         except AttributeError:             # <<<<<<<<<<<<<<
 *                             stds.append(std)
 *                 except AttributeError as err:
 */
              __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
              if (__pyx_t_16) {
                __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_18) < 0) __PYX_ERR(0, 2433, __pyx_L39_except_error)
                __Pyx_GOTREF(__pyx_t_8);
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_GOTREF(__pyx_t_18);

                /* "metaphor/monal/driver/_driver.py":2434
 *                             stds.append(std.squeeze())
 *                         except AttributeError:
 *                             stds.append(std)             # <<<<<<<<<<<<<<
 *                 except AttributeError as err:
 *                     raise
 */
                __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_stds, __pyx_v_std); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2434, __pyx_L39_except_error)
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                goto __pyx_L38_exception_handled;
              }
              goto __pyx_L39_except_error;
              __pyx_L39_except_error:;

              /* "metaphor/monal/driver/_driver.py":2431
 *                         outs.append(out.squeeze())
 *                         levs.append(lev.squeeze())
 *                         try:             # <<<<<<<<<<<<<<
 *                             stds.append(std.squeeze())
 *                         except AttributeError:
 */
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
              goto __pyx_L25_error;
              __pyx_L38_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
              __pyx_L44_try_end:;
            }

            /* "metaphor/monal/driver/_driver.py":2427
 *             else:
 *                 try:
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):             # <<<<<<<<<<<<<<
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 *                         outs.append(out.squeeze())
 */
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "metaphor/monal/driver/_driver.py":2426
 *                     raise
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 */
        }
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L30_try_end;
        __pyx_L25_error:;
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "metaphor/monal/driver/_driver.py":2435
 *                         except AttributeError:
 *                             stds.append(std)
 *                 except AttributeError as err:             # <<<<<<<<<<<<<<
 *                     raise
 *         if not withCI:
 */
        __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_16) {
          __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_18, &__pyx_t_6) < 0) __PYX_ERR(0, 2435, __pyx_L27_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_18);
          __pyx_v_err = __pyx_t_18;
          /*try:*/ {

            /* "metaphor/monal/driver/_driver.py":2436
 *                             stds.append(std)
 *                 except AttributeError as err:
 *                     raise             # <<<<<<<<<<<<<<
 *         if not withCI:
 *             return outs, levs
 */
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_18, __pyx_t_6);
            __pyx_t_2 = 0; __pyx_t_18 = 0; __pyx_t_6 = 0; 
            __PYX_ERR(0, 2436, __pyx_L52_error)
          }

          /* "metaphor/monal/driver/_driver.py":2435
 *                         except AttributeError:
 *                             stds.append(std)
 *                 except AttributeError as err:             # <<<<<<<<<<<<<<
 *                     raise
 *         if not withCI:
 */
          /*finally:*/ {
            __pyx_L52_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
              if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_22);
              __Pyx_XGOTREF(__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_27);
              __pyx_t_16 = __pyx_lineno; __pyx_t_23 = __pyx_clineno; __pyx_t_24 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err);
                __pyx_v_err = NULL;
              }
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_25);
                __Pyx_XGIVEREF(__pyx_t_26);
                __Pyx_XGIVEREF(__pyx_t_27);
                __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
              }
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
              __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
              __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_23; __pyx_filename = __pyx_t_24;
              goto __pyx_L27_except_error;
            }
          }
        }
        goto __pyx_L27_except_error;
        __pyx_L27_except_error:;

        /* "metaphor/monal/driver/_driver.py":2426
 *                     raise
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     for weight, disp, std in zip(self._extraweights, self._extradispersions, extrastddev):
 *                         out, lev = self.transferLeverages(inputs, weight, disp)
 */
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
        goto __pyx_L1_error;
        __pyx_L30_try_end:;
      }
    }
    __pyx_L14:;
  }
  __pyx_L6:;

  /* "metaphor/monal/driver/_driver.py":2437
 *                 except AttributeError as err:
 *                     raise
 *         if not withCI:             # <<<<<<<<<<<<<<
 *             return outs, levs
 *         students = [self._studentvariable for _ in range(len(outs))]
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_withCI); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2437, __pyx_L1_error)
  __pyx_t_1 = ((!__pyx_t_4) != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2438
 *                     raise
 *         if not withCI:
 *             return outs, levs             # <<<<<<<<<<<<<<
 *         students = [self._studentvariable for _ in range(len(outs))]
 *         if withCI == 1:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_outs);
    __Pyx_GIVEREF(__pyx_v_outs);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_outs);
    __Pyx_INCREF(__pyx_v_levs);
    __Pyx_GIVEREF(__pyx_v_levs);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_levs);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2437
 *                 except AttributeError as err:
 *                     raise
 *         if not withCI:             # <<<<<<<<<<<<<<
 *             return outs, levs
 *         students = [self._studentvariable for _ in range(len(outs))]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2439
 *         if not withCI:
 *             return outs, levs
 *         students = [self._studentvariable for _ in range(len(outs))]             # <<<<<<<<<<<<<<
 *         if withCI == 1:
 *             return outs, levs, stds, students
 */
  { /* enter inner scope */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PyList_GET_SIZE(__pyx_v_outs); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2439, __pyx_L1_error)
    __pyx_t_11 = __pyx_t_5;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_9genexpr15__pyx_v__ = __pyx_t_12;
      __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_18))) __PYX_ERR(0, 2439, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    }
  } /* exit inner scope */
  __pyx_v_students = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2440
 *             return outs, levs
 *         students = [self._studentvariable for _ in range(len(outs))]
 *         if withCI == 1:             # <<<<<<<<<<<<<<
 *             return outs, levs, stds, students
 *         for out, lev, std in zip(outs, levs, stds):
 */
  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_withCI, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2441
 *         students = [self._studentvariable for _ in range(len(outs))]
 *         if withCI == 1:
 *             return outs, levs, stds, students             # <<<<<<<<<<<<<<
 *         for out, lev, std in zip(outs, levs, stds):
 *             ic = sqrt(lev)*self._studentvariable*std
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_outs);
    __Pyx_GIVEREF(__pyx_v_outs);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_outs);
    __Pyx_INCREF(__pyx_v_levs);
    __Pyx_GIVEREF(__pyx_v_levs);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_levs);
    __Pyx_INCREF(__pyx_v_stds);
    __Pyx_GIVEREF(__pyx_v_stds);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_stds);
    __Pyx_INCREF(__pyx_v_students);
    __Pyx_GIVEREF(__pyx_v_students);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_students);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2440
 *             return outs, levs
 *         students = [self._studentvariable for _ in range(len(outs))]
 *         if withCI == 1:             # <<<<<<<<<<<<<<
 *             return outs, levs, stds, students
 *         for out, lev, std in zip(outs, levs, stds):
 */
  }

  /* "metaphor/monal/driver/_driver.py":2442
 *         if withCI == 1:
 *             return outs, levs, stds, students
 *         for out, lev, std in zip(outs, levs, stds):             # <<<<<<<<<<<<<<
 *             ic = sqrt(lev)*self._studentvariable*std
 *             CIp.append(out + ic)
 */
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_outs);
  __Pyx_GIVEREF(__pyx_v_outs);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_outs);
  __Pyx_INCREF(__pyx_v_levs);
  __Pyx_GIVEREF(__pyx_v_levs);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_levs);
  __Pyx_INCREF(__pyx_v_stds);
  __Pyx_GIVEREF(__pyx_v_stds);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_stds);
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) {
    __pyx_t_6 = __pyx_t_18; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
    __pyx_t_17 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_17 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2442, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  for (;;) {
    if (likely(!__pyx_t_17)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_18 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2442, __pyx_L1_error)
        #else
        __pyx_t_18 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2442, __pyx_L1_error)
        #else
        __pyx_t_18 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        #endif
      }
    } else {
      __pyx_t_18 = __pyx_t_17(__pyx_t_6);
      if (unlikely(!__pyx_t_18)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2442, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_18);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_18))) || (PyList_CheckExact(__pyx_t_18))) {
      PyObject* sequence = __pyx_t_18;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2442, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_19 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_19)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_19); if (unlikely(!__pyx_t_2)) goto __pyx_L64_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_19); if (unlikely(!__pyx_t_8)) goto __pyx_L64_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_19); if (unlikely(!__pyx_t_7)) goto __pyx_L64_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_19), 3) < 0) __PYX_ERR(0, 2442, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      goto __pyx_L65_unpacking_done;
      __pyx_L64_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2442, __pyx_L1_error)
      __pyx_L65_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_out, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_lev, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_std, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2443
 *             return outs, levs, stds, students
 *         for out, lev, std in zip(outs, levs, stds):
 *             ic = sqrt(lev)*self._studentvariable*std             # <<<<<<<<<<<<<<
 *             CIp.append(out + ic)
 *             CIm.append(out - ic)
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_lev); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_lev};
        __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2443, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_18);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_lev};
        __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2443, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_18);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_lev);
        __Pyx_GIVEREF(__pyx_v_lev);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_lev);
        __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_18, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_2, __pyx_v_std); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2444
 *         for out, lev, std in zip(outs, levs, stds):
 *             ic = sqrt(lev)*self._studentvariable*std
 *             CIp.append(out + ic)             # <<<<<<<<<<<<<<
 *             CIm.append(out - ic)
 *         return outs, CIp, CIm, levs
 */
    __pyx_t_7 = PyNumber_Add(__pyx_v_out, __pyx_v_ic); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_CIp, __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2444, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2445
 *             ic = sqrt(lev)*self._studentvariable*std
 *             CIp.append(out + ic)
 *             CIm.append(out - ic)             # <<<<<<<<<<<<<<
 *         return outs, CIp, CIm, levs
 * 
 */
    __pyx_t_7 = PyNumber_Subtract(__pyx_v_out, __pyx_v_ic); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_CIm, __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2442
 *         if withCI == 1:
 *             return outs, levs, stds, students
 *         for out, lev, std in zip(outs, levs, stds):             # <<<<<<<<<<<<<<
 *             ic = sqrt(lev)*self._studentvariable*std
 *             CIp.append(out + ic)
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2446
 *             CIp.append(out + ic)
 *             CIm.append(out - ic)
 *         return outs, CIp, CIm, levs             # <<<<<<<<<<<<<<
 * 
 *     def transferLeverages(self, inputs=None, weights=None, disp=None, donorm=True):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_outs);
  __Pyx_GIVEREF(__pyx_v_outs);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_outs);
  __Pyx_INCREF(__pyx_v_CIp);
  __Pyx_GIVEREF(__pyx_v_CIp);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_CIp);
  __Pyx_INCREF(__pyx_v_CIm);
  __Pyx_GIVEREF(__pyx_v_CIm);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_CIm);
  __Pyx_INCREF(__pyx_v_levs);
  __Pyx_GIVEREF(__pyx_v_levs);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_levs);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2397
 * # new KO ->OK avec suppression de donorm, et modif de  transferLeverages
 * 
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outs);
  __Pyx_XDECREF(__pyx_v_levs);
  __Pyx_XDECREF(__pyx_v_stds);
  __Pyx_XDECREF(__pyx_v_CIp);
  __Pyx_XDECREF(__pyx_v_CIm);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_lev);
  __Pyx_XDECREF(__pyx_v_extrastddev);
  __Pyx_XDECREF(__pyx_v_weight);
  __Pyx_XDECREF(__pyx_v_disp);
  __Pyx_XDECREF(__pyx_v_std);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_students);
  __Pyx_XDECREF(__pyx_v_ic);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2448
 *         return outs, CIp, CIm, levs
 * 
 *     def transferLeverages(self, inputs=None, weights=None, disp=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modele, avec calcul des leviers.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_191transferLeverages(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_190transferLeverages[] = "Transfert par le modele, avec calcul des leviers.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_191transferLeverages = {"transferLeverages", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_191transferLeverages, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_190transferLeverages};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_191transferLeverages(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_weights = 0;
  PyObject *__pyx_v_disp = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferLeverages (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_weights,&__pyx_n_s_disp,&__pyx_n_s_donorm,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferLeverages") < 0)) __PYX_ERR(0, 2448, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_weights = values[2];
    __pyx_v_disp = values[3];
    __pyx_v_donorm = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferLeverages", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2448, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferLeverages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_190transferLeverages(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_weights, __pyx_v_disp, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_190transferLeverages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_weights, PyObject *__pyx_v_disp, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_curweights = NULL;
  PyObject *__pyx_v_curdisp = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_outs = NULL;
  PyObject *__pyx_v_grad = NULL;
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_outlev = NULL;
  PyObject *__pyx_v_mat = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_gradloc = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_outindex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  PyObject *__pyx_t_17 = NULL;
  __Pyx_RefNannySetupContext("transferLeverages", 0);
  __Pyx_INCREF(__pyx_v_inputs);

  /* "metaphor/monal/driver/_driver.py":2453
 * #                     self.mainModel._weights = weight.copy()
 * #                     self._dispersionMatrix = disp.copy()
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             curweights = self.mainModel._weights.copy()
 *             self.mainModel._weights = weights.copy()
 */
  __pyx_t_1 = (__pyx_v_weights != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2454
 * #                     self._dispersionMatrix = disp.copy()
 *         if weights is not None:
 *             curweights = self.mainModel._weights.copy()             # <<<<<<<<<<<<<<
 *             self.mainModel._weights = weights.copy()
 *         if disp is not None:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_weights_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2454, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2454, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_curweights = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2455
 *         if weights is not None:
 *             curweights = self.mainModel._weights.copy()
 *             self.mainModel._weights = weights.copy()             # <<<<<<<<<<<<<<
 *         if disp is not None:
 *             curdisp  = self._dispersionMatrix.copy()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2455, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2455, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_weights_2, __pyx_t_3) < 0) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2453
 * #                     self.mainModel._weights = weight.copy()
 * #                     self._dispersionMatrix = disp.copy()
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             curweights = self.mainModel._weights.copy()
 *             self.mainModel._weights = weights.copy()
 */
  }

  /* "metaphor/monal/driver/_driver.py":2456
 *             curweights = self.mainModel._weights.copy()
 *             self.mainModel._weights = weights.copy()
 *         if disp is not None:             # <<<<<<<<<<<<<<
 *             curdisp  = self._dispersionMatrix.copy()
 *             self._dispersionMatrix = disp.copy()
 */
  __pyx_t_2 = (__pyx_v_disp != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2457
 *             self.mainModel._weights = weights.copy()
 *         if disp is not None:
 *             curdisp  = self._dispersionMatrix.copy()             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = disp.copy()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2457, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2457, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_curdisp = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2458
 *         if disp is not None:
 *             curdisp  = self._dispersionMatrix.copy()
 *             self._dispersionMatrix = disp.copy()             # <<<<<<<<<<<<<<
 * 
 *         if donorm:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_disp, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2458, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2458, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_t_4) < 0) __PYX_ERR(0, 2458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2456
 *             curweights = self.mainModel._weights.copy()
 *             self.mainModel._weights = weights.copy()
 *         if disp is not None:             # <<<<<<<<<<<<<<
 *             curdisp  = self._dispersionMatrix.copy()
 *             self._dispersionMatrix = disp.copy()
 */
  }

  /* "metaphor/monal/driver/_driver.py":2460
 *             self._dispersionMatrix = disp.copy()
 * 
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         res = self.transfer(inputs, C.ID_DIFF)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2460, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2461
 * 
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         res = self.transfer(inputs, C.ID_DIFF)
 *         outs, grad = res[:2]
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_inputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_inputs};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_inputs};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_inputs);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2460
 *             self._dispersionMatrix = disp.copy()
 * 
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         res = self.transfer(inputs, C.ID_DIFF)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2462
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 *         res = self.transfer(inputs, C.ID_DIFF)             # <<<<<<<<<<<<<<
 *         outs, grad = res[:2]
 *         if donorm:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transfer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_inputs, __pyx_t_3};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2462, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_inputs, __pyx_t_3};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2462, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_res = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2463
 *             inputs = self.normalizeInputs(inputs)
 *         res = self.transfer(inputs, C.ID_DIFF)
 *         outs, grad = res[:2]             # <<<<<<<<<<<<<<
 *         if donorm:
 *             outs = self.unnormalizeOutputs(outs)
 */
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_res, 0, 2, NULL, NULL, &__pyx_slice__120, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2463, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2463, __pyx_L1_error)
    __pyx_t_9 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2463, __pyx_L1_error)
    __pyx_L7_unpacking_done:;
  }
  __pyx_v_outs = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_grad = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2464
 *         res = self.transfer(inputs, C.ID_DIFF)
 *         outs, grad = res[:2]
 *         if donorm:             # <<<<<<<<<<<<<<
 *             outs = self.unnormalizeOutputs(outs)
 *             grad = self.unnormalizeOutputs(grad, True)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2464, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2465
 *         outs, grad = res[:2]
 *         if donorm:
 *             outs = self.unnormalizeOutputs(outs)             # <<<<<<<<<<<<<<
 *             grad = self.unnormalizeOutputs(grad, True)
 *         if isscalar(outs):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_outs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outs};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outs};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_outs);
        __Pyx_GIVEREF(__pyx_v_outs);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_outs);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_outs, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2466
 *         if donorm:
 *             outs = self.unnormalizeOutputs(outs)
 *             grad = self.unnormalizeOutputs(grad, True)             # <<<<<<<<<<<<<<
 *         if isscalar(outs):
 *             outputs = asarray([outs])
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_grad, Py_True};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2466, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_grad, Py_True};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2466, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_grad);
      __Pyx_GIVEREF(__pyx_v_grad);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_grad);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, Py_True);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_grad, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2464
 *         res = self.transfer(inputs, C.ID_DIFF)
 *         outs, grad = res[:2]
 *         if donorm:             # <<<<<<<<<<<<<<
 *             outs = self.unnormalizeOutputs(outs)
 *             grad = self.unnormalizeOutputs(grad, True)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2467
 *             outs = self.unnormalizeOutputs(outs)
 *             grad = self.unnormalizeOutputs(grad, True)
 *         if isscalar(outs):             # <<<<<<<<<<<<<<
 *             outputs = asarray([outs])
 *         else:
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_isscalar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_outs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outs};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2467, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outs};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2467, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_outs);
      __Pyx_GIVEREF(__pyx_v_outs);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_outs);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2468
 *             grad = self.unnormalizeOutputs(grad, True)
 *         if isscalar(outs):
 *             outputs = asarray([outs])             # <<<<<<<<<<<<<<
 *         else:
 *             outputs = asarray(outs)
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_outs);
    __Pyx_GIVEREF(__pyx_v_outs);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_outs);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2468, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2468, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2468, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_outputs = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2467
 *             outs = self.unnormalizeOutputs(outs)
 *             grad = self.unnormalizeOutputs(grad, True)
 *         if isscalar(outs):             # <<<<<<<<<<<<<<
 *             outputs = asarray([outs])
 *         else:
 */
    goto __pyx_L9;
  }

  /* "metaphor/monal/driver/_driver.py":2470
 *             outputs = asarray([outs])
 *         else:
 *             outputs = asarray(outs)             # <<<<<<<<<<<<<<
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]
 */
  /*else*/ {
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_outs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_outs};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_outs};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2470, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_outs);
        __Pyx_GIVEREF(__pyx_v_outs);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_outs);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_outputs = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L9:;

  /* "metaphor/monal/driver/_driver.py":2471
 *         else:
 *             outputs = asarray(outs)
 *         if outputs.ndim == 1:             # <<<<<<<<<<<<<<
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputs, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2472
 *             outputs = asarray(outs)
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]             # <<<<<<<<<<<<<<
 *         if grad.ndim == 1:
 *             grad = grad[newaxis, :]
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
    __Pyx_INCREF(__pyx_slice__121);
    __Pyx_GIVEREF(__pyx_slice__121);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_slice__121);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_outputs, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "metaphor/monal/driver/_driver.py":2471
 *         else:
 *             outputs = asarray(outs)
 *         if outputs.ndim == 1:             # <<<<<<<<<<<<<<
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2473
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:             # <<<<<<<<<<<<<<
 *             grad = grad[newaxis, :]
 *         no = self.mainModel.outputCount
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grad, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_8, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2474
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 *             grad = grad[newaxis, :]             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         outlev = zeros((no, self.mainModel.inputDim))
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
    __Pyx_INCREF(__pyx_slice__122);
    __Pyx_GIVEREF(__pyx_slice__122);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__122);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_grad, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_grad, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2473
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:             # <<<<<<<<<<<<<<
 *             grad = grad[newaxis, :]
 *         no = self.mainModel.outputCount
 */
  }

  /* "metaphor/monal/driver/_driver.py":2475
 *         if grad.ndim == 1:
 *             grad = grad[newaxis, :]
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         outlev = zeros((no, self.mainModel.inputDim))
 *         if self._dispersionMatrix is not None:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_no = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2476
 *             grad = grad[newaxis, :]
 *         no = self.mainModel.outputCount
 *         outlev = zeros((no, self.mainModel.inputDim))             # <<<<<<<<<<<<<<
 *         if self._dispersionMatrix is not None:
 *             if no == 1:
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inputDim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_no);
  __Pyx_GIVEREF(__pyx_v_no);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_no);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2476, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_8);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2476, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2476, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_outlev = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2477
 *         no = self.mainModel.outputCount
 *         outlev = zeros((no, self.mainModel.inputDim))
 *         if self._dispersionMatrix is not None:             # <<<<<<<<<<<<<<
 *             if no == 1:
 *                 if self._dispersionMatrix.ndim > 2:
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = (__pyx_t_8 != Py_None);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2478
 *         outlev = zeros((no, self.mainModel.inputDim))
 *         if self._dispersionMatrix is not None:
 *             if no == 1:             # <<<<<<<<<<<<<<
 *                 if self._dispersionMatrix.ndim > 2:
 *                     mat = self._dispersionMatrix[0]
 */
    __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_no, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2478, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":2479
 *         if self._dispersionMatrix is not None:
 *             if no == 1:
 *                 if self._dispersionMatrix.ndim > 2:             # <<<<<<<<<<<<<<
 *                     mat = self._dispersionMatrix[0]
 *                 else:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2479, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2479, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":2480
 *             if no == 1:
 *                 if self._dispersionMatrix.ndim > 2:
 *                     mat = self._dispersionMatrix[0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     mat = self._dispersionMatrix
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2480, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2480, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_mat = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2479
 *         if self._dispersionMatrix is not None:
 *             if no == 1:
 *                 if self._dispersionMatrix.ndim > 2:             # <<<<<<<<<<<<<<
 *                     mat = self._dispersionMatrix[0]
 *                 else:
 */
        goto __pyx_L14;
      }

      /* "metaphor/monal/driver/_driver.py":2482
 *                     mat = self._dispersionMatrix[0]
 *                 else:
 *                     mat = self._dispersionMatrix             # <<<<<<<<<<<<<<
 *                 for ind in range(self.mainModel.inputDim):
 *                     gradloc = grad[ind]
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_mat = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L14:;

      /* "metaphor/monal/driver/_driver.py":2483
 *                 else:
 *                     mat = self._dispersionMatrix
 *                 for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                     gradloc = grad[ind]
 *                     value = squeeze(gradloc.dot(mat).dot(gradloc))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inputDim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2483, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2483, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2483, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_11(__pyx_t_8);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2483, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2484
 *                     mat = self._dispersionMatrix
 *                 for ind in range(self.mainModel.inputDim):
 *                     gradloc = grad[ind]             # <<<<<<<<<<<<<<
 *                     value = squeeze(gradloc.dot(mat).dot(gradloc))
 *                     outlev[0, ind] = value
 */
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_grad, __pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2484, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_gradloc, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2485
 *                 for ind in range(self.mainModel.inputDim):
 *                     gradloc = grad[ind]
 *                     value = squeeze(gradloc.dot(mat).dot(gradloc))             # <<<<<<<<<<<<<<
 *                     outlev[0, ind] = value
 *             else:
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_gradloc, __pyx_n_s_dot); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
          }
        }
        if (!__pyx_t_13) {
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_mat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_mat};
            __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_GOTREF(__pyx_t_6);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_mat};
            __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_GOTREF(__pyx_t_6);
          } else
          #endif
          {
            __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
            __Pyx_INCREF(__pyx_v_mat);
            __Pyx_GIVEREF(__pyx_v_mat);
            PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_mat);
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dot); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
          }
        }
        if (!__pyx_t_6) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_gradloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_gradloc};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_gradloc};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
            __Pyx_INCREF(__pyx_v_gradloc);
            __Pyx_GIVEREF(__pyx_v_gradloc);
            PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_gradloc);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_12) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2486
 *                     gradloc = grad[ind]
 *                     value = squeeze(gradloc.dot(mat).dot(gradloc))
 *                     outlev[0, ind] = value             # <<<<<<<<<<<<<<
 *             else:
 *                 for outindex in range(no):
 */
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ind);
        if (unlikely(PyObject_SetItem(__pyx_v_outlev, __pyx_t_4, __pyx_v_value) < 0)) __PYX_ERR(0, 2486, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2483
 *                 else:
 *                     mat = self._dispersionMatrix
 *                 for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                     gradloc = grad[ind]
 *                     value = squeeze(gradloc.dot(mat).dot(gradloc))
 */
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "metaphor/monal/driver/_driver.py":2478
 *         outlev = zeros((no, self.mainModel.inputDim))
 *         if self._dispersionMatrix is not None:
 *             if no == 1:             # <<<<<<<<<<<<<<
 *                 if self._dispersionMatrix.ndim > 2:
 *                     mat = self._dispersionMatrix[0]
 */
      goto __pyx_L13;
    }

    /* "metaphor/monal/driver/_driver.py":2488
 *                     outlev[0, ind] = value
 *             else:
 *                 for outindex in range(no):             # <<<<<<<<<<<<<<
 *                     mat = self._dispersionMatrix[outindex]
 *                     for ind in range(self.mainModel.inputDim):
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_no); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
        __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2488, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2488, __pyx_L1_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2488, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2488, __pyx_L1_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2488, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_11(__pyx_t_4);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2488, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_v_outindex, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "metaphor/monal/driver/_driver.py":2489
 *             else:
 *                 for outindex in range(no):
 *                     mat = self._dispersionMatrix[outindex]             # <<<<<<<<<<<<<<
 *                     for ind in range(self.mainModel.inputDim):
 *                         gradloc = grad[outindex, ind]
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_outindex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_mat, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/monal/driver/_driver.py":2490
 *                 for outindex in range(no):
 *                     mat = self._dispersionMatrix[outindex]
 *                     for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                         gradloc = grad[outindex, ind]
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_inputDim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2490, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
          __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_15 = 0;
          __pyx_t_16 = NULL;
        } else {
          __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2490, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2490, __pyx_L1_error)
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          if (likely(!__pyx_t_16)) {
            if (likely(PyList_CheckExact(__pyx_t_8))) {
              if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_8)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 2490, __pyx_L1_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
            } else {
              if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 2490, __pyx_L1_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
            }
          } else {
            __pyx_t_5 = __pyx_t_16(__pyx_t_8);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 2490, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "metaphor/monal/driver/_driver.py":2491
 *                     mat = self._dispersionMatrix[outindex]
 *                     for ind in range(self.mainModel.inputDim):
 *                         gradloc = grad[outindex, ind]             # <<<<<<<<<<<<<<
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))
 *                         outlev[outindex, ind] = value
 */
          __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2491, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_outindex);
          __Pyx_GIVEREF(__pyx_v_outindex);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_outindex);
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ind);
          __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_grad, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2491, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF_SET(__pyx_v_gradloc, __pyx_t_14);
          __pyx_t_14 = 0;

          /* "metaphor/monal/driver/_driver.py":2492
 *                     for ind in range(self.mainModel.inputDim):
 *                         gradloc = grad[outindex, ind]
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))             # <<<<<<<<<<<<<<
 *                         outlev[outindex, ind] = value
 *         if weights is not None:
 */
          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_gradloc, __pyx_n_s_dot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_13 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (!__pyx_t_13) {
            __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_mat); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2492, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_mat};
              __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_GOTREF(__pyx_t_12);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_mat};
              __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_GOTREF(__pyx_t_12);
            } else
            #endif
            {
              __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_17);
              __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_13); __pyx_t_13 = NULL;
              __Pyx_INCREF(__pyx_v_mat);
              __Pyx_GIVEREF(__pyx_v_mat);
              PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_v_mat);
              __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_dot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (!__pyx_t_12) {
            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_gradloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_gradloc};
              __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_gradloc};
              __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            {
              __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_17);
              __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_12); __pyx_t_12 = NULL;
              __Pyx_INCREF(__pyx_v_gradloc);
              __Pyx_GIVEREF(__pyx_v_gradloc);
              PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_v_gradloc);
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (!__pyx_t_6) {
            __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2492, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_14);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
              __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
              __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else
            #endif
            {
              __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_17);
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_6); __pyx_t_6 = NULL;
              __Pyx_GIVEREF(__pyx_t_3);
              PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_t_3);
              __pyx_t_3 = 0;
              __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_17, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_14);
          __pyx_t_14 = 0;

          /* "metaphor/monal/driver/_driver.py":2493
 *                         gradloc = grad[outindex, ind]
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))
 *                         outlev[outindex, ind] = value             # <<<<<<<<<<<<<<
 *         if weights is not None:
 *             self.mainModel._weights = curweights
 */
          __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_INCREF(__pyx_v_outindex);
          __Pyx_GIVEREF(__pyx_v_outindex);
          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_outindex);
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ind);
          if (unlikely(PyObject_SetItem(__pyx_v_outlev, __pyx_t_14, __pyx_v_value) < 0)) __PYX_ERR(0, 2493, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

          /* "metaphor/monal/driver/_driver.py":2490
 *                 for outindex in range(no):
 *                     mat = self._dispersionMatrix[outindex]
 *                     for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                         gradloc = grad[outindex, ind]
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))
 */
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "metaphor/monal/driver/_driver.py":2488
 *                     outlev[0, ind] = value
 *             else:
 *                 for outindex in range(no):             # <<<<<<<<<<<<<<
 *                     mat = self._dispersionMatrix[outindex]
 *                     for ind in range(self.mainModel.inputDim):
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L13:;

    /* "metaphor/monal/driver/_driver.py":2477
 *         no = self.mainModel.outputCount
 *         outlev = zeros((no, self.mainModel.inputDim))
 *         if self._dispersionMatrix is not None:             # <<<<<<<<<<<<<<
 *             if no == 1:
 *                 if self._dispersionMatrix.ndim > 2:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2494
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))
 *                         outlev[outindex, ind] = value
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             self.mainModel._weights = curweights
 *         if disp is not None:
 */
  __pyx_t_2 = (__pyx_v_weights != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2495
 *                         outlev[outindex, ind] = value
 *         if weights is not None:
 *             self.mainModel._weights = curweights             # <<<<<<<<<<<<<<
 *         if disp is not None:
 *             self._dispersionMatrix = curdisp
 */
    if (unlikely(!__pyx_v_curweights)) { __Pyx_RaiseUnboundLocalError("curweights"); __PYX_ERR(0, 2495, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_weights_2, __pyx_v_curweights) < 0) __PYX_ERR(0, 2495, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2494
 *                         value = squeeze(gradloc.dot(mat).dot(gradloc))
 *                         outlev[outindex, ind] = value
 *         if weights is not None:             # <<<<<<<<<<<<<<
 *             self.mainModel._weights = curweights
 *         if disp is not None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2496
 *         if weights is not None:
 *             self.mainModel._weights = curweights
 *         if disp is not None:             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = curdisp
 *         return outputs, outlev
 */
  __pyx_t_1 = (__pyx_v_disp != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2497
 *             self.mainModel._weights = curweights
 *         if disp is not None:
 *             self._dispersionMatrix = curdisp             # <<<<<<<<<<<<<<
 *         return outputs, outlev
 * 
 */
    if (unlikely(!__pyx_v_curdisp)) { __Pyx_RaiseUnboundLocalError("curdisp"); __PYX_ERR(0, 2497, __pyx_L1_error) }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix, __pyx_v_curdisp) < 0) __PYX_ERR(0, 2497, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2496
 *         if weights is not None:
 *             self.mainModel._weights = curweights
 *         if disp is not None:             # <<<<<<<<<<<<<<
 *             self._dispersionMatrix = curdisp
 *         return outputs, outlev
 */
  }

  /* "metaphor/monal/driver/_driver.py":2498
 *         if disp is not None:
 *             self._dispersionMatrix = curdisp
 *         return outputs, outlev             # <<<<<<<<<<<<<<
 * 
 *     def transferCI(self, inputs, donorm=True, withlev=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_outputs);
  __Pyx_GIVEREF(__pyx_v_outputs);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_outputs);
  __Pyx_INCREF(__pyx_v_outlev);
  __Pyx_GIVEREF(__pyx_v_outlev);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_outlev);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2448
 *         return outs, CIp, CIm, levs
 * 
 *     def transferLeverages(self, inputs=None, weights=None, disp=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modele, avec calcul des leviers.
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferLeverages", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_curweights);
  __Pyx_XDECREF(__pyx_v_curdisp);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_outs);
  __Pyx_XDECREF(__pyx_v_grad);
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_outlev);
  __Pyx_XDECREF(__pyx_v_mat);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_gradloc);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_outindex);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2500
 *         return outputs, outlev
 * 
 *     def transferCI(self, inputs, donorm=True, withlev=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_193transferCI(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_192transferCI[] = "Transfert par le mod\303\257\302\277\305\223le, avec calcul des intervalles de confiance.\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_193transferCI = {"transferCI", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_193transferCI, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_192transferCI};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_193transferCI(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_v_withlev = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferCI (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_donorm,&__pyx_n_s_withlev,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_True));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("transferCI", 0, 2, 4, 1); __PYX_ERR(0, 2500, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withlev);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferCI") < 0)) __PYX_ERR(0, 2500, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_donorm = values[2];
    __pyx_v_withlev = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferCI", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2500, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferCI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_192transferCI(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_donorm, __pyx_v_withlev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_192transferCI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_donorm, PyObject *__pyx_v_withlev) {
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_leverages = NULL;
  PyObject *__pyx_v_outputsicp = NULL;
  PyObject *__pyx_v_outputsicm = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_ic = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("transferCI", 0);
  __Pyx_INCREF(__pyx_v_inputs);

  /* "metaphor/monal/driver/_driver.py":2503
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         """
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, leverages = self.transferLeverages(inputs, donorm=False)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2503, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2504
 *         """
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         outputs, leverages = self.transferLeverages(inputs, donorm=False)
 *         leverages = squeeze(leverages)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_inputs);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2503
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         """
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, leverages = self.transferLeverages(inputs, donorm=False)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2505
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, leverages = self.transferLeverages(inputs, donorm=False)             # <<<<<<<<<<<<<<
 *         leverages = squeeze(leverages)
 *         outputsicp = npcopy(outputs)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferLeverages); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_GIVEREF(__pyx_v_inputs);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_inputs);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_donorm, Py_False) < 0) __PYX_ERR(0, 2505, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2505, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < 0) __PYX_ERR(0, 2505, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2505, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_outputs = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_leverages = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":2506
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, leverages = self.transferLeverages(inputs, donorm=False)
 *         leverages = squeeze(leverages)             # <<<<<<<<<<<<<<
 *         outputsicp = npcopy(outputs)
 *         outputsicm = npcopy(outputs)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_leverages); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_leverages};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_leverages};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_leverages);
      __Pyx_GIVEREF(__pyx_v_leverages);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_leverages);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_leverages, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2507
 *         outputs, leverages = self.transferLeverages(inputs, donorm=False)
 *         leverages = squeeze(leverages)
 *         outputsicp = npcopy(outputs)             # <<<<<<<<<<<<<<
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_npcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_outputs);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_outputsicp = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2508
 *         leverages = squeeze(leverages)
 *         outputsicp = npcopy(outputs)
 *         outputsicm = npcopy(outputs)             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         if no == 1:
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_npcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2508, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2508, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_outputs);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_outputsicm = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2509
 *         outputsicp = npcopy(outputs)
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         if no == 1:
 *             for ind in range(self.mainModel.inputDim):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_no = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":2510
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 *         if no == 1:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.inputDim):
 *                 if leverages.ndim:
 */
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_no, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2511
 *         no = self.mainModel.outputCount
 *         if no == 1:
 *             for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                 if leverages.ndim:
 *                     ic = sqrt(leverages[ind])*self._studentvariable*self._stdtrain
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inputDim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2511, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2511, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2511, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2511, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2511, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2511, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2512
 *         if no == 1:
 *             for ind in range(self.mainModel.inputDim):
 *                 if leverages.ndim:             # <<<<<<<<<<<<<<
 *                     ic = sqrt(leverages[ind])*self._studentvariable*self._stdtrain
 *                 else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leverages, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2512, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":2513
 *             for ind in range(self.mainModel.inputDim):
 *                 if leverages.ndim:
 *                     ic = sqrt(leverages[ind])*self._studentvariable*self._stdtrain             # <<<<<<<<<<<<<<
 *                 else:
 *                     ic = sqrt(leverages)*self._studentvariable*self._stdtrain
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_leverages, __pyx_v_ind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        if (!__pyx_t_9) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          {
            __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2513, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyNumber_Multiply(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/monal/driver/_driver.py":2512
 *         if no == 1:
 *             for ind in range(self.mainModel.inputDim):
 *                 if leverages.ndim:             # <<<<<<<<<<<<<<
 *                     ic = sqrt(leverages[ind])*self._studentvariable*self._stdtrain
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "metaphor/monal/driver/_driver.py":2515
 *                     ic = sqrt(leverages[ind])*self._studentvariable*self._stdtrain
 *                 else:
 *                     ic = sqrt(leverages)*self._studentvariable*self._stdtrain             # <<<<<<<<<<<<<<
 * 
 *                 outputsicp[0, ind] += ic
 */
      /*else*/ {
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        if (!__pyx_t_10) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_leverages); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_leverages};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_leverages};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2515, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
            __Pyx_INCREF(__pyx_v_leverages);
            __Pyx_GIVEREF(__pyx_v_leverages);
            PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_leverages);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L9:;

      /* "metaphor/monal/driver/_driver.py":2517
 *                     ic = sqrt(leverages)*self._studentvariable*self._stdtrain
 * 
 *                 outputsicp[0, ind] += ic             # <<<<<<<<<<<<<<
 *                 outputsicm[0, ind] -= ic
 *         else:
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ind);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_outputsicp, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_v_ic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_outputsicp, __pyx_t_3, __pyx_t_5) < 0)) __PYX_ERR(0, 2517, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2518
 * 
 *                 outputsicp[0, ind] += ic
 *                 outputsicm[0, ind] -= ic             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ind);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_outputsicm, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_t_5, __pyx_v_ic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_outputsicm, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 2518, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/monal/driver/_driver.py":2511
 *         no = self.mainModel.outputCount
 *         if no == 1:
 *             for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                 if leverages.ndim:
 *                     ic = sqrt(leverages[ind])*self._studentvariable*self._stdtrain
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2510
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 *         if no == 1:             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.inputDim):
 *                 if leverages.ndim:
 */
    goto __pyx_L6;
  }

  /* "metaphor/monal/driver/_driver.py":2520
 *                 outputsicm[0, ind] -= ic
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         outputs = squeeze(outputs)
 *         outputsicp = squeeze(outputsicp)
 */
  /*else*/ {
  }
  __pyx_L6:;

  /* "metaphor/monal/driver/_driver.py":2521
 *         else:
 *             pass
 *         outputs = squeeze(outputs)             # <<<<<<<<<<<<<<
 *         outputsicp = squeeze(outputsicp)
 *         outputsicm = squeeze(outputsicm)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2521, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2521, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_outputs);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2522
 *             pass
 *         outputs = squeeze(outputs)
 *         outputsicp = squeeze(outputsicp)             # <<<<<<<<<<<<<<
 *         outputsicm = squeeze(outputsicm)
 *         if not outputs.ndim:
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_outputsicp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outputsicp};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2522, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outputsicp};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2522, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_outputsicp);
      __Pyx_GIVEREF(__pyx_v_outputsicp);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_outputsicp);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_outputsicp, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2523
 *         outputs = squeeze(outputs)
 *         outputsicp = squeeze(outputsicp)
 *         outputsicm = squeeze(outputsicm)             # <<<<<<<<<<<<<<
 *         if not outputs.ndim:
 *             outputs = float(outputs)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_outputsicm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputsicm};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_outputsicm};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_outputsicm);
      __Pyx_GIVEREF(__pyx_v_outputsicm);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_outputsicm);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_outputsicm, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2524
 *         outputsicp = squeeze(outputsicp)
 *         outputsicm = squeeze(outputsicm)
 *         if not outputs.ndim:             # <<<<<<<<<<<<<<
 *             outputs = float(outputs)
 *         if not outputsicp.ndim:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputs, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_11 = ((!__pyx_t_1) != 0);
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":2525
 *         outputsicm = squeeze(outputsicm)
 *         if not outputs.ndim:
 *             outputs = float(outputs)             # <<<<<<<<<<<<<<
 *         if not outputsicp.ndim:
 *             outputsicp = float(outputsicp)
 */
    __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2524
 *         outputsicp = squeeze(outputsicp)
 *         outputsicm = squeeze(outputsicm)
 *         if not outputs.ndim:             # <<<<<<<<<<<<<<
 *             outputs = float(outputs)
 *         if not outputsicp.ndim:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2526
 *         if not outputs.ndim:
 *             outputs = float(outputs)
 *         if not outputsicp.ndim:             # <<<<<<<<<<<<<<
 *             outputsicp = float(outputsicp)
 *         if not outputsicm.ndim:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputsicp, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_11) != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2527
 *             outputs = float(outputs)
 *         if not outputsicp.ndim:
 *             outputsicp = float(outputsicp)             # <<<<<<<<<<<<<<
 *         if not outputsicm.ndim:
 *             outputsicm = float(outputsicm)
 */
    __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_v_outputsicp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_outputsicp, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2526
 *         if not outputs.ndim:
 *             outputs = float(outputs)
 *         if not outputsicp.ndim:             # <<<<<<<<<<<<<<
 *             outputsicp = float(outputsicp)
 *         if not outputsicm.ndim:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2528
 *         if not outputsicp.ndim:
 *             outputsicp = float(outputsicp)
 *         if not outputsicm.ndim:             # <<<<<<<<<<<<<<
 *             outputsicm = float(outputsicm)
 *         if donorm:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputsicm, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_11 = ((!__pyx_t_1) != 0);
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":2529
 *             outputsicp = float(outputsicp)
 *         if not outputsicm.ndim:
 *             outputsicm = float(outputsicm)             # <<<<<<<<<<<<<<
 *         if donorm:
 *             if withlev:
 */
    __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_v_outputsicm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_outputsicm, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2528
 *         if not outputsicp.ndim:
 *             outputsicp = float(outputsicp)
 *         if not outputsicm.ndim:             # <<<<<<<<<<<<<<
 *             outputsicm = float(outputsicm)
 *         if donorm:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2530
 *         if not outputsicm.ndim:
 *             outputsicm = float(outputsicm)
 *         if donorm:             # <<<<<<<<<<<<<<
 *             if withlev:
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2530, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":2531
 *             outputsicm = float(outputsicm)
 *         if donorm:
 *             if withlev:             # <<<<<<<<<<<<<<
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_withlev); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2531, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "metaphor/monal/driver/_driver.py":2532
 *         if donorm:
 *             if withlev:
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages             # <<<<<<<<<<<<<<
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         if withlev:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2532, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2532, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_outputs);
      __Pyx_INCREF(__pyx_v_outputsicp);
      __Pyx_GIVEREF(__pyx_v_outputsicp);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_outputsicp);
      __Pyx_INCREF(__pyx_v_outputsicm);
      __Pyx_GIVEREF(__pyx_v_outputsicm);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_outputsicm);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2532, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_leverages);
      __Pyx_GIVEREF(__pyx_v_leverages);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leverages);
      __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":2531
 *             outputsicm = float(outputsicm)
 *         if donorm:
 *             if withlev:             # <<<<<<<<<<<<<<
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 */
    }

    /* "metaphor/monal/driver/_driver.py":2533
 *             if withlev:
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))             # <<<<<<<<<<<<<<
 *         if withlev:
 *             return outputs, outputsicp, outputsicm, leverages
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_outputs);
    __Pyx_INCREF(__pyx_v_outputsicp);
    __Pyx_GIVEREF(__pyx_v_outputsicp);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_outputsicp);
    __Pyx_INCREF(__pyx_v_outputsicm);
    __Pyx_GIVEREF(__pyx_v_outputsicm);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_outputsicm);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_10};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_10};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_10);
        __pyx_t_10 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2530
 *         if not outputsicm.ndim:
 *             outputsicm = float(outputsicm)
 *         if donorm:             # <<<<<<<<<<<<<<
 *             if withlev:
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 */
  }

  /* "metaphor/monal/driver/_driver.py":2534
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         if withlev:             # <<<<<<<<<<<<<<
 *             return outputs, outputsicp, outputsicm, leverages
 *         return outputs, outputsicp, outputsicm
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_withlev); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2534, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "metaphor/monal/driver/_driver.py":2535
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         if withlev:
 *             return outputs, outputsicp, outputsicm, leverages             # <<<<<<<<<<<<<<
 *         return outputs, outputsicp, outputsicm
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_outputs);
    __Pyx_INCREF(__pyx_v_outputsicp);
    __Pyx_GIVEREF(__pyx_v_outputsicp);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_outputsicp);
    __Pyx_INCREF(__pyx_v_outputsicm);
    __Pyx_GIVEREF(__pyx_v_outputsicm);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_outputsicm);
    __Pyx_INCREF(__pyx_v_leverages);
    __Pyx_GIVEREF(__pyx_v_leverages);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_leverages);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2534
 *                 return self.unnormalizeOutputs((outputs, outputsicp, outputsicm)), leverages
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         if withlev:             # <<<<<<<<<<<<<<
 *             return outputs, outputsicp, outputsicm, leverages
 *         return outputs, outputsicp, outputsicm
 */
  }

  /* "metaphor/monal/driver/_driver.py":2536
 *         if withlev:
 *             return outputs, outputsicp, outputsicm, leverages
 *         return outputs, outputsicp, outputsicm             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_outputs);
  __Pyx_GIVEREF(__pyx_v_outputs);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_outputs);
  __Pyx_INCREF(__pyx_v_outputsicp);
  __Pyx_GIVEREF(__pyx_v_outputsicp);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_outputsicp);
  __Pyx_INCREF(__pyx_v_outputsicm);
  __Pyx_GIVEREF(__pyx_v_outputsicm);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_outputsicm);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2500
 *         return outputs, outlev
 * 
 *     def transferCI(self, inputs, donorm=True, withlev=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferCI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_leverages);
  __Pyx_XDECREF(__pyx_v_outputsicp);
  __Pyx_XDECREF(__pyx_v_outputsicm);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_ic);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2539
 * 
 * 
 *     def transferCIOld(self, inputs, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         obsolete
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_195transferCIOld(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_194transferCIOld[] = "Transfert par le mod\303\257\302\277\305\223le, avec calcul des intervalles de confiance.\n        obsolete\n        ";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_195transferCIOld = {"transferCIOld", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_195transferCIOld, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_194transferCIOld};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_195transferCIOld(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transferCIOld (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_donorm,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("transferCIOld", 0, 2, 3, 1); __PYX_ERR(0, 2539, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transferCIOld") < 0)) __PYX_ERR(0, 2539, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_donorm = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transferCIOld", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2539, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferCIOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_194transferCIOld(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_donorm);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_194transferCIOld(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_donorm) {
  PyObject *__pyx_v_outputs = NULL;
  PyObject *__pyx_v_grad = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_outputsicp = NULL;
  PyObject *__pyx_v_outputsicm = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_mat = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_gradloc = NULL;
  PyObject *__pyx_v_hh = NULL;
  PyObject *__pyx_v_ic = NULL;
  PyObject *__pyx_v_outindex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("transferCIOld", 0);
  __Pyx_INCREF(__pyx_v_inputs);

  /* "metaphor/monal/driver/_driver.py":2543
 *         obsolete
 *         """
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2543, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2544
 *         """
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 *         if outputs.ndim == 1:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_inputs);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2543
 *         obsolete
 *         """
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2545
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)             # <<<<<<<<<<<<<<
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_transferOld); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_inputs);
  __Pyx_GIVEREF(__pyx_v_inputs);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_inputs);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_donorm, Py_False) < 0) __PYX_ERR(0, 2545, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2545, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 2545, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2545, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_outputs = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_grad = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v__ = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":2546
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 *         if outputs.ndim == 1:             # <<<<<<<<<<<<<<
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputs, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2547
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]             # <<<<<<<<<<<<<<
 *         if grad.ndim == 1:
 *             outputsicp = npcopy(outputs)
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_INCREF(__pyx_slice__123);
    __Pyx_GIVEREF(__pyx_slice__123);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_slice__123);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_outputs, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_outputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2546
 *             inputs = self.normalizeInputs(inputs)
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 *         if outputs.ndim == 1:             # <<<<<<<<<<<<<<
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2548
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:             # <<<<<<<<<<<<<<
 *             outputsicp = npcopy(outputs)
 *             grad = grad[newaxis, :]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grad, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2549
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 *             outputsicp = npcopy(outputs)             # <<<<<<<<<<<<<<
 *             grad = grad[newaxis, :]
 *         outputsicm = npcopy(outputs)
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_npcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_outputs};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_outputs};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_outputs);
        __Pyx_GIVEREF(__pyx_v_outputs);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_outputs);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_outputsicp = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2550
 *         if grad.ndim == 1:
 *             outputsicp = npcopy(outputs)
 *             grad = grad[newaxis, :]             # <<<<<<<<<<<<<<
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_INCREF(__pyx_slice__124);
    __Pyx_GIVEREF(__pyx_slice__124);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_slice__124);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_grad, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_grad, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2548
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:             # <<<<<<<<<<<<<<
 *             outputsicp = npcopy(outputs)
 *             grad = grad[newaxis, :]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2551
 *             outputsicp = npcopy(outputs)
 *             grad = grad[newaxis, :]
 *         outputsicm = npcopy(outputs)             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         if no == 1:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_npcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_outputs};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_outputs);
      __Pyx_GIVEREF(__pyx_v_outputs);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_outputs);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_outputsicm = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":2552
 *             grad = grad[newaxis, :]
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount             # <<<<<<<<<<<<<<
 *         if no == 1:
 *             mat = asmatrix(self._dispersionMatrix[0])
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_no = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":2553
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 *         if no == 1:             # <<<<<<<<<<<<<<
 *             mat = asmatrix(self._dispersionMatrix[0])
 *             for ind in range(self.mainModel.inputDim):
 */
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_no, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2554
 *         no = self.mainModel.outputCount
 *         if no == 1:
 *             mat = asmatrix(self._dispersionMatrix[0])             # <<<<<<<<<<<<<<
 *             for ind in range(self.mainModel.inputDim):
 *                 gradloc = asmatrix(grad[ind])
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asmatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_mat = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2555
 *         if no == 1:
 *             mat = asmatrix(self._dispersionMatrix[0])
 *             for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                 gradloc = asmatrix(grad[ind])
 *                 hh = squeeze(asarray(gradloc * mat * gradloc.T))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inputDim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2555, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2555, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2555, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2555, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2556
 *             mat = asmatrix(self._dispersionMatrix[0])
 *             for ind in range(self.mainModel.inputDim):
 *                 gradloc = asmatrix(grad[ind])             # <<<<<<<<<<<<<<
 *                 hh = squeeze(asarray(gradloc * mat * gradloc.T))
 *                 ic = sqrt(hh)*self._studentvariable*self._stdtrain
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_asmatrix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_grad, __pyx_v_ind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2556, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2556, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2556, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2556, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2556, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_gradloc, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2557
 *             for ind in range(self.mainModel.inputDim):
 *                 gradloc = asmatrix(grad[ind])
 *                 hh = squeeze(asarray(gradloc * mat * gradloc.T))             # <<<<<<<<<<<<<<
 *                 ic = sqrt(hh)*self._studentvariable*self._stdtrain
 *                 outputsicp[0, ind] += ic
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyNumber_Multiply(__pyx_v_gradloc, __pyx_v_mat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_gradloc, __pyx_n_s_T); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = PyNumber_Multiply(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_11) {
        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2557, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_12);
          __pyx_t_12 = 0;
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_10};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_10};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_hh, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2558
 *                 gradloc = asmatrix(grad[ind])
 *                 hh = squeeze(asarray(gradloc * mat * gradloc.T))
 *                 ic = sqrt(hh)*self._studentvariable*self._stdtrain             # <<<<<<<<<<<<<<
 *                 outputsicp[0, ind] += ic
 *                 outputsicm[0, ind] -= ic
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_hh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_hh};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_hh};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2558, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_INCREF(__pyx_v_hh);
          __Pyx_GIVEREF(__pyx_v_hh);
          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_hh);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2559
 *                 hh = squeeze(asarray(gradloc * mat * gradloc.T))
 *                 ic = sqrt(hh)*self._studentvariable*self._stdtrain
 *                 outputsicp[0, ind] += ic             # <<<<<<<<<<<<<<
 *                 outputsicm[0, ind] -= ic
 *         else:
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ind);
      if (unlikely(!__pyx_v_outputsicp)) { __Pyx_RaiseUnboundLocalError("outputsicp"); __PYX_ERR(0, 2559, __pyx_L1_error) }
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_outputsicp, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_v_ic); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_v_outputsicp)) { __Pyx_RaiseUnboundLocalError("outputsicp"); __PYX_ERR(0, 2559, __pyx_L1_error) }
      if (unlikely(PyObject_SetItem(__pyx_v_outputsicp, __pyx_t_2, __pyx_t_10) < 0)) __PYX_ERR(0, 2559, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2560
 *                 ic = sqrt(hh)*self._studentvariable*self._stdtrain
 *                 outputsicp[0, ind] += ic
 *                 outputsicm[0, ind] -= ic             # <<<<<<<<<<<<<<
 *         else:
 *             for outindex in range(no):
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ind);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_outputsicm, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = PyNumber_InPlaceSubtract(__pyx_t_10, __pyx_v_ic); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_outputsicm, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(0, 2560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2555
 *         if no == 1:
 *             mat = asmatrix(self._dispersionMatrix[0])
 *             for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                 gradloc = asmatrix(grad[ind])
 *                 hh = squeeze(asarray(gradloc * mat * gradloc.T))
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2553
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 *         if no == 1:             # <<<<<<<<<<<<<<
 *             mat = asmatrix(self._dispersionMatrix[0])
 *             for ind in range(self.mainModel.inputDim):
 */
    goto __pyx_L8;
  }

  /* "metaphor/monal/driver/_driver.py":2562
 *                 outputsicm[0, ind] -= ic
 *         else:
 *             for outindex in range(no):             # <<<<<<<<<<<<<<
 *                 mat = asmatrix(self._dispersionMatrix[outindex])
 *                 for ind in range(self.mainModel.inputDim):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_no); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2562, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2562, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2562, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_9(__pyx_t_2);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2562, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_outindex, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2563
 *         else:
 *             for outindex in range(no):
 *                 mat = asmatrix(self._dispersionMatrix[outindex])             # <<<<<<<<<<<<<<
 *                 for ind in range(self.mainModel.inputDim):
 *                     gradloc = asmatrix(grad[outindex, ind])
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_asmatrix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_outindex); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_10) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_3};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_3};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2563, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_mat, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2564
 *             for outindex in range(no):
 *                 mat = asmatrix(self._dispersionMatrix[outindex])
 *                 for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                     gradloc = asmatrix(grad[outindex, ind])
 *                     hh = squeeze(asarray(gradloc * mat * gradloc.T))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inputDim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2564, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_14)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2564, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2564, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_14(__pyx_t_6);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2564, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2565
 *                 mat = asmatrix(self._dispersionMatrix[outindex])
 *                 for ind in range(self.mainModel.inputDim):
 *                     gradloc = asmatrix(grad[outindex, ind])             # <<<<<<<<<<<<<<
 *                     hh = squeeze(asarray(gradloc * mat * gradloc.T))
 *                     ic = sqrt(hh)*self._studentvariable*self._stdtrain
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_asmatrix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_outindex);
        __Pyx_GIVEREF(__pyx_v_outindex);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_outindex);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ind);
        __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_grad, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_3) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_10};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_10};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2565, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL;
            __Pyx_GIVEREF(__pyx_t_10);
            PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
            __pyx_t_10 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_gradloc, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2566
 *                 for ind in range(self.mainModel.inputDim):
 *                     gradloc = asmatrix(grad[outindex, ind])
 *                     hh = squeeze(asarray(gradloc * mat * gradloc.T))             # <<<<<<<<<<<<<<
 *                     ic = sqrt(hh)*self._studentvariable*self._stdtrain
 *                     outputsicp[outindex, ind] += ic
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_squeeze); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_3 = PyNumber_Multiply(__pyx_v_gradloc, __pyx_v_mat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_gradloc, __pyx_n_s_T); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15 = PyNumber_Multiply(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (!__pyx_t_11) {
          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2566, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_12);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_15};
            __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_15};
            __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
            __Pyx_GIVEREF(__pyx_t_15);
            PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_15);
            __pyx_t_15 = 0;
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_10) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __pyx_t_10 = NULL;
            __Pyx_GIVEREF(__pyx_t_12);
            PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_12);
            __pyx_t_12 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_hh, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2567
 *                     gradloc = asmatrix(grad[outindex, ind])
 *                     hh = squeeze(asarray(gradloc * mat * gradloc.T))
 *                     ic = sqrt(hh)*self._studentvariable*self._stdtrain             # <<<<<<<<<<<<<<
 *                     outputsicp[outindex, ind] += ic
 *                     outputsicm[outindex, ind] -= ic
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sqrt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_3) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_hh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_hh};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_4);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_hh};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_4);
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2567, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_v_hh);
            __Pyx_GIVEREF(__pyx_v_hh);
            PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_hh);
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = PyNumber_Multiply(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stdtrain); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyNumber_Multiply(__pyx_t_12, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2568
 *                     hh = squeeze(asarray(gradloc * mat * gradloc.T))
 *                     ic = sqrt(hh)*self._studentvariable*self._stdtrain
 *                     outputsicp[outindex, ind] += ic             # <<<<<<<<<<<<<<
 *                     outputsicm[outindex, ind] -= ic
 * 
 */
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_outindex);
        __Pyx_GIVEREF(__pyx_v_outindex);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_outindex);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ind);
        if (unlikely(!__pyx_v_outputsicp)) { __Pyx_RaiseUnboundLocalError("outputsicp"); __PYX_ERR(0, 2568, __pyx_L1_error) }
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_outputsicp, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_v_ic); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2568, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_v_outputsicp)) { __Pyx_RaiseUnboundLocalError("outputsicp"); __PYX_ERR(0, 2568, __pyx_L1_error) }
        if (unlikely(PyObject_SetItem(__pyx_v_outputsicp, __pyx_t_4, __pyx_t_12) < 0)) __PYX_ERR(0, 2568, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2569
 *                     ic = sqrt(hh)*self._studentvariable*self._stdtrain
 *                     outputsicp[outindex, ind] += ic
 *                     outputsicm[outindex, ind] -= ic             # <<<<<<<<<<<<<<
 * 
 *         if donorm:
 */
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_outindex);
        __Pyx_GIVEREF(__pyx_v_outindex);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_outindex);
        __Pyx_INCREF(__pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ind);
        __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_outputsicm, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = PyNumber_InPlaceSubtract(__pyx_t_12, __pyx_v_ic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_outputsicm, __pyx_t_4, __pyx_t_5) < 0)) __PYX_ERR(0, 2569, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "metaphor/monal/driver/_driver.py":2564
 *             for outindex in range(no):
 *                 mat = asmatrix(self._dispersionMatrix[outindex])
 *                 for ind in range(self.mainModel.inputDim):             # <<<<<<<<<<<<<<
 *                     gradloc = asmatrix(grad[outindex, ind])
 *                     hh = squeeze(asarray(gradloc * mat * gradloc.T))
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2562
 *                 outputsicm[0, ind] -= ic
 *         else:
 *             for outindex in range(no):             # <<<<<<<<<<<<<<
 *                 mat = asmatrix(self._dispersionMatrix[outindex])
 *                 for ind in range(self.mainModel.inputDim):
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L8:;

  /* "metaphor/monal/driver/_driver.py":2571
 *                     outputsicm[outindex, ind] -= ic
 * 
 *         if donorm:             # <<<<<<<<<<<<<<
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         return outputs, outputsicp, outputsicm
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2571, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2572
 * 
 *         if donorm:
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))             # <<<<<<<<<<<<<<
 *         return outputs, outputsicp, outputsicm
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(!__pyx_v_outputsicp)) { __Pyx_RaiseUnboundLocalError("outputsicp"); __PYX_ERR(0, 2572, __pyx_L1_error) }
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_outputs);
    __Pyx_GIVEREF(__pyx_v_outputs);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_outputs);
    __Pyx_INCREF(__pyx_v_outputsicp);
    __Pyx_GIVEREF(__pyx_v_outputsicp);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_outputsicp);
    __Pyx_INCREF(__pyx_v_outputsicm);
    __Pyx_GIVEREF(__pyx_v_outputsicm);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_outputsicm);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2571
 *                     outputsicm[outindex, ind] -= ic
 * 
 *         if donorm:             # <<<<<<<<<<<<<<
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         return outputs, outputsicp, outputsicm
 */
  }

  /* "metaphor/monal/driver/_driver.py":2573
 *         if donorm:
 *             return self.unnormalizeOutputs((outputs, outputsicp, outputsicm))
 *         return outputs, outputsicp, outputsicm             # <<<<<<<<<<<<<<
 * 
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_outputsicp)) { __Pyx_RaiseUnboundLocalError("outputsicp"); __PYX_ERR(0, 2573, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_outputs);
  __Pyx_GIVEREF(__pyx_v_outputs);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_outputs);
  __Pyx_INCREF(__pyx_v_outputsicp);
  __Pyx_GIVEREF(__pyx_v_outputsicp);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_outputsicp);
  __Pyx_INCREF(__pyx_v_outputsicm);
  __Pyx_GIVEREF(__pyx_v_outputsicm);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_outputsicm);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2539
 * 
 * 
 *     def transferCIOld(self, inputs, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         obsolete
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transferCIOld", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outputs);
  __Pyx_XDECREF(__pyx_v_grad);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_outputsicp);
  __Pyx_XDECREF(__pyx_v_outputsicm);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_mat);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_gradloc);
  __Pyx_XDECREF(__pyx_v_hh);
  __Pyx_XDECREF(__pyx_v_ic);
  __Pyx_XDECREF(__pyx_v_outindex);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2575
 *         return outputs, outputsicp, outputsicm
 * 
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         gradient = None
 *         gradientInput = None
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_style);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_style);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_style);
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_False));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_197transfer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_197transfer = {"transfer", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_197transfer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_197transfer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_v_donorm = 0;
  PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transfer (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_style,&__pyx_n_s_donorm,0};
    PyObject* values[4] = {0,0,0,0};
    __pyx_defaults9 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self);
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = __pyx_dynamic_args->__pyx_arg_style;
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_donorm);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "transfer") < 0)) __PYX_ERR(0, 2575, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_style = values[2];
    __pyx_v_donorm = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transfer", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transfer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_196transfer(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_style, __pyx_v_donorm, __pyx_v_kwds);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_196transfer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_style, PyObject *__pyx_v_donorm, PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_gradient = NULL;
  PyObject *__pyx_v_gradientInput = NULL;
  PyObject *__pyx_v_lev = NULL;
  PyObject *__pyx_v_output = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("transfer", 0);
  __Pyx_INCREF(__pyx_v_inputs);

  /* "metaphor/monal/driver/_driver.py":2576
 * 
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver
 *         gradient = None             # <<<<<<<<<<<<<<
 *         gradientInput = None
 *         lev = None
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_gradient = Py_None;

  /* "metaphor/monal/driver/_driver.py":2577
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver
 *         gradient = None
 *         gradientInput = None             # <<<<<<<<<<<<<<
 *         lev = None
 *         if donorm:
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_gradientInput = Py_None;

  /* "metaphor/monal/driver/_driver.py":2578
 *         gradient = None
 *         gradientInput = None
 *         lev = None             # <<<<<<<<<<<<<<
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_lev = Py_None;

  /* "metaphor/monal/driver/_driver.py":2579
 *         gradientInput = None
 *         lev = None
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         if style == C.TFR_STD:  # 0
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2579, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2580
 *         lev = None
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)             # <<<<<<<<<<<<<<
 *         if style == C.TFR_STD:  # 0
 *             output = self.mainModel.transfer(inputs, **kwds)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_inputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2580, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_inputs};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2580, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2580, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_inputs);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2580, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/monal/driver/_driver.py":2579
 *         gradientInput = None
 *         lev = None
 *         if donorm:             # <<<<<<<<<<<<<<
 *             inputs = self.normalizeInputs(inputs)
 *         if style == C.TFR_STD:  # 0
 */
  }

  /* "metaphor/monal/driver/_driver.py":2581
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 *         if style == C.TFR_STD:  # 0             # <<<<<<<<<<<<<<
 *             output = self.mainModel.transfer(inputs, **kwds)
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_style, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2582
 *             inputs = self.normalizeInputs(inputs)
 *         if style == C.TFR_STD:  # 0
 *             output = self.mainModel.transfer(inputs, **kwds)             # <<<<<<<<<<<<<<
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_transfer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_inputs);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_v_kwds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_output = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2581
 *         if donorm:
 *             inputs = self.normalizeInputs(inputs)
 *         if style == C.TFR_STD:  # 0             # <<<<<<<<<<<<<<
 *             output = self.mainModel.transfer(inputs, **kwds)
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)
 */
    goto __pyx_L4;
  }

  /* "metaphor/monal/driver/_driver.py":2583
 *         if style == C.TFR_STD:  # 0
 *             output = self.mainModel.transfer(inputs, **kwds)
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)             # <<<<<<<<<<<<<<
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)
 *             if len(res) == 3:
 */
  __Pyx_INCREF(__pyx_v_style);
  __pyx_t_5 = __pyx_v_style;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_GRADIENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_GRADIENTINPUTS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TFR_LEVERAGE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "metaphor/monal/driver/_driver.py":2584
 *             output = self.mainModel.transfer(inputs, **kwds)
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)             # <<<<<<<<<<<<<<
 *             if len(res) == 3:
 *                 output, gradient, gradientInput = res
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_transfer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ID_DIFF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_v_inputs);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_inputs);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_v_kwds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2585
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)
 *             if len(res) == 3:             # <<<<<<<<<<<<<<
 *                 output, gradient, gradientInput = res
 *             else:
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2585, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_7 == 3) != 0);
    if (__pyx_t_6) {

      /* "metaphor/monal/driver/_driver.py":2586
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)
 *             if len(res) == 3:
 *                 output, gradient, gradientInput = res             # <<<<<<<<<<<<<<
 *             else:
 *                 output, gradient = res
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
        PyObject* sequence = __pyx_v_res;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2586, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 2; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2586, __pyx_L1_error)
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L10_unpacking_done;
        __pyx_L9_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2586, __pyx_L1_error)
        __pyx_L10_unpacking_done:;
      }
      __pyx_v_output = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_gradient, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_gradientInput, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/monal/driver/_driver.py":2585
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)
 *             if len(res) == 3:             # <<<<<<<<<<<<<<
 *                 output, gradient, gradientInput = res
 *             else:
 */
      goto __pyx_L8;
    }

    /* "metaphor/monal/driver/_driver.py":2588
 *                 output, gradient, gradientInput = res
 *             else:
 *                 output, gradient = res             # <<<<<<<<<<<<<<
 *         if donorm:
 *             output = self.unnormalizeOutputs(output)
 */
    /*else*/ {
      if ((likely(PyTuple_CheckExact(__pyx_v_res))) || (PyList_CheckExact(__pyx_v_res))) {
        PyObject* sequence = __pyx_v_res;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2588, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_v_res); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2588, __pyx_L1_error)
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2588, __pyx_L1_error)
        __pyx_L12_unpacking_done:;
      }
      __pyx_v_output = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_gradient, __pyx_t_5);
      __pyx_t_5 = 0;
    }
    __pyx_L8:;

    /* "metaphor/monal/driver/_driver.py":2583
 *         if style == C.TFR_STD:  # 0
 *             output = self.mainModel.transfer(inputs, **kwds)
 *         elif style in (C.TFR_GRADIENT, C.TFR_GRADIENTINPUTS, C.TFR_LEVERAGE):  # (1, 5)             # <<<<<<<<<<<<<<
 *             res = self.mainModel.transfer(inputs, C.ID_DIFF, **kwds)
 *             if len(res) == 3:
 */
  }
  __pyx_L4:;

  /* "metaphor/monal/driver/_driver.py":2589
 *             else:
 *                 output, gradient = res
 *         if donorm:             # <<<<<<<<<<<<<<
 *             output = self.unnormalizeOutputs(output)
 *         if gradient is None:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2589, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "metaphor/monal/driver/_driver.py":2590
 *                 output, gradient = res
 *         if donorm:
 *             output = self.unnormalizeOutputs(output)             # <<<<<<<<<<<<<<
 *         if gradient is None:
 *             return output
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 2590, __pyx_L1_error) }
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_output); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_output};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2590, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_output};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2590, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_output);
        __Pyx_GIVEREF(__pyx_v_output);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_output);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_output, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2589
 *             else:
 *                 output, gradient = res
 *         if donorm:             # <<<<<<<<<<<<<<
 *             output = self.unnormalizeOutputs(output)
 *         if gradient is None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2591
 *         if donorm:
 *             output = self.unnormalizeOutputs(output)
 *         if gradient is None:             # <<<<<<<<<<<<<<
 *             return output
 *         if donorm:
 */
  __pyx_t_6 = (__pyx_v_gradient == Py_None);
  __pyx_t_1 = (__pyx_t_6 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2592
 *             output = self.unnormalizeOutputs(output)
 *         if gradient is None:
 *             return output             # <<<<<<<<<<<<<<
 *         if donorm:
 *             gradient = self.unnormalizeOutputs(gradient, True)
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 2592, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_v_output);
    __pyx_r = __pyx_v_output;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2591
 *         if donorm:
 *             output = self.unnormalizeOutputs(output)
 *         if gradient is None:             # <<<<<<<<<<<<<<
 *             return output
 *         if donorm:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2593
 *         if gradient is None:
 *             return output
 *         if donorm:             # <<<<<<<<<<<<<<
 *             gradient = self.unnormalizeOutputs(gradient, True)
 *             if gradientInput is not None:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_donorm); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2593, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2594
 *             return output
 *         if donorm:
 *             gradient = self.unnormalizeOutputs(gradient, True)             # <<<<<<<<<<<<<<
 *             if gradientInput is not None:
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_gradient, Py_True};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2594, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_gradient, Py_True};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2594, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_gradient);
      __Pyx_GIVEREF(__pyx_v_gradient);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_gradient);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, Py_True);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_gradient, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2595
 *         if donorm:
 *             gradient = self.unnormalizeOutputs(gradient, True)
 *             if gradientInput is not None:             # <<<<<<<<<<<<<<
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)
 */
    __pyx_t_1 = (__pyx_v_gradientInput != Py_None);
    __pyx_t_6 = (__pyx_t_1 != 0);
    if (__pyx_t_6) {

      /* "metaphor/monal/driver/_driver.py":2596
 *             gradient = self.unnormalizeOutputs(gradient, True)
 *             if gradientInput is not None:
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)             # <<<<<<<<<<<<<<
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)
 *         if style == C.TFR_LEVERAGE:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_gradientInput);
      __Pyx_GIVEREF(__pyx_v_gradientInput);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_gradientInput);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_normgrad, Py_True) < 0) __PYX_ERR(0, 2596, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_gradientInput, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2597
 *             if gradientInput is not None:
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)             # <<<<<<<<<<<<<<
 *         if style == C.TFR_LEVERAGE:
 *             lev = gradient.T.dot(self.dispersionMatrix.dot(gradient))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_normalizeInputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_gradientInput);
      __Pyx_GIVEREF(__pyx_v_gradientInput);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_gradientInput);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_norminputgrad, Py_True) < 0) __PYX_ERR(0, 2597, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_gradientInput, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2595
 *         if donorm:
 *             gradient = self.unnormalizeOutputs(gradient, True)
 *             if gradientInput is not None:             # <<<<<<<<<<<<<<
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)
 */
    }

    /* "metaphor/monal/driver/_driver.py":2593
 *         if gradient is None:
 *             return output
 *         if donorm:             # <<<<<<<<<<<<<<
 *             gradient = self.unnormalizeOutputs(gradient, True)
 *             if gradientInput is not None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2598
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)
 *         if style == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *             lev = gradient.T.dot(self.dispersionMatrix.dot(gradient))
 *             return output, lev
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TFR_LEVERAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_style, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {

    /* "metaphor/monal/driver/_driver.py":2599
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)
 *         if style == C.TFR_LEVERAGE:
 *             lev = gradient.T.dot(self.dispersionMatrix.dot(gradient))             # <<<<<<<<<<<<<<
 *             return output, lev
 *         return output, gradient, gradientInput
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_gradient, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dispersionMatrix_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dot); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_gradient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_10)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_gradient};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_gradient};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_gradient);
        __Pyx_GIVEREF(__pyx_v_gradient);
        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_gradient);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_lev, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2600
 *         if style == C.TFR_LEVERAGE:
 *             lev = gradient.T.dot(self.dispersionMatrix.dot(gradient))
 *             return output, lev             # <<<<<<<<<<<<<<
 *         return output, gradient, gradientInput
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 2600, __pyx_L1_error) }
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_output);
    __Pyx_GIVEREF(__pyx_v_output);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_output);
    __Pyx_INCREF(__pyx_v_lev);
    __Pyx_GIVEREF(__pyx_v_lev);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_lev);
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2598
 *                 gradientInput = self.unnormalizeOutputs(gradientInput, normgrad=True)
 *                 gradientInput = self.normalizeInputs(gradientInput, norminputgrad=True)
 *         if style == C.TFR_LEVERAGE:             # <<<<<<<<<<<<<<
 *             lev = gradient.T.dot(self.dispersionMatrix.dot(gradient))
 *             return output, lev
 */
  }

  /* "metaphor/monal/driver/_driver.py":2601
 *             lev = gradient.T.dot(self.dispersionMatrix.dot(gradient))
 *             return output, lev
 *         return output, gradient, gradientInput             # <<<<<<<<<<<<<<
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_output)) { __Pyx_RaiseUnboundLocalError("output"); __PYX_ERR(0, 2601, __pyx_L1_error) }
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_output);
  __Pyx_GIVEREF(__pyx_v_output);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_output);
  __Pyx_INCREF(__pyx_v_gradient);
  __Pyx_GIVEREF(__pyx_v_gradient);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_gradient);
  __Pyx_INCREF(__pyx_v_gradientInput);
  __Pyx_GIVEREF(__pyx_v_gradientInput);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_gradientInput);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2575
 *         return outputs, outputsicp, outputsicm
 * 
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         gradient = None
 *         gradientInput = None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.transfer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_gradient);
  __Pyx_XDECREF(__pyx_v_gradientInput);
  __Pyx_XDECREF(__pyx_v_lev);
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2603
 *         return output, gradient, gradientInput
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver             # <<<<<<<<<<<<<<
 *         if inputs is None:
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_199normalizeInputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_199normalizeInputs = {"normalizeInputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_199normalizeInputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_199normalizeInputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_inputs = 0;
  PyObject *__pyx_v_norminputgrad = 0;
  PyObject *__pyx_v_reverse = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalizeInputs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_inputs,&__pyx_n_s_norminputgrad,&__pyx_n_s_reverse,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("normalizeInputs", 0, 2, 4, 1); __PYX_ERR(0, 2603, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_norminputgrad);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reverse);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "normalizeInputs") < 0)) __PYX_ERR(0, 2603, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_inputs = values[1];
    __pyx_v_norminputgrad = values[2];
    __pyx_v_reverse = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normalizeInputs", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2603, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.normalizeInputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_198normalizeInputs(__pyx_self, __pyx_v_self, __pyx_v_inputs, __pyx_v_norminputgrad, __pyx_v_reverse);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_198normalizeInputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_inputs, PyObject *__pyx_v_norminputgrad, PyObject *__pyx_v_reverse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("normalizeInputs", 0);
  __Pyx_INCREF(__pyx_v_inputs);

  /* "metaphor/monal/driver/_driver.py":2604
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver
 *         if inputs is None:             # <<<<<<<<<<<<<<
 *             return None
 *         if isinstance(inputs, list):
 */
  __pyx_t_1 = (__pyx_v_inputs == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2605
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver
 *         if inputs is None:
 *             return None             # <<<<<<<<<<<<<<
 *         if isinstance(inputs, list):
 *             inputs = asarray(inputs)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2604
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver
 *         if inputs is None:             # <<<<<<<<<<<<<<
 *             return None
 *         if isinstance(inputs, list):
 */
  }

  /* "metaphor/monal/driver/_driver.py":2606
 *         if inputs is None:
 *             return None
 *         if isinstance(inputs, list):             # <<<<<<<<<<<<<<
 *             inputs = asarray(inputs)
 *         if self.inNormModel is None:
 */
  __pyx_t_2 = PyList_Check(__pyx_v_inputs); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2607
 *             return None
 *         if isinstance(inputs, list):
 *             inputs = asarray(inputs)             # <<<<<<<<<<<<<<
 *         if self.inNormModel is None:
 *             return inputs
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_inputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_inputs};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_inputs};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_inputs);
        __Pyx_GIVEREF(__pyx_v_inputs);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_inputs);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_inputs, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2606
 *         if inputs is None:
 *             return None
 *         if isinstance(inputs, list):             # <<<<<<<<<<<<<<
 *             inputs = asarray(inputs)
 *         if self.inNormModel is None:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2608
 *         if isinstance(inputs, list):
 *             inputs = asarray(inputs)
 *         if self.inNormModel is None:             # <<<<<<<<<<<<<<
 *             return inputs
 *         if norminputgrad:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = (__pyx_t_3 == Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2609
 *             inputs = asarray(inputs)
 *         if self.inNormModel is None:
 *             return inputs             # <<<<<<<<<<<<<<
 *         if norminputgrad:
 *             if reverse:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_inputs);
    __pyx_r = __pyx_v_inputs;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2608
 *         if isinstance(inputs, list):
 *             inputs = asarray(inputs)
 *         if self.inNormModel is None:             # <<<<<<<<<<<<<<
 *             return inputs
 *         if norminputgrad:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2610
 *         if self.inNormModel is None:
 *             return inputs
 *         if norminputgrad:             # <<<<<<<<<<<<<<
 *             if reverse:
 *                 return inputs / self.inNormModel.data[:, 0]
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_norminputgrad); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2610, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2611
 *             return inputs
 *         if norminputgrad:
 *             if reverse:             # <<<<<<<<<<<<<<
 *                 return inputs / self.inNormModel.data[:, 0]
 *             else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2611, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":2612
 *         if norminputgrad:
 *             if reverse:
 *                 return inputs / self.inNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *             else:
 *                 return inputs * self.inNormModel.data[:, 0]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__126); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_inputs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":2611
 *             return inputs
 *         if norminputgrad:
 *             if reverse:             # <<<<<<<<<<<<<<
 *                 return inputs / self.inNormModel.data[:, 0]
 *             else:
 */
    }

    /* "metaphor/monal/driver/_driver.py":2614
 *                 return inputs / self.inNormModel.data[:, 0]
 *             else:
 *                 return inputs * self.inNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *         if reverse:
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__128); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Multiply(__pyx_v_inputs, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "metaphor/monal/driver/_driver.py":2610
 *         if self.inNormModel is None:
 *             return inputs
 *         if norminputgrad:             # <<<<<<<<<<<<<<
 *             if reverse:
 *                 return inputs / self.inNormModel.data[:, 0]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2615
 *             else:
 *                 return inputs * self.inNormModel.data[:, 0]
 *         if reverse:             # <<<<<<<<<<<<<<
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2615, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2616
 *                 return inputs * self.inNormModel.data[:, 0]
 *         if reverse:
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]             # <<<<<<<<<<<<<<
 *         else:
 *             return (inputs - self.inNormModel.data[:, 1]) / self.inNormModel.data[:, 0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__130); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_inputs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__132); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2615
 *             else:
 *                 return inputs * self.inNormModel.data[:, 0]
 *         if reverse:             # <<<<<<<<<<<<<<
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]
 *         else:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2618
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]
 *         else:
 *             return (inputs - self.inNormModel.data[:, 1]) / self.inNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__134); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_inputs, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inNormModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__136); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/monal/driver/_driver.py":2603
 *         return output, gradient, gradientInput
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver             # <<<<<<<<<<<<<<
 *         if inputs is None:
 *             return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.normalizeInputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_inputs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2621
 * 
 * 
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver             # <<<<<<<<<<<<<<
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_201unnormalizeOutputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_201unnormalizeOutputs = {"unnormalizeOutputs", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_201unnormalizeOutputs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_201unnormalizeOutputs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_outputs = 0;
  PyObject *__pyx_v_normgrad = 0;
  PyObject *__pyx_v_reverse = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unnormalizeOutputs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_outputs,&__pyx_n_s_normgrad,&__pyx_n_s_reverse,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("unnormalizeOutputs", 0, 2, 4, 1); __PYX_ERR(0, 2621, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normgrad);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reverse);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unnormalizeOutputs") < 0)) __PYX_ERR(0, 2621, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_outputs = values[1];
    __pyx_v_normgrad = values[2];
    __pyx_v_reverse = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unnormalizeOutputs", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2621, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.unnormalizeOutputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_200unnormalizeOutputs(__pyx_self, __pyx_v_self, __pyx_v_outputs, __pyx_v_normgrad, __pyx_v_reverse);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_200unnormalizeOutputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_outputs, PyObject *__pyx_v_normgrad, PyObject *__pyx_v_reverse) {
  PyObject *__pyx_9genexpr16__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("unnormalizeOutputs", 0);

  /* "metaphor/monal/driver/_driver.py":2622
 * 
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver
 *         if isinstance(outputs, list):             # <<<<<<<<<<<<<<
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 *         if normgrad:
 */
  __pyx_t_1 = PyList_Check(__pyx_v_outputs); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2623
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]             # <<<<<<<<<<<<<<
 *         if normgrad:
 *             if self.outNormModel is not None:
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_v_outputs)) || PyTuple_CheckExact(__pyx_v_outputs)) {
        __pyx_t_4 = __pyx_v_outputs; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_outputs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2623, __pyx_L6_error)
      }
      for (;;) {
        if (likely(!__pyx_t_6)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2623, __pyx_L6_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2623, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2623, __pyx_L6_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2623, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_6(__pyx_t_4);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2623, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_val, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unnormalizeOutputs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2623, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_9genexpr16__pyx_v_val, __pyx_v_normgrad, __pyx_v_reverse};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2623, __pyx_L6_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_9genexpr16__pyx_v_val, __pyx_v_normgrad, __pyx_v_reverse};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2623, __pyx_L6_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2623, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
          }
          __Pyx_INCREF(__pyx_9genexpr16__pyx_v_val);
          __Pyx_GIVEREF(__pyx_9genexpr16__pyx_v_val);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_9genexpr16__pyx_v_val);
          __Pyx_INCREF(__pyx_v_normgrad);
          __Pyx_GIVEREF(__pyx_v_normgrad);
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_normgrad);
          __Pyx_INCREF(__pyx_v_reverse);
          __Pyx_GIVEREF(__pyx_v_reverse);
          PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_v_reverse);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2623, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 2623, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_val); __pyx_9genexpr16__pyx_v_val = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_val); __pyx_9genexpr16__pyx_v_val = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2622
 * 
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver
 *         if isinstance(outputs, list):             # <<<<<<<<<<<<<<
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 *         if normgrad:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2624
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 *         if normgrad:             # <<<<<<<<<<<<<<
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_normgrad); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2624, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2625
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 *         if normgrad:
 *             if self.outNormModel is not None:             # <<<<<<<<<<<<<<
 *                 if self.outputCount == 1:
 *                     return outputs * self.outNormModel.data[0]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = (__pyx_t_3 != Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2626
 *         if normgrad:
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:             # <<<<<<<<<<<<<<
 *                     return outputs * self.outNormModel.data[0]
 *                 return outputs * self.outNormModel.data[:, 0]
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2626, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":2627
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:
 *                     return outputs * self.outNormModel.data[0]             # <<<<<<<<<<<<<<
 *                 return outputs * self.outNormModel.data[:, 0]
 *         else:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Multiply(__pyx_v_outputs, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "metaphor/monal/driver/_driver.py":2626
 *         if normgrad:
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:             # <<<<<<<<<<<<<<
 *                     return outputs * self.outNormModel.data[0]
 *                 return outputs * self.outNormModel.data[:, 0]
 */
      }

      /* "metaphor/monal/driver/_driver.py":2628
 *                 if self.outputCount == 1:
 *                     return outputs * self.outNormModel.data[0]
 *                 return outputs * self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *         else:
 *             if self.outNormModel is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__138); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Multiply(__pyx_v_outputs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "metaphor/monal/driver/_driver.py":2625
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 *         if normgrad:
 *             if self.outNormModel is not None:             # <<<<<<<<<<<<<<
 *                 if self.outputCount == 1:
 *                     return outputs * self.outNormModel.data[0]
 */
    }

    /* "metaphor/monal/driver/_driver.py":2624
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 *         if normgrad:             # <<<<<<<<<<<<<<
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:
 */
    goto __pyx_L10;
  }

  /* "metaphor/monal/driver/_driver.py":2630
 *                 return outputs * self.outNormModel.data[:, 0]
 *         else:
 *             if self.outNormModel is not None:             # <<<<<<<<<<<<<<
 *                 if self.outputCount == 1:
 *                     if reverse:
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = (__pyx_t_4 != Py_None);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "metaphor/monal/driver/_driver.py":2631
 *         else:
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:             # <<<<<<<<<<<<<<
 *                     if reverse:
 *                         return (outputs - self.outNormModel.data[1]) / self.outNormModel.data[0]
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2631, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":2632
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:
 *                     if reverse:             # <<<<<<<<<<<<<<
 *                         return (outputs - self.outNormModel.data[1]) / self.outNormModel.data[0]
 *                     else:
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2632, __pyx_L1_error)
        if (__pyx_t_2) {

          /* "metaphor/monal/driver/_driver.py":2633
 *                 if self.outputCount == 1:
 *                     if reverse:
 *                         return (outputs - self.outNormModel.data[1]) / self.outNormModel.data[0]             # <<<<<<<<<<<<<<
 *                     else:
 *                         return outputs * self.outNormModel.data[0] + self.outNormModel.data[1]
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyNumber_Subtract(__pyx_v_outputs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2633, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_r = __pyx_t_7;
          __pyx_t_7 = 0;
          goto __pyx_L0;

          /* "metaphor/monal/driver/_driver.py":2632
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:
 *                     if reverse:             # <<<<<<<<<<<<<<
 *                         return (outputs - self.outNormModel.data[1]) / self.outNormModel.data[0]
 *                     else:
 */
        }

        /* "metaphor/monal/driver/_driver.py":2635
 *                         return (outputs - self.outNormModel.data[1]) / self.outNormModel.data[0]
 *                     else:
 *                         return outputs * self.outNormModel.data[0] + self.outNormModel.data[1]             # <<<<<<<<<<<<<<
 *                 if reverse:
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]
 */
        /*else*/ {
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyNumber_Multiply(__pyx_v_outputs, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;
        }

        /* "metaphor/monal/driver/_driver.py":2631
 *         else:
 *             if self.outNormModel is not None:
 *                 if self.outputCount == 1:             # <<<<<<<<<<<<<<
 *                     if reverse:
 *                         return (outputs - self.outNormModel.data[1]) / self.outNormModel.data[0]
 */
      }

      /* "metaphor/monal/driver/_driver.py":2636
 *                     else:
 *                         return outputs * self.outNormModel.data[0] + self.outNormModel.data[1]
 *                 if reverse:             # <<<<<<<<<<<<<<
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]
 *                 else:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2636, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "metaphor/monal/driver/_driver.py":2637
 *                         return outputs * self.outNormModel.data[0] + self.outNormModel.data[1]
 *                 if reverse:
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     return outputs * self.outNormModel.data[:, 0] + self.outNormModel.data[:, 1]
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__140); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_Subtract(__pyx_v_outputs, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__142); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "metaphor/monal/driver/_driver.py":2636
 *                     else:
 *                         return outputs * self.outNormModel.data[0] + self.outNormModel.data[1]
 *                 if reverse:             # <<<<<<<<<<<<<<
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]
 *                 else:
 */
      }

      /* "metaphor/monal/driver/_driver.py":2639
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]
 *                 else:
 *                     return outputs * self.outNormModel.data[:, 0] + self.outNormModel.data[:, 1]             # <<<<<<<<<<<<<<
 *         return outputs
 * 
 */
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__144); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Multiply(__pyx_v_outputs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outNormModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__146); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L0;
      }

      /* "metaphor/monal/driver/_driver.py":2630
 *                 return outputs * self.outNormModel.data[:, 0]
 *         else:
 *             if self.outNormModel is not None:             # <<<<<<<<<<<<<<
 *                 if self.outputCount == 1:
 *                     if reverse:
 */
    }
  }
  __pyx_L10:;

  /* "metaphor/monal/driver/_driver.py":2640
 *                 else:
 *                     return outputs * self.outNormModel.data[:, 0] + self.outNormModel.data[:, 1]
 *         return outputs             # <<<<<<<<<<<<<<
 * 
 *     def backupParams(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_outputs);
  __pyx_r = __pyx_v_outputs;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2621
 * 
 * 
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver             # <<<<<<<<<<<<<<
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.unnormalizeOutputs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2642
 *         return outputs
 * 
 *     def backupParams(self):  # Driver             # <<<<<<<<<<<<<<
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_203backupParams(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_203backupParams = {"backupParams", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_203backupParams, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_203backupParams(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backupParams (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_202backupParams(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_202backupParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("backupParams", 0);

  /* "metaphor/monal/driver/_driver.py":2643
 * 
 *     def backupParams(self):  # Driver
 *         self.backupParams = self.maimModel.getParamsStr()             # <<<<<<<<<<<<<<
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maimModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getParamsStr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2643, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_backupParams_2, __pyx_t_1) < 0) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2642
 *         return outputs
 * 
 *     def backupParams(self):  # Driver             # <<<<<<<<<<<<<<
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.backupParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2645
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver             # <<<<<<<<<<<<<<
 *         if values is not None:
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_205restoreParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_205restoreParams = {"restoreParams", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_205restoreParams, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_205restoreParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_values = 0;
  CYTHON_UNUSED PyObject *__pyx_v_decal = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("restoreParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_decal,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decal);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "restoreParams") < 0)) __PYX_ERR(0, 2645, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_values = values[1];
    __pyx_v_decal = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("restoreParams", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2645, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.restoreParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_204restoreParams(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_decal);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_204restoreParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_decal) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("restoreParams", 0);

  /* "metaphor/monal/driver/_driver.py":2646
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver
 *         if values is not None:             # <<<<<<<<<<<<<<
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 *         else:
 */
  __pyx_t_1 = (__pyx_v_values != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/monal/driver/_driver.py":2647
 *     def restoreParams(self, values=None, decal=0):  # Driver
 *         if values is not None:
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))             # <<<<<<<<<<<<<<
 *         else:
 *             self.mainModel.loadParameters(self.backupParams)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_loadParameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_backupParams_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_values};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_values};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_values);
        __Pyx_GIVEREF(__pyx_v_values);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_values);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2647, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/monal/driver/_driver.py":2646
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver
 *         if values is not None:             # <<<<<<<<<<<<<<
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/monal/driver/_driver.py":2649
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 *         else:
 *             self.mainModel.loadParameters(self.backupParams)             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loadParameters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_backupParams_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "metaphor/monal/driver/_driver.py":2645
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver             # <<<<<<<<<<<<<<
 *         if values is not None:
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.restoreParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2652
 * 
 *     @Property
 *     def dimension(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de variables du vecteur de paramtres"""
 *         return self.mainModel.dimension
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_207dimension(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_206dimension[] = "Nombre de variables du vecteur de param\303\257\302\277\305\223tres";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_207dimension = {"dimension", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_207dimension, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_206dimension};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_207dimension(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dimension (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_206dimension(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_206dimension(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("dimension", 0);

  /* "metaphor/monal/driver/_driver.py":2654
 *     def dimension(self):  # Driver
 *         """Nombre de variables du vecteur de paramtres"""
 *         return self.mainModel.dimension             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2652
 * 
 *     @Property
 *     def dimension(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de variables du vecteur de paramtres"""
 *         return self.mainModel.dimension
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.dimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2657
 * 
 *     @Property
 *     def indexInitialState(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Index des variables d'initialisation d'tat"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + self.mainModel.order
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_209indexInitialState(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_208indexInitialState[] = "Index des variables d'initialisation d'\303\257\302\277\305\223tat";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_209indexInitialState = {"indexInitialState", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_209indexInitialState, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_208indexInitialState};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_209indexInitialState(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("indexInitialState (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_208indexInitialState(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_208indexInitialState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("indexInitialState", 0);

  /* "metaphor/monal/driver/_driver.py":2659
 *     def indexInitialState(self):  # Driver
 *         """Index des variables d'initialisation d'tat"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + self.mainModel.order             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_order); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2657
 * 
 *     @Property
 *     def indexInitialState(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Index des variables d'initialisation d'tat"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + self.mainModel.order
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.indexInitialState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2662
 * 
 *     @Property
 *     def dataWidth(self):             # <<<<<<<<<<<<<<
 *         """Largeur des donnes"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + 2*self.mainModel.order
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_211dataWidth(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_210dataWidth[] = "Largeur des donn\303\257\302\277\305\223es";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_211dataWidth = {"dataWidth", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_211dataWidth, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_210dataWidth};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_211dataWidth(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataWidth (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_210dataWidth(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_210dataWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("dataWidth", 0);

  /* "metaphor/monal/driver/_driver.py":2664
 *     def dataWidth(self):
 *         """Largeur des donnes"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + 2*self.mainModel.order             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_order); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_int_2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2662
 * 
 *     @Property
 *     def dataWidth(self):             # <<<<<<<<<<<<<<
 *         """Largeur des donnes"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + 2*self.mainModel.order
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.dataWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2667
 * 
 *     @Property
 *     def gradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_213gradient(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_212gradient[] = "Vecteur gradient de l'apprentissage";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_213gradient = {"gradient", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_213gradient, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_212gradient};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_213gradient(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gradient (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_212gradient(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_212gradient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("gradient", 0);

  /* "metaphor/monal/driver/_driver.py":2669
 *     def gradient(self):  # Driver
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:             # <<<<<<<<<<<<<<
 *             self._gradient = zeros((self.dimension))
 *         return self._gradient
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gradient_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2670
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:
 *             self._gradient = zeros((self.dimension))             # <<<<<<<<<<<<<<
 *         return self._gradient
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_gradient_2, __pyx_t_1) < 0) __PYX_ERR(0, 2670, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2669
 *     def gradient(self):  # Driver
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:             # <<<<<<<<<<<<<<
 *             self._gradient = zeros((self.dimension))
 *         return self._gradient
 */
  }

  /* "metaphor/monal/driver/_driver.py":2671
 *         if self._gradient is None:
 *             self._gradient = zeros((self.dimension))
 *         return self._gradient             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gradient_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2667
 * 
 *     @Property
 *     def gradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.gradient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2674
 * 
 *     @Property
 *     def hessian(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Matrice hessienne"""
 *         if self._hessian is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_215hessian(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_214hessian[] = "Matrice hessienne";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_215hessian = {"hessian", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_215hessian, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_214hessian};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_215hessian(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hessian (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_214hessian(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_214hessian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("hessian", 0);

  /* "metaphor/monal/driver/_driver.py":2676
 *     def hessian(self):  # Driver
 *         """Matrice hessienne"""
 *         if self._hessian is None:             # <<<<<<<<<<<<<<
 *             self._hessian = zeros((self.dimension, self.dimension))
 *         return self._hessian
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hessian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2677
 *         """Matrice hessienne"""
 *         if self._hessian is None:
 *             self._hessian = zeros((self.dimension, self.dimension))             # <<<<<<<<<<<<<<
 *         return self._hessian
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2677, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2677, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2677, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2677, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2677, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hessian, __pyx_t_1) < 0) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":2676
 *     def hessian(self):  # Driver
 *         """Matrice hessienne"""
 *         if self._hessian is None:             # <<<<<<<<<<<<<<
 *             self._hessian = zeros((self.dimension, self.dimension))
 *         return self._hessian
 */
  }

  /* "metaphor/monal/driver/_driver.py":2678
 *         if self._hessian is None:
 *             self._hessian = zeros((self.dimension, self.dimension))
 *         return self._hessian             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hessian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2674
 * 
 *     @Property
 *     def hessian(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Matrice hessienne"""
 *         if self._hessian is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.hessian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2681
 * 
 *     @Property
 *     def chrono(self):  # Driver             # <<<<<<<<<<<<<<
 *         rr = self._chrono
 *         self._chrono = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_217chrono(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_217chrono = {"chrono", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_217chrono, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_217chrono(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("chrono (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_216chrono(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_216chrono(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_rr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("chrono", 0);

  /* "metaphor/monal/driver/_driver.py":2682
 *     @Property
 *     def chrono(self):  # Driver
 *         rr = self._chrono             # <<<<<<<<<<<<<<
 *         self._chrono = 0
 *         return rr
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chrono); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2683
 *     def chrono(self):  # Driver
 *         rr = self._chrono
 *         self._chrono = 0             # <<<<<<<<<<<<<<
 *         return rr
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chrono, __pyx_int_0) < 0) __PYX_ERR(0, 2683, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2684
 *         rr = self._chrono
 *         self._chrono = 0
 *         return rr             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rr);
  __pyx_r = __pyx_v_rr;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2681
 * 
 *     @Property
 *     def chrono(self):  # Driver             # <<<<<<<<<<<<<<
 *         rr = self._chrono
 *         self._chrono = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.chrono", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2687
 * 
 *     @Property
 *     def dataCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self.isParallel():
 *             return self.mainModel.modelCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_219dataCount(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_219dataCount = {"dataCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_219dataCount, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_219dataCount(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataCount (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_218dataCount(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_218dataCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("dataCount", 0);

  /* "metaphor/monal/driver/_driver.py":2688
 *     @Property
 *     def dataCount(self):  # Driver
 *         if self.isParallel():             # <<<<<<<<<<<<<<
 *             return self.mainModel.modelCount
 *         if not (self._dataArray is None):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isParallel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2688, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":2689
 *     def dataCount(self):  # Driver
 *         if self.isParallel():
 *             return self.mainModel.modelCount             # <<<<<<<<<<<<<<
 *         if not (self._dataArray is None):
 *             return self._dataArray.shape[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modelCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2688
 *     @Property
 *     def dataCount(self):  # Driver
 *         if self.isParallel():             # <<<<<<<<<<<<<<
 *             return self.mainModel.modelCount
 *         if not (self._dataArray is None):
 */
  }

  /* "metaphor/monal/driver/_driver.py":2690
 *         if self.isParallel():
 *             return self.mainModel.modelCount
 *         if not (self._dataArray is None):             # <<<<<<<<<<<<<<
 *             return self._dataArray.shape[0]
 *         return 0
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "metaphor/monal/driver/_driver.py":2691
 *             return self.mainModel.modelCount
 *         if not (self._dataArray is None):
 *             return self._dataArray.shape[0]             # <<<<<<<<<<<<<<
 *         return 0
 *     @dataCount.setter
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2690
 *         if self.isParallel():
 *             return self.mainModel.modelCount
 *         if not (self._dataArray is None):             # <<<<<<<<<<<<<<
 *             return self._dataArray.shape[0]
 *         return 0
 */
  }

  /* "metaphor/monal/driver/_driver.py":2692
 *         if not (self._dataArray is None):
 *             return self._dataArray.shape[0]
 *         return 0             # <<<<<<<<<<<<<<
 *     @dataCount.setter
 *     def sdataCount(self, value):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_0);
  __pyx_r = __pyx_int_0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2687
 * 
 *     @Property
 *     def dataCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self.isParallel():
 *             return self.mainModel.modelCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.dataCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2694
 *         return 0
 *     @dataCount.setter
 *     def sdataCount(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_221sdataCount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_220sdataCount[] = "Nombre de donn\303\257\302\277\305\223es d'apprentissage";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_221sdataCount = {"sdataCount", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_221sdataCount, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_220sdataCount};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_221sdataCount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sdataCount (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sdataCount", 1, 2, 2, 1); __PYX_ERR(0, 2694, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sdataCount") < 0)) __PYX_ERR(0, 2694, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sdataCount", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2694, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.sdataCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_220sdataCount(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_220sdataCount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("sdataCount", 0);

  /* "metaphor/monal/driver/_driver.py":2696
 *     def sdataCount(self, value):  # Driver
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():             # <<<<<<<<<<<<<<
 *             raise MonalError('Cannot modify model count')
 *         if value != self.dataCount:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isParallel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2696, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2696, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "metaphor/monal/driver/_driver.py":2697
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():
 *             raise MonalError('Cannot modify model count')             # <<<<<<<<<<<<<<
 *         if value != self.dataCount:
 *             if not (value is None) and (value > 0):
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2697, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2696
 *     def sdataCount(self, value):  # Driver
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():             # <<<<<<<<<<<<<<
 *             raise MonalError('Cannot modify model count')
 *         if value != self.dataCount:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2698
 *         if self.isParallel():
 *             raise MonalError('Cannot modify model count')
 *         if value != self.dataCount:             # <<<<<<<<<<<<<<
 *             if not (value is None) and (value > 0):
 *                 self._dataArray = zeros((value, self.dataWidth))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "metaphor/monal/driver/_driver.py":2699
 *             raise MonalError('Cannot modify model count')
 *         if value != self.dataCount:
 *             if not (value is None) and (value > 0):             # <<<<<<<<<<<<<<
 *                 self._dataArray = zeros((value, self.dataWidth))
 *             else:
 */
    __pyx_t_5 = (__pyx_v_value != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_4 = __pyx_t_6;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2699, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_6;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "metaphor/monal/driver/_driver.py":2700
 *         if value != self.dataCount:
 *             if not (value is None) and (value > 0):
 *                 self._dataArray = zeros((value, self.dataWidth))             # <<<<<<<<<<<<<<
 *             else:
 *                 self._dataArray = None
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataWidth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2700, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2700, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2700, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2700, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
          __pyx_t_7 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2700, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataArray, __pyx_t_1) < 0) __PYX_ERR(0, 2700, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":2699
 *             raise MonalError('Cannot modify model count')
 *         if value != self.dataCount:
 *             if not (value is None) and (value > 0):             # <<<<<<<<<<<<<<
 *                 self._dataArray = zeros((value, self.dataWidth))
 *             else:
 */
      goto __pyx_L5;
    }

    /* "metaphor/monal/driver/_driver.py":2702
 *                 self._dataArray = zeros((value, self.dataWidth))
 *             else:
 *                 self._dataArray = None             # <<<<<<<<<<<<<<
 * 
 *     def _xmlText(self, decal):  # Driver
 */
    /*else*/ {
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataArray, Py_None) < 0) __PYX_ERR(0, 2702, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "metaphor/monal/driver/_driver.py":2698
 *         if self.isParallel():
 *             raise MonalError('Cannot modify model count')
 *         if value != self.dataCount:             # <<<<<<<<<<<<<<
 *             if not (value is None) and (value > 0):
 *                 self._dataArray = zeros((value, self.dataWidth))
 */
  }

  /* "metaphor/monal/driver/_driver.py":2694
 *         return 0
 *     @dataCount.setter
 *     def sdataCount(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.sdataCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2704
 *                 self._dataArray = None
 * 
 *     def _xmlText(self, decal):  # Driver             # <<<<<<<<<<<<<<
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_223_xmlText(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_223_xmlText = {"_xmlText", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_223_xmlText, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_223_xmlText(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_decal = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_xmlText (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_decal,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decal)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_xmlText", 1, 2, 2, 1); __PYX_ERR(0, 2704, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_xmlText") < 0)) __PYX_ERR(0, 2704, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_decal = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_xmlText", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2704, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._xmlText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_222_xmlText(__pyx_self, __pyx_v_self, __pyx_v_decal);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_222_xmlText(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_decal) {
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_9genexpr17__pyx_v_outproc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("_xmlText", 0);

  /* "metaphor/monal/driver/_driver.py":2705
 * 
 *     def _xmlText(self, decal):  # Driver
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)             # <<<<<<<<<<<<<<
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 *         attr += ' {0}="{1}"'.format(cst.st_version, mtb.monalversion)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_st_xmlns_xsi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_st_XMLSchema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_attr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2706
 *     def _xmlText(self, decal):  # Driver
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)             # <<<<<<<<<<<<<<
 *         attr += ' {0}="{1}"'.format(cst.st_version, mtb.monalversion)
 *         out = ['', self.mainModel.xml(decal + 1) + nntb.fillstr(decal, '\t')]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_st_XMLSchemaLoc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_st_ModelURL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_attr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_attr, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":2707
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 *         attr += ' {0}="{1}"'.format(cst.st_version, mtb.monalversion)             # <<<<<<<<<<<<<<
 *         out = ['', self.mainModel.xml(decal + 1) + nntb.fillstr(decal, '\t')]
 *         out += [outproc.xml(1) for outproc in self.outProcList]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_st_version); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_mtb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_monalversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_attr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_attr, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2708
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 *         attr += ' {0}="{1}"'.format(cst.st_version, mtb.monalversion)
 *         out = ['', self.mainModel.xml(decal + 1) + nntb.fillstr(decal, '\t')]             # <<<<<<<<<<<<<<
 *         out += [outproc.xml(1) for outproc in self.outProcList]
 *         out.append('')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_xml); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_decal, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nntb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_fillstr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_decal, __pyx_kp_u__148};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2708, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_decal, __pyx_kp_u__148};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2708, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_decal);
    __Pyx_GIVEREF(__pyx_v_decal);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_decal);
    __Pyx_INCREF(__pyx_kp_u__148);
    __Pyx_GIVEREF(__pyx_kp_u__148);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_kp_u__148);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_kp_u__2);
  __Pyx_GIVEREF(__pyx_kp_u__2);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u__2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_v_out = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":2709
 *         attr += ' {0}="{1}"'.format(cst.st_version, mtb.monalversion)
 *         out = ['', self.mainModel.xml(decal + 1) + nntb.fillstr(decal, '\t')]
 *         out += [outproc.xml(1) for outproc in self.outProcList]             # <<<<<<<<<<<<<<
 *         out.append('')
 *         return '\n'.join(out), attr
 */
  { /* enter inner scope */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2709, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outProcList_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2709, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2709, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2709, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2709, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2709, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2709, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2709, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2709, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_outproc, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr17__pyx_v_outproc, __pyx_n_s_xml); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2709, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2709, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 2709, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_outproc); __pyx_9genexpr17__pyx_v_outproc = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_outproc); __pyx_9genexpr17__pyx_v_outproc = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_out, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_out, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2710
 *         out = ['', self.mainModel.xml(decal + 1) + nntb.fillstr(decal, '\t')]
 *         out += [outproc.xml(1) for outproc in self.outProcList]
 *         out.append('')             # <<<<<<<<<<<<<<
 *         return '\n'.join(out), attr
 * 
 */
  __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_out, __pyx_kp_u__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2710, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2711
 *         out += [outproc.xml(1) for outproc in self.outProcList]
 *         out.append('')
 *         return '\n'.join(out), attr             # <<<<<<<<<<<<<<
 * 
 *     def toFullXML(self):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__150, __pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_attr);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2704
 *                 self._dataArray = None
 * 
 *     def _xmlText(self, decal):  # Driver             # <<<<<<<<<<<<<<
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver._xmlText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_outproc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2713
 *         return '\n'.join(out), attr
 * 
 *     def toFullXML(self):  # Driver             # <<<<<<<<<<<<<<
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),
 *                cst.st_XMLStyleSheet, self.xml()]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_225toFullXML(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_225toFullXML = {"toFullXML", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_225toFullXML, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_225toFullXML(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toFullXML (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_224toFullXML(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_224toFullXML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("toFullXML", 0);

  /* "metaphor/monal/driver/_driver.py":2714
 * 
 *     def toFullXML(self):  # Driver
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),             # <<<<<<<<<<<<<<
 *                cst.st_XMLStyleSheet, self.xml()]
 *         return '\n'.join(out)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_st_XMLHeader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_st_XMLVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_st_XMLEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Remainder(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":2715
 *     def toFullXML(self):  # Driver
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),
 *                cst.st_XMLStyleSheet, self.xml()]             # <<<<<<<<<<<<<<
 *         return '\n'.join(out)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_st_XMLStyleSheet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_xml); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":2714
 * 
 *     def toFullXML(self):  # Driver
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),             # <<<<<<<<<<<<<<
 *                cst.st_XMLStyleSheet, self.xml()]
 *         return '\n'.join(out)
 */
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_v_out = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "metaphor/monal/driver/_driver.py":2716
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),
 *                cst.st_XMLStyleSheet, self.xml()]
 *         return '\n'.join(out)             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__150, __pyx_v_out); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2713
 *         return '\n'.join(out), attr
 * 
 *     def toFullXML(self):  # Driver             # <<<<<<<<<<<<<<
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),
 *                cst.st_XMLStyleSheet, self.xml()]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.toFullXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2719
 * 
 *     @Property
 *     def NMLstring(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.toFullXML()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_227NMLstring(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_227NMLstring = {"NMLstring", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_227NMLstring, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_227NMLstring(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("NMLstring (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_226NMLstring(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_226NMLstring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("NMLstring", 0);

  /* "metaphor/monal/driver/_driver.py":2720
 *     @Property
 *     def NMLstring(self):  # Driver
 *         return self.toFullXML()             # <<<<<<<<<<<<<<
 * 
 *     def saveModel(self, filename="", savingformat=C.SF_XML, trainable=True,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_toFullXML); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2720, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2720, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2719
 * 
 *     @Property
 *     def NMLstring(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.toFullXML()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.NMLstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2722
 *         return self.toFullXML()
 * 
 *     def saveModel(self, filename="", savingformat=C.SF_XML, trainable=True,             # <<<<<<<<<<<<<<
 *             savedir=None, tempdir=None, package="", modeltemplate="m%d_",
 *             keeptemp=0, verbose=0, compiler="", forcelib=False,
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "metaphor/monal/driver/_driver.py":2725
 *             savedir=None, tempdir=None, package="", modeltemplate="m%d_",
 *             keeptemp=0, verbose=0, compiler="", forcelib=False,
 *             forcecreate=False, codeWriter=None, dynamiclinking=False): #, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         # kwds is garbage collector
 *         modulename = ""
 */
  __pyx_t_1 = PyTuple_New(14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject*)__pyx_kp_u__2));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__2));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)__pyx_kp_u__2));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_savingformat);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_savingformat);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_savingformat);
  __Pyx_INCREF(((PyObject *)Py_True));
  __Pyx_GIVEREF(((PyObject *)Py_True));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_True));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject*)__pyx_kp_u__2));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__2));
  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject*)__pyx_kp_u__2));
  __Pyx_INCREF(((PyObject*)__pyx_kp_u_m_d));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_u_m_d));
  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject*)__pyx_kp_u_m_d));
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_int_0));
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_int_0));
  __Pyx_INCREF(((PyObject*)__pyx_kp_u__2));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__2));
  PyTuple_SET_ITEM(__pyx_t_1, 9, ((PyObject*)__pyx_kp_u__2));
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 10, ((PyObject *)Py_False));
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 11, ((PyObject *)Py_False));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 12, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 13, ((PyObject *)Py_False));

  /* "metaphor/monal/driver/_driver.py":2722
 *         return self.toFullXML()
 * 
 *     def saveModel(self, filename="", savingformat=C.SF_XML, trainable=True,             # <<<<<<<<<<<<<<
 *             savedir=None, tempdir=None, package="", modeltemplate="m%d_",
 *             keeptemp=0, verbose=0, compiler="", forcelib=False,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_229saveModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_229saveModel = {"saveModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_229saveModel, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_229saveModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_savingformat = 0;
  PyObject *__pyx_v_trainable = 0;
  PyObject *__pyx_v_savedir = 0;
  PyObject *__pyx_v_tempdir = 0;
  PyObject *__pyx_v_package = 0;
  CYTHON_UNUSED PyObject *__pyx_v_modeltemplate = 0;
  PyObject *__pyx_v_keeptemp = 0;
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_compiler = 0;
  PyObject *__pyx_v_forcelib = 0;
  PyObject *__pyx_v_forcecreate = 0;
  PyObject *__pyx_v_codeWriter = 0;
  PyObject *__pyx_v_dynamiclinking = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,&__pyx_n_s_savingformat,&__pyx_n_s_trainable,&__pyx_n_s_savedir,&__pyx_n_s_tempdir,&__pyx_n_s_package,&__pyx_n_s_modeltemplate,&__pyx_n_s_keeptemp,&__pyx_n_s_verbose,&__pyx_n_s_compiler,&__pyx_n_s_forcelib,&__pyx_n_s_forcecreate,&__pyx_n_s_codeWriter,&__pyx_n_s_dynamiclinking,0};
    PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    __pyx_defaults10 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self);
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    values[2] = __pyx_dynamic_args->__pyx_arg_savingformat;
    values[3] = ((PyObject *)((PyObject *)Py_True));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    values[7] = ((PyObject *)((PyObject*)__pyx_kp_u_m_d));
    values[8] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[9] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[10] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    values[11] = ((PyObject *)((PyObject *)Py_False));
    values[12] = ((PyObject *)((PyObject *)Py_False));
    values[13] = ((PyObject *)((PyObject *)Py_None));
    values[14] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_savingformat);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_trainable);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_savedir);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tempdir);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_package);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modeltemplate);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keeptemp);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compiler);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_forcelib);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_forcecreate);
          if (value) { values[12] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_codeWriter);
          if (value) { values[13] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamiclinking);
          if (value) { values[14] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveModel") < 0)) __PYX_ERR(0, 2722, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_filename = values[1];
    __pyx_v_savingformat = values[2];
    __pyx_v_trainable = values[3];
    __pyx_v_savedir = values[4];
    __pyx_v_tempdir = values[5];
    __pyx_v_package = values[6];
    __pyx_v_modeltemplate = values[7];
    __pyx_v_keeptemp = values[8];
    __pyx_v_verbose = values[9];
    __pyx_v_compiler = values[10];
    __pyx_v_forcelib = values[11];
    __pyx_v_forcecreate = values[12];
    __pyx_v_codeWriter = values[13];
    __pyx_v_dynamiclinking = values[14];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveModel", 0, 1, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2722, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.saveModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_228saveModel(__pyx_self, __pyx_v_self, __pyx_v_filename, __pyx_v_savingformat, __pyx_v_trainable, __pyx_v_savedir, __pyx_v_tempdir, __pyx_v_package, __pyx_v_modeltemplate, __pyx_v_keeptemp, __pyx_v_verbose, __pyx_v_compiler, __pyx_v_forcelib, __pyx_v_forcecreate, __pyx_v_codeWriter, __pyx_v_dynamiclinking);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_228saveModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat, PyObject *__pyx_v_trainable, PyObject *__pyx_v_savedir, PyObject *__pyx_v_tempdir, PyObject *__pyx_v_package, CYTHON_UNUSED PyObject *__pyx_v_modeltemplate, PyObject *__pyx_v_keeptemp, PyObject *__pyx_v_verbose, PyObject *__pyx_v_compiler, PyObject *__pyx_v_forcelib, PyObject *__pyx_v_forcecreate, PyObject *__pyx_v_codeWriter, PyObject *__pyx_v_dynamiclinking) {
  PyObject *__pyx_v_modulename = NULL;
  PyObject *__pyx_v_originalsavedir = NULL;
  PyObject *__pyx_v_codelist = NULL;
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_clist = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_pathmem = NULL;
  PyObject *__pyx_v_nm = NULL;
  PyObject *__pyx_v_flist = NULL;
  PyObject *__pyx_v_includedirs = NULL;
  PyObject *__pyx_v_mainfile = NULL;
  PyObject *__pyx_v_exports = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  __Pyx_RefNannySetupContext("saveModel", 0);
  __Pyx_INCREF(__pyx_v_filename);
  __Pyx_INCREF(__pyx_v_savedir);
  __Pyx_INCREF(__pyx_v_tempdir);
  __Pyx_INCREF(__pyx_v_codeWriter);

  /* "metaphor/monal/driver/_driver.py":2727
 *             forcecreate=False, codeWriter=None, dynamiclinking=False): #, **kwds):  # Driver
 *         # kwds is garbage collector
 *         modulename = ""             # <<<<<<<<<<<<<<
 *         self.trainable = trainable
 * #         internalC odeWriter = False
 */
  __Pyx_INCREF(__pyx_kp_u__2);
  __pyx_v_modulename = __pyx_kp_u__2;

  /* "metaphor/monal/driver/_driver.py":2728
 *         # kwds is garbage collector
 *         modulename = ""
 *         self.trainable = trainable             # <<<<<<<<<<<<<<
 * #         internalC odeWriter = False
 *         originalsavedir = savedir
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_trainable, __pyx_v_trainable) < 0) __PYX_ERR(0, 2728, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2730
 *         self.trainable = trainable
 * #         internalC odeWriter = False
 *         originalsavedir = savedir             # <<<<<<<<<<<<<<
 *         if filename and not savedir:
 *             savedir = os.path.dirname(filename)
 */
  __Pyx_INCREF(__pyx_v_savedir);
  __pyx_v_originalsavedir = __pyx_v_savedir;

  /* "metaphor/monal/driver/_driver.py":2731
 * #         internalC odeWriter = False
 *         originalsavedir = savedir
 *         if filename and not savedir:             # <<<<<<<<<<<<<<
 *             savedir = os.path.dirname(filename)
 *         if not filename:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2731, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_savedir); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2731, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2732
 *         originalsavedir = savedir
 *         if filename and not savedir:
 *             savedir = os.path.dirname(filename)             # <<<<<<<<<<<<<<
 *         if not filename:
 *             if self.name:
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dirname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_filename);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_savedir, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2731
 * #         internalC odeWriter = False
 *         originalsavedir = savedir
 *         if filename and not savedir:             # <<<<<<<<<<<<<<
 *             savedir = os.path.dirname(filename)
 *         if not filename:
 */
  }

  /* "metaphor/monal/driver/_driver.py":2733
 *         if filename and not savedir:
 *             savedir = os.path.dirname(filename)
 *         if not filename:             # <<<<<<<<<<<<<<
 *             if self.name:
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_1) != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2734
 *             savedir = os.path.dirname(filename)
 *         if not filename:
 *             if self.name:             # <<<<<<<<<<<<<<
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 *             elif self.mainModel.name:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2734, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2735
 *         if not filename:
 *             if self.name:
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #             # <<<<<<<<<<<<<<
 *             elif self.mainModel.name:
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_extfmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_savingformat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2734
 *             savedir = os.path.dirname(filename)
 *         if not filename:
 *             if self.name:             # <<<<<<<<<<<<<<
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 *             elif self.mainModel.name:
 */
      goto __pyx_L7;
    }

    /* "metaphor/monal/driver/_driver.py":2736
 *             if self.name:
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 *             elif self.mainModel.name:             # <<<<<<<<<<<<<<
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2737
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 *             elif self.mainModel.name:
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]             # <<<<<<<<<<<<<<
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:
 *             if originalsavedir:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2737, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2737, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_extfmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_savingformat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2736
 *             if self.name:
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 *             elif self.mainModel.name:             # <<<<<<<<<<<<<<
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:
 */
    }
    __pyx_L7:;

    /* "metaphor/monal/driver/_driver.py":2733
 *         if filename and not savedir:
 *             savedir = os.path.dirname(filename)
 *         if not filename:             # <<<<<<<<<<<<<<
 *             if self.name:
 *                 filename = self.name.lower() + C.extfmt[savingformat]  #
 */
  }

  /* "metaphor/monal/driver/_driver.py":2738
 *             elif self.mainModel.name:
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:             # <<<<<<<<<<<<<<
 *             if originalsavedir:
 *                 filename = os.path.join(originalsavedir, filename)
 */
  __Pyx_INCREF(__pyx_v_savingformat);
  __pyx_t_4 = __pyx_v_savingformat;
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SF_BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SF_JSON); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __pyx_t_1;
  __pyx_L9_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "metaphor/monal/driver/_driver.py":2739
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:
 *             if originalsavedir:             # <<<<<<<<<<<<<<
 *                 filename = os.path.join(originalsavedir, filename)
 *             return self.mainModel.saveModel(filename, savingformat)
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_originalsavedir); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2739, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2740
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:
 *             if originalsavedir:
 *                 filename = os.path.join(originalsavedir, filename)             # <<<<<<<<<<<<<<
 *             return self.mainModel.saveModel(filename, savingformat)
 *         elif savingformat in (C.SF_CCODE, C.SF_CCODEMULTI):
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_originalsavedir, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_originalsavedir, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2740, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_originalsavedir);
        __Pyx_GIVEREF(__pyx_v_originalsavedir);
        PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_originalsavedir);
        __Pyx_INCREF(__pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_filename);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":2739
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:
 *             if originalsavedir:             # <<<<<<<<<<<<<<
 *                 filename = os.path.join(originalsavedir, filename)
 *             return self.mainModel.saveModel(filename, savingformat)
 */
    }

    /* "metaphor/monal/driver/_driver.py":2741
 *             if originalsavedir:
 *                 filename = os.path.join(originalsavedir, filename)
 *             return self.mainModel.saveModel(filename, savingformat)             # <<<<<<<<<<<<<<
 *         elif savingformat in (C.SF_CCODE, C.SF_CCODEMULTI):
 *             self.mainModel.trueName = self.mainModel.name
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_saveModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_filename, __pyx_v_savingformat};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_filename, __pyx_v_savingformat};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_filename);
      __Pyx_INCREF(__pyx_v_savingformat);
      __Pyx_GIVEREF(__pyx_v_savingformat);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_savingformat);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":2738
 *             elif self.mainModel.name:
 *                 filename = self.mainModel.name.lower() + C.extfmt[savingformat]
 *         if savingformat in [C.SF_XML, C.SF_BINARY, C.SF_JSON]:             # <<<<<<<<<<<<<<
 *             if originalsavedir:
 *                 filename = os.path.join(originalsavedir, filename)
 */
  }

  /* "metaphor/monal/driver/_driver.py":2742
 *                 filename = os.path.join(originalsavedir, filename)
 *             return self.mainModel.saveModel(filename, savingformat)
 *         elif savingformat in (C.SF_CCODE, C.SF_CCODEMULTI):             # <<<<<<<<<<<<<<
 *             self.mainModel.trueName = self.mainModel.name
 *             #memname = self.mainModel.name
 */
  __Pyx_INCREF(__pyx_v_savingformat);
  __pyx_t_4 = __pyx_v_savingformat;
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SF_CCODE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SF_CCODEMULTI); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L13_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":2743
 *             return self.mainModel.saveModel(filename, savingformat)
 *         elif savingformat in (C.SF_CCODE, C.SF_CCODEMULTI):
 *             self.mainModel.trueName = self.mainModel.name             # <<<<<<<<<<<<<<
 *             #memname = self.mainModel.name
 *             self.name = os.path.basename(filename)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_trueName, __pyx_t_6) < 0) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2745
 *             self.mainModel.trueName = self.mainModel.name
 *             #memname = self.mainModel.name
 *             self.name = os.path.basename(filename)             # <<<<<<<<<<<<<<
 *             self.mainModel.name = self.name
 *             filename = os.path.dirname(filename)
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_basename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2745, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_filename);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_t_4) < 0) __PYX_ERR(0, 2745, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":2746
 *             #memname = self.mainModel.name
 *             self.name = os.path.basename(filename)
 *             self.mainModel.name = self.name             # <<<<<<<<<<<<<<
 *             filename = os.path.dirname(filename)
 *             savedir = savedir if savedir else filename
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_name, __pyx_t_4) < 0) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2747
 *             self.name = os.path.basename(filename)
 *             self.mainModel.name = self.name
 *             filename = os.path.dirname(filename)             # <<<<<<<<<<<<<<
 *             savedir = savedir if savedir else filename
 * #             if not self.codeWriter:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_filename};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2747, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_filename};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2747, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_filename);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2748
 *             self.mainModel.name = self.name
 *             filename = os.path.dirname(filename)
 *             savedir = savedir if savedir else filename             # <<<<<<<<<<<<<<
 * #             if not self.codeWriter:
 * #                 internalC odeWriter = True
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_savedir); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2748, __pyx_L1_error)
    if (__pyx_t_3) {
      __Pyx_INCREF(__pyx_v_savedir);
      __pyx_t_6 = __pyx_v_savedir;
    } else {
      __Pyx_INCREF(__pyx_v_filename);
      __pyx_t_6 = __pyx_v_filename;
    }
    __Pyx_DECREF_SET(__pyx_v_savedir, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2752
 * #                 internalC odeWriter = True
 *             #self.
 *             if not codeWriter:             # <<<<<<<<<<<<<<
 *                 codeWriter = createCodeWriter(self, savedir=savedir,
 *                     trainable=trainable,
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_codeWriter); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2752, __pyx_L1_error)
    __pyx_t_1 = ((!__pyx_t_3) != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2753
 *             #self.
 *             if not codeWriter:
 *                 codeWriter = createCodeWriter(self, savedir=savedir,             # <<<<<<<<<<<<<<
 *                     trainable=trainable,
 *                     original=self.mainModel.originallink,
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_createCodeWriter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_savedir, __pyx_v_savedir) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2754
 *             if not codeWriter:
 *                 codeWriter = createCodeWriter(self, savedir=savedir,
 *                     trainable=trainable,             # <<<<<<<<<<<<<<
 *                     original=self.mainModel.originallink,
 *                     dynamiclinking=dynamiclinking,
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_trainable, __pyx_v_trainable) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2755
 *                 codeWriter = createCodeWriter(self, savedir=savedir,
 *                     trainable=trainable,
 *                     original=self.mainModel.originallink,             # <<<<<<<<<<<<<<
 *                     dynamiclinking=dynamiclinking,
 *                     verbose=self.verbose)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_originallink); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_original, __pyx_t_9) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":2756
 *                     trainable=trainable,
 *                     original=self.mainModel.originallink,
 *                     dynamiclinking=dynamiclinking,             # <<<<<<<<<<<<<<
 *                     verbose=self.verbose)
 *             savedir = codeWriter.SaveDir  #self.
 */
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dynamiclinking, __pyx_v_dynamiclinking) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2757
 *                     original=self.mainModel.originallink,
 *                     dynamiclinking=dynamiclinking,
 *                     verbose=self.verbose)             # <<<<<<<<<<<<<<
 *             savedir = codeWriter.SaveDir  #self.
 *             #self.codeWriter.moduleName = packname
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_verbose, __pyx_t_9) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":2753
 *             #self.
 *             if not codeWriter:
 *                 codeWriter = createCodeWriter(self, savedir=savedir,             # <<<<<<<<<<<<<<
 *                     trainable=trainable,
 *                     original=self.mainModel.originallink,
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_codeWriter, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":2752
 * #                 internalC odeWriter = True
 *             #self.
 *             if not codeWriter:             # <<<<<<<<<<<<<<
 *                 codeWriter = createCodeWriter(self, savedir=savedir,
 *                     trainable=trainable,
 */
    }

    /* "metaphor/monal/driver/_driver.py":2758
 *                     dynamiclinking=dynamiclinking,
 *                     verbose=self.verbose)
 *             savedir = codeWriter.SaveDir  #self.             # <<<<<<<<<<<<<<
 *             #self.codeWriter.moduleName = packname
 *             #ftarg = os.path.join(self.codeWriter.SaveDir, packname)
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_codeWriter, __pyx_n_s_SaveDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF_SET(__pyx_v_savedir, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":2764
 *             #with open(os.path.join(ftarg, "__ init__.py"), "w") as f:
 *             #    f.write("")
 *             if savingformat == C.SF_CCODE:             # <<<<<<<<<<<<<<
 *                 codelist = CC.PyCodeList
 *             else:
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_SF_CCODE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2765
 *             #    f.write("")
 *             if savingformat == C.SF_CCODE:
 *                 codelist = CC.PyCodeList             # <<<<<<<<<<<<<<
 *             else:
 *                 codelist = CC.PyCodeListShort
 */
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_PyCodeList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_codelist = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2764
 *             #with open(os.path.join(ftarg, "__ init__.py"), "w") as f:
 *             #    f.write("")
 *             if savingformat == C.SF_CCODE:             # <<<<<<<<<<<<<<
 *                 codelist = CC.PyCodeList
 *             else:
 */
      goto __pyx_L16;
    }

    /* "metaphor/monal/driver/_driver.py":2767
 *                 codelist = CC.PyCodeList
 *             else:
 *                 codelist = CC.PyCodeListShort             # <<<<<<<<<<<<<<
 *             for code in codelist:
 *                 codeWriter.CodeFichier(code, 1, dosave=True)
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_PyCodeListShort); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_codelist = __pyx_t_9;
      __pyx_t_9 = 0;
    }
    __pyx_L16:;

    /* "metaphor/monal/driver/_driver.py":2768
 *             else:
 *                 codelist = CC.PyCodeListShort
 *             for code in codelist:             # <<<<<<<<<<<<<<
 *                 codeWriter.CodeFichier(code, 1, dosave=True)
 *                 codeWriter.CodeFichier(code, dosave=True)
 */
    if (likely(PyList_CheckExact(__pyx_v_codelist)) || PyTuple_CheckExact(__pyx_v_codelist)) {
      __pyx_t_9 = __pyx_v_codelist; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_codelist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2768, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2768, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2768, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2768, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2768, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_11(__pyx_t_9);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2768, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2769
 *                 codelist = CC.PyCodeListShort
 *             for code in codelist:
 *                 codeWriter.CodeFichier(code, 1, dosave=True)             # <<<<<<<<<<<<<<
 *                 codeWriter.CodeFichier(code, dosave=True)
 *             self.mainModel.name = self.mainModel.trueName
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_codeWriter, __pyx_n_s_CodeFichier); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_code);
      __Pyx_GIVEREF(__pyx_v_code);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_code);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dosave, Py_True) < 0) __PYX_ERR(0, 2769, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2770
 *             for code in codelist:
 *                 codeWriter.CodeFichier(code, 1, dosave=True)
 *                 codeWriter.CodeFichier(code, dosave=True)             # <<<<<<<<<<<<<<
 *             self.mainModel.name = self.mainModel.trueName
 * #            if internalC odeWriter:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_codeWriter, __pyx_n_s_CodeFichier); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_code);
      __Pyx_GIVEREF(__pyx_v_code);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_code);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dosave, Py_True) < 0) __PYX_ERR(0, 2770, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2768
 *             else:
 *                 codelist = CC.PyCodeListShort
 *             for code in codelist:             # <<<<<<<<<<<<<<
 *                 codeWriter.CodeFichier(code, 1, dosave=True)
 *                 codeWriter.CodeFichier(code, dosave=True)
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":2771
 *                 codeWriter.CodeFichier(code, 1, dosave=True)
 *                 codeWriter.CodeFichier(code, dosave=True)
 *             self.mainModel.name = self.mainModel.trueName             # <<<<<<<<<<<<<<
 * #            if internalC odeWriter:
 *             #self.codeWriter.__del__()
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_trueName); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_9, __pyx_n_s_name, __pyx_t_7) < 0) __PYX_ERR(0, 2771, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/monal/driver/_driver.py":2742
 *                 filename = os.path.join(originalsavedir, filename)
 *             return self.mainModel.saveModel(filename, savingformat)
 *         elif savingformat in (C.SF_CCODE, C.SF_CCODEMULTI):             # <<<<<<<<<<<<<<
 *             self.mainModel.trueName = self.mainModel.name
 *             #memname = self.mainModel.name
 */
    goto __pyx_L8;
  }

  /* "metaphor/monal/driver/_driver.py":2777
 * #            codeWriter = None
 * 
 *         elif savingformat in [C.SF_CPYTHON, C.SF_DLL, C.SF_DLLTRAIN]:             # <<<<<<<<<<<<<<
 * #            outfile = sys.stdout if verbose else None
 *             tempdir = getTempDir(keeptemp, appli=os.path.join('metaphor', 'nn'), doprint = verbose)
 */
  __Pyx_INCREF(__pyx_v_savingformat);
  __pyx_t_9 = __pyx_v_savingformat;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SF_CPYTHON); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SF_DLL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SF_DLLTRAIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L19_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_3)) {

    /* "metaphor/monal/driver/_driver.py":2779
 *         elif savingformat in [C.SF_CPYTHON, C.SF_DLL, C.SF_DLLTRAIN]:
 * #            outfile = sys.stdout if verbose else None
 *             tempdir = getTempDir(keeptemp, appli=os.path.join('metaphor', 'nn'), doprint = verbose)             # <<<<<<<<<<<<<<
 * #             isolddir = bool(tempdir)
 * #             if keeptemp and isinstance(keeptemp, str):
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_getTempDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_keeptemp);
    __Pyx_GIVEREF(__pyx_v_keeptemp);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_keeptemp);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_appli, __pyx_t_5) < 0) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_doprint, __pyx_v_verbose) < 0) __PYX_ERR(0, 2779, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_tempdir, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/monal/driver/_driver.py":2794
 * #             if not self.codeWriter:
 * #                 internalC odeWriter = True
 *             codeWriter = createCodeWriter(self, savedir=tempdir,             # <<<<<<<<<<<<<<
 *                 trainable=trainable,
 *                 original=self.mainModel.originallink,
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_createCodeWriter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_savedir, __pyx_v_tempdir) < 0) __PYX_ERR(0, 2794, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2795
 * #                 internalC odeWriter = True
 *             codeWriter = createCodeWriter(self, savedir=tempdir,
 *                 trainable=trainable,             # <<<<<<<<<<<<<<
 *                 original=self.mainModel.originallink,
 *                 dynamiclinking=dynamiclinking,
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_trainable, __pyx_v_trainable) < 0) __PYX_ERR(0, 2794, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2796
 *             codeWriter = createCodeWriter(self, savedir=tempdir,
 *                 trainable=trainable,
 *                 original=self.mainModel.originallink,             # <<<<<<<<<<<<<<
 *                 dynamiclinking=dynamiclinking,
 *                 verbose=self.verbose)
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_originallink); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_original, __pyx_t_6) < 0) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2797
 *                 trainable=trainable,
 *                 original=self.mainModel.originallink,
 *                 dynamiclinking=dynamiclinking,             # <<<<<<<<<<<<<<
 *                 verbose=self.verbose)
 *             if savingformat == C.SF_CPYTHON:
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dynamiclinking, __pyx_v_dynamiclinking) < 0) __PYX_ERR(0, 2794, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2798
 *                 original=self.mainModel.originallink,
 *                 dynamiclinking=dynamiclinking,
 *                 verbose=self.verbose)             # <<<<<<<<<<<<<<
 *             if savingformat == C.SF_CPYTHON:
 *                 clist = CC.PyCodeList
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_verbose, __pyx_t_6) < 0) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2794
 * #             if not self.codeWriter:
 * #                 internalC odeWriter = True
 *             codeWriter = createCodeWriter(self, savedir=tempdir,             # <<<<<<<<<<<<<<
 *                 trainable=trainable,
 *                 original=self.mainModel.originallink,
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_codeWriter, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2799
 *                 dynamiclinking=dynamiclinking,
 *                 verbose=self.verbose)
 *             if savingformat == C.SF_CPYTHON:             # <<<<<<<<<<<<<<
 *                 clist = CC.PyCodeList
 *             elif savingformat == C.SF_DLLTRAIN:
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SF_CPYTHON); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2799, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2799, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2800
 *                 verbose=self.verbose)
 *             if savingformat == C.SF_CPYTHON:
 *                 clist = CC.PyCodeList             # <<<<<<<<<<<<<<
 *             elif savingformat == C.SF_DLLTRAIN:
 *                 clist = CC.PyCodeSingleTrain
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_PyCodeList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_clist = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2799
 *                 dynamiclinking=dynamiclinking,
 *                 verbose=self.verbose)
 *             if savingformat == C.SF_CPYTHON:             # <<<<<<<<<<<<<<
 *                 clist = CC.PyCodeList
 *             elif savingformat == C.SF_DLLTRAIN:
 */
      goto __pyx_L22;
    }

    /* "metaphor/monal/driver/_driver.py":2801
 *             if savingformat == C.SF_CPYTHON:
 *                 clist = CC.PyCodeList
 *             elif savingformat == C.SF_DLLTRAIN:             # <<<<<<<<<<<<<<
 *                 clist = CC.PyCodeSingleTrain
 *             else:
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SF_DLLTRAIN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2802
 *                 clist = CC.PyCodeList
 *             elif savingformat == C.SF_DLLTRAIN:
 *                 clist = CC.PyCodeSingleTrain             # <<<<<<<<<<<<<<
 *             else:
 *                 clist = CC.PyCodeList2
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_PyCodeSingleTrain); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_clist = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2801
 *             if savingformat == C.SF_CPYTHON:
 *                 clist = CC.PyCodeList
 *             elif savingformat == C.SF_DLLTRAIN:             # <<<<<<<<<<<<<<
 *                 clist = CC.PyCodeSingleTrain
 *             else:
 */
      goto __pyx_L22;
    }

    /* "metaphor/monal/driver/_driver.py":2804
 *                 clist = CC.PyCodeSingleTrain
 *             else:
 *                 clist = CC.PyCodeList2             # <<<<<<<<<<<<<<
 *             for code in clist:
 *                 st = codeWriter.CodeFichier(code, 1, dosave=True)
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_PyCodeList2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_clist = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_L22:;

    /* "metaphor/monal/driver/_driver.py":2805
 *             else:
 *                 clist = CC.PyCodeList2
 *             for code in clist:             # <<<<<<<<<<<<<<
 *                 st = codeWriter.CodeFichier(code, 1, dosave=True)
 *                 st = codeWriter.CodeFichier(code, dosave=True)
 */
    if (likely(PyList_CheckExact(__pyx_v_clist)) || PyTuple_CheckExact(__pyx_v_clist)) {
      __pyx_t_7 = __pyx_v_clist; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_clist); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2805, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2805, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2805, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2805, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2805, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_11(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2805, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2806
 *                 clist = CC.PyCodeList2
 *             for code in clist:
 *                 st = codeWriter.CodeFichier(code, 1, dosave=True)             # <<<<<<<<<<<<<<
 *                 st = codeWriter.CodeFichier(code, dosave=True)
 * #             if internalC odeWriter:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_codeWriter, __pyx_n_s_CodeFichier); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_code);
      __Pyx_GIVEREF(__pyx_v_code);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_code);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dosave, Py_True) < 0) __PYX_ERR(0, 2806, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/monal/driver/_driver.py":2807
 *             for code in clist:
 *                 st = codeWriter.CodeFichier(code, 1, dosave=True)
 *                 st = codeWriter.CodeFichier(code, dosave=True)             # <<<<<<<<<<<<<<
 * #             if internalC odeWriter:
 * #             self._codeWriter.__del__()
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_codeWriter, __pyx_n_s_CodeFichier); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_code);
      __Pyx_GIVEREF(__pyx_v_code);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_code);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dosave, Py_True) < 0) __PYX_ERR(0, 2807, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2805
 *             else:
 *                 clist = CC.PyCodeList2
 *             for code in clist:             # <<<<<<<<<<<<<<
 *                 st = codeWriter.CodeFichier(code, 1, dosave=True)
 *                 st = codeWriter.CodeFichier(code, dosave=True)
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2811
 * #             self._codeWriter.__del__()
 * #             self._codeWriter = None
 *             codeWriter = None             # <<<<<<<<<<<<<<
 * 
 *             # action de compilation
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF_SET(__pyx_v_codeWriter, Py_None);

    /* "metaphor/monal/driver/_driver.py":2815
 *             # action de compilation
 *             #setupname = self.mainModel.name + 'setup.py'
 *             pathmem = os.getcwd()             # <<<<<<<<<<<<<<
 *             os.chdir(tempdir)
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getcwd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2815, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2815, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pathmem = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2816
 *             #setupname = self.mainModel.name + 'setup.py'
 *             pathmem = os.getcwd()
 *             os.chdir(tempdir)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_chdir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_tempdir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_tempdir};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2816, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_tempdir};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2816, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2816, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_tempdir);
        __Pyx_GIVEREF(__pyx_v_tempdir);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_tempdir);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2816, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2819
 * 
 * 
 *             nm = self.mainModel.name.lower()             # <<<<<<<<<<<<<<
 *             if savingformat == C.SF_DLLTRAIN:
 *                 flist = ["{0}trainbase.c".format(nm)]
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2819, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2819, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_nm = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2820
 * 
 *             nm = self.mainModel.name.lower()
 *             if savingformat == C.SF_DLLTRAIN:             # <<<<<<<<<<<<<<
 *                 flist = ["{0}trainbase.c".format(nm)]
 *             else:
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SF_DLLTRAIN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2820, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2820, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":2821
 *             nm = self.mainModel.name.lower()
 *             if savingformat == C.SF_DLLTRAIN:
 *                 flist = ["{0}trainbase.c".format(nm)]             # <<<<<<<<<<<<<<
 *             else:
 *                 flist = ["{0}usebase.c".format(nm)]
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_trainbase_c, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_nm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_nm};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2821, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_nm};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2821, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2821, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_nm);
          __Pyx_GIVEREF(__pyx_v_nm);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_nm);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2821, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_7);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_v_flist = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2820
 * 
 *             nm = self.mainModel.name.lower()
 *             if savingformat == C.SF_DLLTRAIN:             # <<<<<<<<<<<<<<
 *                 flist = ["{0}trainbase.c".format(nm)]
 *             else:
 */
      goto __pyx_L25;
    }

    /* "metaphor/monal/driver/_driver.py":2823
 *                 flist = ["{0}trainbase.c".format(nm)]
 *             else:
 *                 flist = ["{0}usebase.c".format(nm)]             # <<<<<<<<<<<<<<
 * 
 *             includedirs = [os.path.join(os.path.dirname(monalfile), "include")]  # modif includedirs le 18/11/14
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_usebase_c, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2823, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_nm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2823, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_nm};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2823, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_nm};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2823, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_nm);
          __Pyx_GIVEREF(__pyx_v_nm);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_nm);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2823, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_v_flist = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;
    }
    __pyx_L25:;

    /* "metaphor/monal/driver/_driver.py":2825
 *                 flist = ["{0}usebase.c".format(nm)]
 * 
 *             includedirs = [os.path.join(os.path.dirname(monalfile), "include")]  # modif includedirs le 18/11/14             # <<<<<<<<<<<<<<
 * 
 *             if not trainable:
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_monalfile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_12) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_n_u_include};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2825, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_n_u_include};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2825, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_13 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_8, __pyx_t_5);
      __Pyx_INCREF(__pyx_n_u_include);
      __Pyx_GIVEREF(__pyx_n_u_include);
      PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_8, __pyx_n_u_include);
      __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_v_includedirs = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/monal/driver/_driver.py":2827
 *             includedirs = [os.path.join(os.path.dirname(monalfile), "include")]  # modif includedirs le 18/11/14
 * 
 *             if not trainable:             # <<<<<<<<<<<<<<
 *                 nm += "use"
 *             if savingformat == C.SF_CPYTHON:
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_trainable); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2827, __pyx_L1_error)
    __pyx_t_1 = ((!__pyx_t_3) != 0);
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2828
 * 
 *             if not trainable:
 *                 nm += "use"             # <<<<<<<<<<<<<<
 *             if savingformat == C.SF_CPYTHON:
 *                 mainfile = "{0}.c".format(nm)
 */
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_nm, __pyx_n_u_use); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_nm, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2827
 *             includedirs = [os.path.join(os.path.dirname(monalfile), "include")]  # modif includedirs le 18/11/14
 * 
 *             if not trainable:             # <<<<<<<<<<<<<<
 *                 nm += "use"
 *             if savingformat == C.SF_CPYTHON:
 */
    }

    /* "metaphor/monal/driver/_driver.py":2829
 *             if not trainable:
 *                 nm += "use"
 *             if savingformat == C.SF_CPYTHON:             # <<<<<<<<<<<<<<
 *                 mainfile = "{0}.c".format(nm)
 *                 compileAsExtension(mainfile, flist, compiler=compiler,
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SF_CPYTHON); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2829, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2829, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "metaphor/monal/driver/_driver.py":2830
 *                 nm += "use"
 *             if savingformat == C.SF_CPYTHON:
 *                 mainfile = "{0}.c".format(nm)             # <<<<<<<<<<<<<<
 *                 compileAsExtension(mainfile, flist, compiler=compiler,
 *                     includedirs=includedirs, libname="models", package=package,
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_c, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_13) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_nm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_nm};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2830, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_nm};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2830, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2830, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); __pyx_t_13 = NULL;
          __Pyx_INCREF(__pyx_v_nm);
          __Pyx_GIVEREF(__pyx_v_nm);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_nm);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2830, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_mainfile = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "metaphor/monal/driver/_driver.py":2831
 *             if savingformat == C.SF_CPYTHON:
 *                 mainfile = "{0}.c".format(nm)
 *                 compileAsExtension(mainfile, flist, compiler=compiler,             # <<<<<<<<<<<<<<
 *                     includedirs=includedirs, libname="models", package=package,
 *                     verbose=verbose)
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_compileAsExtension); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_mainfile);
      __Pyx_GIVEREF(__pyx_v_mainfile);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_mainfile);
      __Pyx_INCREF(__pyx_v_flist);
      __Pyx_GIVEREF(__pyx_v_flist);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_flist);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_compiler, __pyx_v_compiler) < 0) __PYX_ERR(0, 2831, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2832
 *                 mainfile = "{0}.c".format(nm)
 *                 compileAsExtension(mainfile, flist, compiler=compiler,
 *                     includedirs=includedirs, libname="models", package=package,             # <<<<<<<<<<<<<<
 *                     verbose=verbose)
 *             else:
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_includedirs, __pyx_v_includedirs) < 0) __PYX_ERR(0, 2831, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_libname, __pyx_n_u_models) < 0) __PYX_ERR(0, 2831, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_package, __pyx_v_package) < 0) __PYX_ERR(0, 2831, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2833
 *                 compileAsExtension(mainfile, flist, compiler=compiler,
 *                     includedirs=includedirs, libname="models", package=package,
 *                     verbose=verbose)             # <<<<<<<<<<<<<<
 *             else:
 *                 mainfile = "{0}dll.c".format(nm)  # A modifier
 */
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 2831, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2831
 *             if savingformat == C.SF_CPYTHON:
 *                 mainfile = "{0}.c".format(nm)
 *                 compileAsExtension(mainfile, flist, compiler=compiler,             # <<<<<<<<<<<<<<
 *                     includedirs=includedirs, libname="models", package=package,
 *                     verbose=verbose)
 */
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "metaphor/monal/driver/_driver.py":2829
 *             if not trainable:
 *                 nm += "use"
 *             if savingformat == C.SF_CPYTHON:             # <<<<<<<<<<<<<<
 *                 mainfile = "{0}.c".format(nm)
 *                 compileAsExtension(mainfile, flist, compiler=compiler,
 */
      goto __pyx_L27;
    }

    /* "metaphor/monal/driver/_driver.py":2835
 *                     verbose=verbose)
 *             else:
 *                 mainfile = "{0}dll.c".format(nm)  # A modifier             # <<<<<<<<<<<<<<
 *                 if is_windows():
 *                     exports = None
 */
    /*else*/ {
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_dll_c, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_nm); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_nm};
          __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2835, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_13);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_nm};
          __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2835, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_13);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2835, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_v_nm);
          __Pyx_GIVEREF(__pyx_v_nm);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_nm);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2835, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_mainfile = __pyx_t_13;
      __pyx_t_13 = 0;

      /* "metaphor/monal/driver/_driver.py":2836
 *             else:
 *                 mainfile = "{0}dll.c".format(nm)  # A modifier
 *                 if is_windows():             # <<<<<<<<<<<<<<
 *                     exports = None
 *                 else:
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_windows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_6) {
        __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2836, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2836, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2836, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__pyx_t_1) {

        /* "metaphor/monal/driver/_driver.py":2837
 *                 mainfile = "{0}dll.c".format(nm)  # A modifier
 *                 if is_windows():
 *                     exports = None             # <<<<<<<<<<<<<<
 *                 else:
 *                     exports = [
 */
        __Pyx_INCREF(Py_None);
        __pyx_v_exports = ((PyObject*)Py_None);

        /* "metaphor/monal/driver/_driver.py":2836
 *             else:
 *                 mainfile = "{0}dll.c".format(nm)  # A modifier
 *                 if is_windows():             # <<<<<<<<<<<<<<
 *                     exports = None
 *                 else:
 */
        goto __pyx_L28;
      }

      /* "metaphor/monal/driver/_driver.py":2839
 *                     exports = None
 *                 else:
 *                     exports = [             # <<<<<<<<<<<<<<
 *                         "moduletype",
 *                         "close",
 */
      /*else*/ {
        __pyx_t_13 = PyList_New(17); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2839, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_n_u_moduletype);
        __Pyx_GIVEREF(__pyx_n_u_moduletype);
        PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_u_moduletype);
        __Pyx_INCREF(__pyx_n_u_close);
        __Pyx_GIVEREF(__pyx_n_u_close);
        PyList_SET_ITEM(__pyx_t_13, 1, __pyx_n_u_close);
        __Pyx_INCREF(__pyx_n_u_codeversion);
        __Pyx_GIVEREF(__pyx_n_u_codeversion);
        PyList_SET_ITEM(__pyx_t_13, 2, __pyx_n_u_codeversion);
        __Pyx_INCREF(__pyx_n_u_lasterror);
        __Pyx_GIVEREF(__pyx_n_u_lasterror);
        PyList_SET_ITEM(__pyx_t_13, 3, __pyx_n_u_lasterror);
        __Pyx_INCREF(__pyx_n_u_monalVersion);
        __Pyx_GIVEREF(__pyx_n_u_monalVersion);
        PyList_SET_ITEM(__pyx_t_13, 4, __pyx_n_u_monalVersion);
        __Pyx_INCREF(__pyx_n_u_paramCount);
        __Pyx_GIVEREF(__pyx_n_u_paramCount);
        PyList_SET_ITEM(__pyx_t_13, 5, __pyx_n_u_paramCount);
        __Pyx_INCREF(__pyx_n_u_inputCount);
        __Pyx_GIVEREF(__pyx_n_u_inputCount);
        PyList_SET_ITEM(__pyx_t_13, 6, __pyx_n_u_inputCount);
        __Pyx_INCREF(__pyx_n_u_outputCount);
        __Pyx_GIVEREF(__pyx_n_u_outputCount);
        PyList_SET_ITEM(__pyx_t_13, 7, __pyx_n_u_outputCount);
        __Pyx_INCREF(__pyx_n_u_hidden);
        __Pyx_GIVEREF(__pyx_n_u_hidden);
        PyList_SET_ITEM(__pyx_t_13, 8, __pyx_n_u_hidden);
        __Pyx_INCREF(__pyx_n_u_moduleName);
        __Pyx_GIVEREF(__pyx_n_u_moduleName);
        PyList_SET_ITEM(__pyx_t_13, 9, __pyx_n_u_moduleName);
        __Pyx_INCREF(__pyx_n_u_mark);
        __Pyx_GIVEREF(__pyx_n_u_mark);
        PyList_SET_ITEM(__pyx_t_13, 10, __pyx_n_u_mark);
        __Pyx_INCREF(__pyx_n_u_created);
        __Pyx_GIVEREF(__pyx_n_u_created);
        PyList_SET_ITEM(__pyx_t_13, 11, __pyx_n_u_created);
        __Pyx_INCREF(__pyx_n_u_getnorm);
        __Pyx_GIVEREF(__pyx_n_u_getnorm);
        PyList_SET_ITEM(__pyx_t_13, 12, __pyx_n_u_getnorm);
        __Pyx_INCREF(__pyx_n_u_setnorm);
        __Pyx_GIVEREF(__pyx_n_u_setnorm);
        PyList_SET_ITEM(__pyx_t_13, 13, __pyx_n_u_setnorm);
        __Pyx_INCREF(__pyx_n_u_getproperty);
        __Pyx_GIVEREF(__pyx_n_u_getproperty);
        PyList_SET_ITEM(__pyx_t_13, 14, __pyx_n_u_getproperty);
        __Pyx_INCREF(__pyx_n_u_setproperty);
        __Pyx_GIVEREF(__pyx_n_u_setproperty);
        PyList_SET_ITEM(__pyx_t_13, 15, __pyx_n_u_setproperty);
        __Pyx_INCREF(__pyx_n_u_seed);
        __Pyx_GIVEREF(__pyx_n_u_seed);
        PyList_SET_ITEM(__pyx_t_13, 16, __pyx_n_u_seed);
        __pyx_v_exports = ((PyObject*)__pyx_t_13);
        __pyx_t_13 = 0;

        /* "metaphor/monal/driver/_driver.py":2858
 *                         "setproperty",
 *                         "seed",]
 *                     if savingformat == C.SF_DLLTRAIN:             # <<<<<<<<<<<<<<
 *                         exports.extend([
 *                         "settrainstyle",
 */
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2858, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_SF_DLLTRAIN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2858, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2858, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2858, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (__pyx_t_1) {

          /* "metaphor/monal/driver/_driver.py":2859
 *                         "seed",]
 *                     if savingformat == C.SF_DLLTRAIN:
 *                         exports.extend([             # <<<<<<<<<<<<<<
 *                         "settrainstyle",
 *                         "gettrainstyle",
 */
          __pyx_t_13 = PyList_New(39); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2859, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_INCREF(__pyx_n_u_settrainstyle);
          __Pyx_GIVEREF(__pyx_n_u_settrainstyle);
          PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_u_settrainstyle);
          __Pyx_INCREF(__pyx_n_u_gettrainstyle);
          __Pyx_GIVEREF(__pyx_n_u_gettrainstyle);
          PyList_SET_ITEM(__pyx_t_13, 1, __pyx_n_u_gettrainstyle);
          __Pyx_INCREF(__pyx_n_u_gettraintype);
          __Pyx_GIVEREF(__pyx_n_u_gettraintype);
          PyList_SET_ITEM(__pyx_t_13, 2, __pyx_n_u_gettraintype);
          __Pyx_INCREF(__pyx_n_u_configuration);
          __Pyx_GIVEREF(__pyx_n_u_configuration);
          PyList_SET_ITEM(__pyx_t_13, 3, __pyx_n_u_configuration);
          __Pyx_INCREF(__pyx_n_u_linear);
          __Pyx_GIVEREF(__pyx_n_u_linear);
          PyList_SET_ITEM(__pyx_t_13, 4, __pyx_n_u_linear);
          __Pyx_INCREF(__pyx_n_u_baselen);
          __Pyx_GIVEREF(__pyx_n_u_baselen);
          PyList_SET_ITEM(__pyx_t_13, 5, __pyx_n_u_baselen);
          __Pyx_INCREF(__pyx_n_u_modelCount);
          __Pyx_GIVEREF(__pyx_n_u_modelCount);
          PyList_SET_ITEM(__pyx_t_13, 6, __pyx_n_u_modelCount);
          __Pyx_INCREF(__pyx_n_u_dataCount);
          __Pyx_GIVEREF(__pyx_n_u_dataCount);
          PyList_SET_ITEM(__pyx_t_13, 7, __pyx_n_u_dataCount);
          __Pyx_INCREF(__pyx_n_u_xml);
          __Pyx_GIVEREF(__pyx_n_u_xml);
          PyList_SET_ITEM(__pyx_t_13, 8, __pyx_n_u_xml);
          __Pyx_INCREF(__pyx_n_u_base);
          __Pyx_GIVEREF(__pyx_n_u_base);
          PyList_SET_ITEM(__pyx_t_13, 9, __pyx_n_u_base);
          __Pyx_INCREF(__pyx_n_u_getbiasbased);
          __Pyx_GIVEREF(__pyx_n_u_getbiasbased);
          PyList_SET_ITEM(__pyx_t_13, 10, __pyx_n_u_getbiasbased);
          __Pyx_INCREF(__pyx_n_u_getoutlinks);
          __Pyx_GIVEREF(__pyx_n_u_getoutlinks);
          PyList_SET_ITEM(__pyx_t_13, 11, __pyx_n_u_getoutlinks);
          __Pyx_INCREF(__pyx_n_u_getnames);
          __Pyx_GIVEREF(__pyx_n_u_getnames);
          PyList_SET_ITEM(__pyx_t_13, 12, __pyx_n_u_getnames);
          __Pyx_INCREF(__pyx_n_u_setidentifier);
          __Pyx_GIVEREF(__pyx_n_u_setidentifier);
          PyList_SET_ITEM(__pyx_t_13, 13, __pyx_n_u_setidentifier);
          __Pyx_INCREF(__pyx_n_u_getinputnorm);
          __Pyx_GIVEREF(__pyx_n_u_getinputnorm);
          PyList_SET_ITEM(__pyx_t_13, 14, __pyx_n_u_getinputnorm);
          __Pyx_INCREF(__pyx_n_u_setinputnorm);
          __Pyx_GIVEREF(__pyx_n_u_setinputnorm);
          PyList_SET_ITEM(__pyx_t_13, 15, __pyx_n_u_setinputnorm);
          __Pyx_INCREF(__pyx_n_u_getdebugfile);
          __Pyx_GIVEREF(__pyx_n_u_getdebugfile);
          PyList_SET_ITEM(__pyx_t_13, 16, __pyx_n_u_getdebugfile);
          __Pyx_INCREF(__pyx_n_u_setdebugfile);
          __Pyx_GIVEREF(__pyx_n_u_setdebugfile);
          PyList_SET_ITEM(__pyx_t_13, 17, __pyx_n_u_setdebugfile);
          __Pyx_INCREF(__pyx_n_u_getdata);
          __Pyx_GIVEREF(__pyx_n_u_getdata);
          PyList_SET_ITEM(__pyx_t_13, 18, __pyx_n_u_getdata);
          __Pyx_INCREF(__pyx_n_u_gettargets);
          __Pyx_GIVEREF(__pyx_n_u_gettargets);
          PyList_SET_ITEM(__pyx_t_13, 19, __pyx_n_u_gettargets);
          __Pyx_INCREF(__pyx_n_u_settargets);
          __Pyx_GIVEREF(__pyx_n_u_settargets);
          PyList_SET_ITEM(__pyx_t_13, 20, __pyx_n_u_settargets);
          __Pyx_INCREF(__pyx_n_u_getresiduals);
          __Pyx_GIVEREF(__pyx_n_u_getresiduals);
          PyList_SET_ITEM(__pyx_t_13, 21, __pyx_n_u_getresiduals);
          __Pyx_INCREF(__pyx_n_u_getlastcost);
          __Pyx_GIVEREF(__pyx_n_u_getlastcost);
          PyList_SET_ITEM(__pyx_t_13, 22, __pyx_n_u_getlastcost);
          __Pyx_INCREF(__pyx_n_u_getcost);
          __Pyx_GIVEREF(__pyx_n_u_getcost);
          PyList_SET_ITEM(__pyx_t_13, 23, __pyx_n_u_getcost);
          __Pyx_INCREF(__pyx_n_u_getpress);
          __Pyx_GIVEREF(__pyx_n_u_getpress);
          PyList_SET_ITEM(__pyx_t_13, 24, __pyx_n_u_getpress);
          __Pyx_INCREF(__pyx_n_u_transferindex);
          __Pyx_GIVEREF(__pyx_n_u_transferindex);
          PyList_SET_ITEM(__pyx_t_13, 25, __pyx_n_u_transferindex);
          __Pyx_INCREF(__pyx_n_u_transfergradientindex);
          __Pyx_GIVEREF(__pyx_n_u_transfergradientindex);
          PyList_SET_ITEM(__pyx_t_13, 26, __pyx_n_u_transfergradientindex);
          __Pyx_INCREF(__pyx_n_u_transfergradient);
          __Pyx_GIVEREF(__pyx_n_u_transfergradient);
          PyList_SET_ITEM(__pyx_t_13, 27, __pyx_n_u_transfergradient);
          __Pyx_INCREF(__pyx_n_u_transferleverage);
          __Pyx_GIVEREF(__pyx_n_u_transferleverage);
          PyList_SET_ITEM(__pyx_t_13, 28, __pyx_n_u_transferleverage);
          __Pyx_INCREF(__pyx_n_u_getfreedomindex);
          __Pyx_GIVEREF(__pyx_n_u_getfreedomindex);
          PyList_SET_ITEM(__pyx_t_13, 29, __pyx_n_u_getfreedomindex);
          __Pyx_INCREF(__pyx_n_u_getjacobian);
          __Pyx_GIVEREF(__pyx_n_u_getjacobian);
          PyList_SET_ITEM(__pyx_t_13, 30, __pyx_n_u_getjacobian);
          __Pyx_INCREF(__pyx_n_u_getprime);
          __Pyx_GIVEREF(__pyx_n_u_getprime);
          PyList_SET_ITEM(__pyx_t_13, 31, __pyx_n_u_getprime);
          __Pyx_INCREF(__pyx_n_u_getdirector);
          __Pyx_GIVEREF(__pyx_n_u_getdirector);
          PyList_SET_ITEM(__pyx_t_13, 32, __pyx_n_u_getdirector);
          __Pyx_INCREF(__pyx_n_u_setdirector);
          __Pyx_GIVEREF(__pyx_n_u_setdirector);
          PyList_SET_ITEM(__pyx_t_13, 33, __pyx_n_u_setdirector);
          __Pyx_INCREF(__pyx_n_u_settrainingset);
          __Pyx_GIVEREF(__pyx_n_u_settrainingset);
          PyList_SET_ITEM(__pyx_t_13, 34, __pyx_n_u_settrainingset);
          __Pyx_INCREF(__pyx_n_u_setcallback);
          __Pyx_GIVEREF(__pyx_n_u_setcallback);
          PyList_SET_ITEM(__pyx_t_13, 35, __pyx_n_u_setcallback);
          __Pyx_INCREF(__pyx_n_u_train);
          __Pyx_GIVEREF(__pyx_n_u_train);
          PyList_SET_ITEM(__pyx_t_13, 36, __pyx_n_u_train);
          __Pyx_INCREF(__pyx_n_u_trainex);
          __Pyx_GIVEREF(__pyx_n_u_trainex);
          PyList_SET_ITEM(__pyx_t_13, 37, __pyx_n_u_trainex);
          __Pyx_INCREF(__pyx_n_u_loaddatabase);
          __Pyx_GIVEREF(__pyx_n_u_loaddatabase);
          PyList_SET_ITEM(__pyx_t_13, 38, __pyx_n_u_loaddatabase);
          __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_exports, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 2859, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "metaphor/monal/driver/_driver.py":2858
 *                         "setproperty",
 *                         "seed",]
 *                     if savingformat == C.SF_DLLTRAIN:             # <<<<<<<<<<<<<<
 *                         exports.extend([
 *                         "settrainstyle",
 */
          goto __pyx_L29;
        }

        /* "metaphor/monal/driver/_driver.py":2900
 *                         "trainex",
 *                         "loaddatabase",])
 *                     elif savingformat == C.SF_DLL:             # <<<<<<<<<<<<<<
 *                         exports.extend([
 *                         "getnames",
 */
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_SF_DLL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyObject_RichCompare(__pyx_v_savingformat, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2900, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2900, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (__pyx_t_1) {

          /* "metaphor/monal/driver/_driver.py":2901
 *                         "loaddatabase",])
 *                     elif savingformat == C.SF_DLL:
 *                         exports.extend([             # <<<<<<<<<<<<<<
 *                         "getnames",
 *                         "modelName",
 */
          __pyx_t_13 = PyList_New(23); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2901, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_INCREF(__pyx_n_u_getnames);
          __Pyx_GIVEREF(__pyx_n_u_getnames);
          PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_u_getnames);
          __Pyx_INCREF(__pyx_n_u_modelName);
          __Pyx_GIVEREF(__pyx_n_u_modelName);
          PyList_SET_ITEM(__pyx_t_13, 1, __pyx_n_u_modelName);
          __Pyx_INCREF(__pyx_n_u_dimension);
          __Pyx_GIVEREF(__pyx_n_u_dimension);
          PyList_SET_ITEM(__pyx_t_13, 2, __pyx_n_u_dimension);
          __Pyx_INCREF(__pyx_n_u_trainbase);
          __Pyx_GIVEREF(__pyx_n_u_trainbase);
          PyList_SET_ITEM(__pyx_t_13, 3, __pyx_n_u_trainbase);
          __Pyx_INCREF(__pyx_n_u_smiles);
          __Pyx_GIVEREF(__pyx_n_u_smiles);
          PyList_SET_ITEM(__pyx_t_13, 4, __pyx_n_u_smiles);
          __Pyx_INCREF(__pyx_n_u_configuration);
          __Pyx_GIVEREF(__pyx_n_u_configuration);
          PyList_SET_ITEM(__pyx_t_13, 5, __pyx_n_u_configuration);
          __Pyx_INCREF(__pyx_n_u_transfer);
          __Pyx_GIVEREF(__pyx_n_u_transfer);
          PyList_SET_ITEM(__pyx_t_13, 6, __pyx_n_u_transfer);
          __Pyx_INCREF(__pyx_n_u_transferprime);
          __Pyx_GIVEREF(__pyx_n_u_transferprime);
          PyList_SET_ITEM(__pyx_t_13, 7, __pyx_n_u_transferprime);
          __Pyx_INCREF(__pyx_n_u_transferleverage);
          __Pyx_GIVEREF(__pyx_n_u_transferleverage);
          PyList_SET_ITEM(__pyx_t_13, 8, __pyx_n_u_transferleverage);
          __Pyx_INCREF(__pyx_n_u_transferleverageex);
          __Pyx_GIVEREF(__pyx_n_u_transferleverageex);
          PyList_SET_ITEM(__pyx_t_13, 9, __pyx_n_u_transferleverageex);
          __Pyx_INCREF(__pyx_n_u_transferleverage2);
          __Pyx_GIVEREF(__pyx_n_u_transferleverage2);
          PyList_SET_ITEM(__pyx_t_13, 10, __pyx_n_u_transferleverage2);
          __Pyx_INCREF(__pyx_n_u_getstddev);
          __Pyx_GIVEREF(__pyx_n_u_getstddev);
          PyList_SET_ITEM(__pyx_t_13, 11, __pyx_n_u_getstddev);
          __Pyx_INCREF(__pyx_n_u_setstddev);
          __Pyx_GIVEREF(__pyx_n_u_setstddev);
          PyList_SET_ITEM(__pyx_t_13, 12, __pyx_n_u_setstddev);
          __Pyx_INCREF(__pyx_n_u_getparams);
          __Pyx_GIVEREF(__pyx_n_u_getparams);
          PyList_SET_ITEM(__pyx_t_13, 13, __pyx_n_u_getparams);
          __Pyx_INCREF(__pyx_n_u_setparams);
          __Pyx_GIVEREF(__pyx_n_u_setparams);
          PyList_SET_ITEM(__pyx_t_13, 14, __pyx_n_u_setparams);
          __Pyx_INCREF(__pyx_n_u_getwused);
          __Pyx_GIVEREF(__pyx_n_u_getwused);
          PyList_SET_ITEM(__pyx_t_13, 15, __pyx_n_u_getwused);
          __Pyx_INCREF(__pyx_n_u_getfreedom);
          __Pyx_GIVEREF(__pyx_n_u_getfreedom);
          PyList_SET_ITEM(__pyx_t_13, 16, __pyx_n_u_getfreedom);
          __Pyx_INCREF(__pyx_n_u_getdispersion);
          __Pyx_GIVEREF(__pyx_n_u_getdispersion);
          PyList_SET_ITEM(__pyx_t_13, 17, __pyx_n_u_getdispersion);
          __Pyx_INCREF(__pyx_n_u_setdispersion);
          __Pyx_GIVEREF(__pyx_n_u_setdispersion);
          PyList_SET_ITEM(__pyx_t_13, 18, __pyx_n_u_setdispersion);
          __Pyx_INCREF(__pyx_n_u_gethalfdispersion);
          __Pyx_GIVEREF(__pyx_n_u_gethalfdispersion);
          PyList_SET_ITEM(__pyx_t_13, 19, __pyx_n_u_gethalfdispersion);
          __Pyx_INCREF(__pyx_n_u_sethalfdispersion);
          __Pyx_GIVEREF(__pyx_n_u_sethalfdispersion);
          PyList_SET_ITEM(__pyx_t_13, 20, __pyx_n_u_sethalfdispersion);
          __Pyx_INCREF(__pyx_n_u_getbaselen);
          __Pyx_GIVEREF(__pyx_n_u_getbaselen);
          PyList_SET_ITEM(__pyx_t_13, 21, __pyx_n_u_getbaselen);
          __Pyx_INCREF(__pyx_n_u_setbaselen);
          __Pyx_GIVEREF(__pyx_n_u_setbaselen);
          PyList_SET_ITEM(__pyx_t_13, 22, __pyx_n_u_setbaselen);
          __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_exports, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 2901, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "metaphor/monal/driver/_driver.py":2900
 *                         "trainex",
 *                         "loaddatabase",])
 *                     elif savingformat == C.SF_DLL:             # <<<<<<<<<<<<<<
 *                         exports.extend([
 *                         "getnames",
 */
        }
        __pyx_L29:;
      }
      __pyx_L28:;

      /* "metaphor/monal/driver/_driver.py":2927
 * 
 * #                 print("package", package)
 *                 modulename = compileAsDll(mainfile, flist, exports=exports,             # <<<<<<<<<<<<<<
 *                     compiler=compiler, savedir=savedir,
 *                     includedirs=includedirs, package=package, verbose=verbose,
 */
      __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_compileAsDll); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_mainfile);
      __Pyx_GIVEREF(__pyx_v_mainfile);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_mainfile);
      __Pyx_INCREF(__pyx_v_flist);
      __Pyx_GIVEREF(__pyx_v_flist);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_flist);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_exports, __pyx_v_exports) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2928
 * #                 print("package", package)
 *                 modulename = compileAsDll(mainfile, flist, exports=exports,
 *                     compiler=compiler, savedir=savedir,             # <<<<<<<<<<<<<<
 *                     includedirs=includedirs, package=package, verbose=verbose,
 *                     forcelib=forcelib, forcecreate=forcecreate)
 */
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_compiler, __pyx_v_compiler) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_savedir, __pyx_v_savedir) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2929
 *                 modulename = compileAsDll(mainfile, flist, exports=exports,
 *                     compiler=compiler, savedir=savedir,
 *                     includedirs=includedirs, package=package, verbose=verbose,             # <<<<<<<<<<<<<<
 *                     forcelib=forcelib, forcecreate=forcecreate)
 *             os.chdir(pathmem)
 */
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_includedirs, __pyx_v_includedirs) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_package, __pyx_v_package) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2930
 *                     compiler=compiler, savedir=savedir,
 *                     includedirs=includedirs, package=package, verbose=verbose,
 *                     forcelib=forcelib, forcecreate=forcecreate)             # <<<<<<<<<<<<<<
 *             os.chdir(pathmem)
 *         else:
 */
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_forcelib, __pyx_v_forcelib) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_forcecreate, __pyx_v_forcecreate) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":2927
 * 
 * #                 print("package", package)
 *                 modulename = compileAsDll(mainfile, flist, exports=exports,             # <<<<<<<<<<<<<<
 *                     compiler=compiler, savedir=savedir,
 *                     includedirs=includedirs, package=package, verbose=verbose,
 */
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_modulename, __pyx_t_7);
      __pyx_t_7 = 0;
    }
    __pyx_L27:;

    /* "metaphor/monal/driver/_driver.py":2931
 *                     includedirs=includedirs, package=package, verbose=verbose,
 *                     forcelib=forcelib, forcecreate=forcecreate)
 *             os.chdir(pathmem)             # <<<<<<<<<<<<<<
 *         else:
 *             raise MonalError('saveModel not implemented yet with format = {0}' .format(savingformat))
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_chdir); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_pathmem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_pathmem};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2931, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_pathmem};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2931, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2931, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_pathmem);
        __Pyx_GIVEREF(__pyx_v_pathmem);
        PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_pathmem);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2931, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2777
 * #            codeWriter = None
 * 
 *         elif savingformat in [C.SF_CPYTHON, C.SF_DLL, C.SF_DLLTRAIN]:             # <<<<<<<<<<<<<<
 * #            outfile = sys.stdout if verbose else None
 *             tempdir = getTempDir(keeptemp, appli=os.path.join('metaphor', 'nn'), doprint = verbose)
 */
    goto __pyx_L8;
  }

  /* "metaphor/monal/driver/_driver.py":2933
 *             os.chdir(pathmem)
 *         else:
 *             raise MonalError('saveModel not implemented yet with format = {0}' .format(savingformat))             # <<<<<<<<<<<<<<
 *         return modulename#, codeWriter
 *     # end saveModel
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_MonalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_saveModel_not_implemented_yet_wi, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_savingformat); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2933, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_savingformat};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_savingformat};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_savingformat);
        __Pyx_GIVEREF(__pyx_v_savingformat);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_savingformat);
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2933, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2933, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 2933, __pyx_L1_error)
  }
  __pyx_L8:;

  /* "metaphor/monal/driver/_driver.py":2934
 *         else:
 *             raise MonalError('saveModel not implemented yet with format = {0}' .format(savingformat))
 *         return modulename#, codeWriter             # <<<<<<<<<<<<<<
 *     # end saveModel
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_modulename);
  __pyx_r = __pyx_v_modulename;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2722
 *         return self.toFullXML()
 * 
 *     def saveModel(self, filename="", savingformat=C.SF_XML, trainable=True,             # <<<<<<<<<<<<<<
 *             savedir=None, tempdir=None, package="", modeltemplate="m%d_",
 *             keeptemp=0, verbose=0, compiler="", forcelib=False,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.saveModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_modulename);
  __Pyx_XDECREF(__pyx_v_originalsavedir);
  __Pyx_XDECREF(__pyx_v_codelist);
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_clist);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_pathmem);
  __Pyx_XDECREF(__pyx_v_nm);
  __Pyx_XDECREF(__pyx_v_flist);
  __Pyx_XDECREF(__pyx_v_includedirs);
  __Pyx_XDECREF(__pyx_v_mainfile);
  __Pyx_XDECREF(__pyx_v_exports);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XDECREF(__pyx_v_savedir);
  __Pyx_XDECREF(__pyx_v_tempdir);
  __Pyx_XDECREF(__pyx_v_codeWriter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2938
 * 
 *     @Property
 *     def trainingData(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         """Donnees d'apprentissage.
 * Proprietes:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_231trainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_230trainingData[] = "Donnees d'apprentissage.\nProprietes:\n    In/Out - count  -> nombre de lignes de donnses. \nChaque element du vecteur permet d'acceder aux proprietes d'une ligne de donnees :\n    Out    - index  -> l'indice de la ligne;\n    Out    - count  -> la longueur de la ligne;\n    In/Out - value  -> la liste des donnees de la ligne.";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_231trainingData = {"trainingData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_231trainingData, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_230trainingData};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_231trainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trainingData (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("trainingData", 1, 2, 2, 1); __PYX_ERR(0, 2938, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trainingData") < 0)) __PYX_ERR(0, 2938, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("trainingData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2938, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.trainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_230trainingData(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_230trainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("trainingData", 0);

  /* "metaphor/monal/driver/_driver.py":2946
 *     Out    - count  -> la longueur de la ligne;
 *     In/Out - value  -> la liste des donnees de la ligne."""
 *         if not (0 <= index < self.dataCount):             # <<<<<<<<<<<<<<
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         return self._dataArray[index, :]
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2946, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2946, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "metaphor/monal/driver/_driver.py":2947
 *     In/Out - value  -> la liste des donnees de la ligne."""
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))             # <<<<<<<<<<<<<<
 *         return self._dataArray[index, :]
 *     @trainingData.setter
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IndexValueError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_st_IndexErrorWithLimits); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_int_0);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_index);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Remainder(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_index, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_index, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_index);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2947, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2946
 *     Out    - count  -> la longueur de la ligne;
 *     In/Out - value  -> la liste des donnees de la ligne."""
 *         if not (0 <= index < self.dataCount):             # <<<<<<<<<<<<<<
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         return self._dataArray[index, :]
 */
  }

  /* "metaphor/monal/driver/_driver.py":2948
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         return self._dataArray[index, :]             # <<<<<<<<<<<<<<
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_index);
  __Pyx_INCREF(__pyx_slice__152);
  __Pyx_GIVEREF(__pyx_slice__152);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_slice__152);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2938
 * 
 *     @Property
 *     def trainingData(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         """Donnees d'apprentissage.
 * Proprietes:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.trainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2950
 *         return self._dataArray[index, :]
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver             # <<<<<<<<<<<<<<
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_233strainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_233strainingData = {"strainingData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_233strainingData, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_233strainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strainingData (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,&__pyx_n_s_values,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("strainingData", 1, 3, 3, 1); __PYX_ERR(0, 2950, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("strainingData", 1, 3, 3, 2); __PYX_ERR(0, 2950, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "strainingData") < 0)) __PYX_ERR(0, 2950, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
    __pyx_v_values = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("strainingData", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2950, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.strainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_232strainingData(__pyx_self, __pyx_v_self, __pyx_v_index, __pyx_v_values);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_232strainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("strainingData", 0);

  /* "metaphor/monal/driver/_driver.py":2951
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver
 *         if not (0 <= index < self.dataCount):             # <<<<<<<<<<<<<<
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         self._dataArray[index, :] = values
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "metaphor/monal/driver/_driver.py":2952
 *     def strainingData(self, index, values):  # Driver
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))             # <<<<<<<<<<<<<<
 *         self._dataArray[index, :] = values
 *     @trainingData.lengetter
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IndexValueError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_st_IndexErrorWithLimits); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_int_0);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_index);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Remainder(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_index, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_index, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_index);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2952, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":2951
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver
 *         if not (0 <= index < self.dataCount):             # <<<<<<<<<<<<<<
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         self._dataArray[index, :] = values
 */
  }

  /* "metaphor/monal/driver/_driver.py":2953
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         self._dataArray[index, :] = values             # <<<<<<<<<<<<<<
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_index);
  __Pyx_INCREF(__pyx_slice__153);
  __Pyx_GIVEREF(__pyx_slice__153);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_slice__153);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_values) < 0)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2950
 *         return self._dataArray[index, :]
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver             # <<<<<<<<<<<<<<
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.strainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2955
 *         self._dataArray[index, :] = values
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.dataCount
 *     @trainingData.lensetter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_235ltrainingData(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_235ltrainingData = {"ltrainingData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_235ltrainingData, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_235ltrainingData(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ltrainingData (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_234ltrainingData(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_234ltrainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ltrainingData", 0);

  /* "metaphor/monal/driver/_driver.py":2956
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver
 *         return self.dataCount             # <<<<<<<<<<<<<<
 *     @trainingData.lensetter
 *     def sltrainingData(self, value):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2955
 *         self._dataArray[index, :] = values
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.dataCount
 *     @trainingData.lensetter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.ltrainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2958
 *         return self.dataCount
 *     @trainingData.lensetter
 *     def sltrainingData(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.dataCount = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_237sltrainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_237sltrainingData = {"sltrainingData", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_237sltrainingData, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_237sltrainingData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sltrainingData (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sltrainingData", 1, 2, 2, 1); __PYX_ERR(0, 2958, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sltrainingData") < 0)) __PYX_ERR(0, 2958, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sltrainingData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2958, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.sltrainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_236sltrainingData(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_236sltrainingData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sltrainingData", 0);

  /* "metaphor/monal/driver/_driver.py":2959
 *     @trainingData.lensetter
 *     def sltrainingData(self, value):  # Driver
 *         self.dataCount = value             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataCount, __pyx_v_value) < 0) __PYX_ERR(0, 2959, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2958
 *         return self.dataCount
 *     @trainingData.lensetter
 *     def sltrainingData(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.dataCount = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.sltrainingData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2962
 * 
 *     @Property
 *     def confidenceLevel(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Niveau de confiance"""
 *         return self._confidencelevel
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_239confidenceLevel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_238confidenceLevel[] = "Niveau de confiance";
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_239confidenceLevel = {"confidenceLevel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_239confidenceLevel, METH_O, __pyx_doc_8metaphor_5monal_6driver_7_driver_6Driver_238confidenceLevel};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_239confidenceLevel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("confidenceLevel (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_238confidenceLevel(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_238confidenceLevel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("confidenceLevel", 0);

  /* "metaphor/monal/driver/_driver.py":2964
 *     def confidenceLevel(self):  # Driver
 *         """Niveau de confiance"""
 *         return self._confidencelevel             # <<<<<<<<<<<<<<
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_confidencelevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/monal/driver/_driver.py":2962
 * 
 *     @Property
 *     def confidenceLevel(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Niveau de confiance"""
 *         return self._confidencelevel
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.confidenceLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":2966
 *         return self._confidencelevel
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             from scipy import special
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_241confidenceLevel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_241confidenceLevel = {"confidenceLevel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_241confidenceLevel, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_241confidenceLevel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("confidenceLevel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("confidenceLevel", 1, 2, 2, 1); __PYX_ERR(0, 2966, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "confidenceLevel") < 0)) __PYX_ERR(0, 2966, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("confidenceLevel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2966, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.confidenceLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_240confidenceLevel(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_240confidenceLevel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_special = NULL;
  PyObject *__pyx_v_freedm = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("confidenceLevel", 0);

  /* "metaphor/monal/driver/_driver.py":2967
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver
 *         try:             # <<<<<<<<<<<<<<
 *             from scipy import special
 *             self._confidencelevel = value or self._confidencelevel or 0.95
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/monal/driver/_driver.py":2968
 *     def confidenceLevel(self, value):  # Driver
 *         try:
 *             from scipy import special             # <<<<<<<<<<<<<<
 *             self._confidencelevel = value or self._confidencelevel or 0.95
 *             freedm = self.baselen - self.dimension
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2968, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_special);
      __Pyx_GIVEREF(__pyx_n_s_special);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_special);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_scipy, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2968, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_special); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2968, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_special = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2969
 *         try:
 *             from scipy import special
 *             self._confidencelevel = value or self._confidencelevel or 0.95             # <<<<<<<<<<<<<<
 *             freedm = self.baselen - self.dimension
 *             self._studentvariable = special.stdtrit(freedm, (self._confidencelevel + 1)/2)
 */
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2969, __pyx_L3_error)
      if (!__pyx_t_6) {
      } else {
        __Pyx_INCREF(__pyx_v_value);
        __pyx_t_5 = __pyx_v_value;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_confidencelevel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2969, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2969, __pyx_L3_error)
      if (!__pyx_t_6) {
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __pyx_t_4;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_4 = PyFloat_FromDouble(0.95); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2969, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
      __pyx_L9_bool_binop_done:;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_confidencelevel, __pyx_t_5) < 0) __PYX_ERR(0, 2969, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/monal/driver/_driver.py":2970
 *             from scipy import special
 *             self._confidencelevel = value or self._confidencelevel or 0.95
 *             freedm = self.baselen - self.dimension             # <<<<<<<<<<<<<<
 *             self._studentvariable = special.stdtrit(freedm, (self._confidencelevel + 1)/2)
 *         except ImportError:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2970, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimension); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2970, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PyNumber_Subtract(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2970, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_freedm = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2971
 *             self._confidencelevel = value or self._confidencelevel or 0.95
 *             freedm = self.baselen - self.dimension
 *             self._studentvariable = special.stdtrit(freedm, (self._confidencelevel + 1)/2)             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             raise NotImplementedError("student variable computation not yet implemented")
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_special, __pyx_n_s_stdtrit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2971, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_confidencelevel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2971, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2971, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_8, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2971, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_freedm, __pyx_t_5};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2971, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_freedm, __pyx_t_5};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2971, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2971, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_freedm);
        __Pyx_GIVEREF(__pyx_v_freedm);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_freedm);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2971, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_studentvariable, __pyx_t_7) < 0) __PYX_ERR(0, 2971, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "metaphor/monal/driver/_driver.py":2967
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver
 *         try:             # <<<<<<<<<<<<<<
 *             from scipy import special
 *             self._confidencelevel = value or self._confidencelevel or 0.95
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "metaphor/monal/driver/_driver.py":2972
 *             freedm = self.baselen - self.dimension
 *             self._studentvariable = special.stdtrit(freedm, (self._confidencelevel + 1)/2)
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("student variable computation not yet implemented")
 * 
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.confidenceLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(0, 2972, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_10);

      /* "metaphor/monal/driver/_driver.py":2973
 *             self._studentvariable = special.stdtrit(freedm, (self._confidencelevel + 1)/2)
 *         except ImportError:
 *             raise NotImplementedError("student variable computation not yet implemented")             # <<<<<<<<<<<<<<
 * 
 * #     def showResult(self, inputindex=0, outputindex=0, legend="", target=True, color="g", points=100):  # Driver
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2973, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 2973, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "metaphor/monal/driver/_driver.py":2967
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver
 *         try:             # <<<<<<<<<<<<<<
 *             from scipy import special
 *             self._confidencelevel = value or self._confidencelevel or 0.95
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "metaphor/monal/driver/_driver.py":2966
 *         return self._confidencelevel
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             from scipy import special
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.confidenceLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_special);
  __Pyx_XDECREF(__pyx_v_freedm);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":3003
 * #         return res
 * 
 *     def addComment(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.addComment(value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_243addComment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_243addComment = {"addComment", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_243addComment, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_6Driver_243addComment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("addComment (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("addComment", 1, 2, 2, 1); __PYX_ERR(0, 3003, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addComment") < 0)) __PYX_ERR(0, 3003, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("addComment", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3003, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.addComment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_242addComment(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6Driver_242addComment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("addComment", 0);

  /* "metaphor/monal/driver/_driver.py":3004
 * 
 *     def addComment(self, value):  # Driver
 *         self.mainModel.addComment(value)             # <<<<<<<<<<<<<<
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mainModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_addComment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3004, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3004, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":3003
 * #         return res
 * 
 *     def addComment(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.addComment(value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.Driver.addComment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/monal/driver/_driver.py":3006
 *         self.mainModel.addComment(value)
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,             # <<<<<<<<<<<<<<
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 */

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_30__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "metaphor/monal/driver/_driver.py":3007
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver             # <<<<<<<<<<<<<<
 *     if isinstance(source, Driver):
 *         return source.saveModel(filename, savingformat, count, savedir,
 */
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_savingformat);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_savingformat);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_savingformat);
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_int_0));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject*)__pyx_n_u_models));
  __Pyx_GIVEREF(((PyObject*)__pyx_n_u_models));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject*)__pyx_n_u_models));
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_int_0));
  __Pyx_INCREF(((PyObject*)__pyx_kp_u__2));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__2));
  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject*)__pyx_kp_u__2));

  /* "metaphor/monal/driver/_driver.py":3006
 *         self.mainModel.addComment(value)
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,             # <<<<<<<<<<<<<<
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_7saveModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_5monal_6driver_7_driver_7saveModel = {"saveModel", (PyCFunction)__pyx_pw_8metaphor_5monal_6driver_7_driver_7saveModel, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_5monal_6driver_7_driver_7saveModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_savingformat = 0;
  PyObject *__pyx_v_count = 0;
  PyObject *__pyx_v_savedir = 0;
  PyObject *__pyx_v_tempdir = 0;
  PyObject *__pyx_v_package = 0;
  PyObject *__pyx_v_keeptemp = 0;
  PyObject *__pyx_v_compiler = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_filename,&__pyx_n_s_savingformat,&__pyx_n_s_count,&__pyx_n_s_savedir,&__pyx_n_s_tempdir,&__pyx_n_s_package,&__pyx_n_s_keeptemp,&__pyx_n_s_compiler,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    __pyx_defaults11 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_savingformat;
    values[3] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject*)__pyx_n_u_models));
    values[7] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[8] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("saveModel", 0, 2, 9, 1); __PYX_ERR(0, 3006, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_savingformat);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_savedir);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tempdir);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_package);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keeptemp);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compiler);
          if (value) { values[8] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveModel") < 0)) __PYX_ERR(0, 3006, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_source = values[0];
    __pyx_v_filename = values[1];
    __pyx_v_savingformat = values[2];
    __pyx_v_count = values[3];
    __pyx_v_savedir = values[4];
    __pyx_v_tempdir = values[5];
    __pyx_v_package = values[6];
    __pyx_v_keeptemp = values[7];
    __pyx_v_compiler = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveModel", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3006, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.monal.driver._driver.saveModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_5monal_6driver_7_driver_6saveModel(__pyx_self, __pyx_v_source, __pyx_v_filename, __pyx_v_savingformat, __pyx_v_count, __pyx_v_savedir, __pyx_v_tempdir, __pyx_v_package, __pyx_v_keeptemp, __pyx_v_compiler);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_5monal_6driver_7_driver_6saveModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_filename, PyObject *__pyx_v_savingformat, PyObject *__pyx_v_count, PyObject *__pyx_v_savedir, PyObject *__pyx_v_tempdir, PyObject *__pyx_v_package, PyObject *__pyx_v_keeptemp, PyObject *__pyx_v_compiler) {
  Py_ssize_t __pyx_v_imax;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_model = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("saveModel", 0);
  __Pyx_INCREF(__pyx_v_keeptemp);

  /* "metaphor/monal/driver/_driver.py":3008
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):             # <<<<<<<<<<<<<<
 *         return source.saveModel(filename, savingformat, count, savedir,
 *                   tempdir, package, keeptemp, compiler=compiler)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Driver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_source, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":3009
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 *         return source.saveModel(filename, savingformat, count, savedir,             # <<<<<<<<<<<<<<
 *                   tempdir, package, keeptemp, compiler=compiler)
 *     imax = len(source) - 1
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_saveModel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "metaphor/monal/driver/_driver.py":3010
 *     if isinstance(source, Driver):
 *         return source.saveModel(filename, savingformat, count, savedir,
 *                   tempdir, package, keeptemp, compiler=compiler)             # <<<<<<<<<<<<<<
 *     imax = len(source) - 1
 *     for i, model in enumerate(source):
 */
    __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
    __Pyx_INCREF(__pyx_v_savingformat);
    __Pyx_GIVEREF(__pyx_v_savingformat);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_savingformat);
    __Pyx_INCREF(__pyx_v_count);
    __Pyx_GIVEREF(__pyx_v_count);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_count);
    __Pyx_INCREF(__pyx_v_savedir);
    __Pyx_GIVEREF(__pyx_v_savedir);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_savedir);
    __Pyx_INCREF(__pyx_v_tempdir);
    __Pyx_GIVEREF(__pyx_v_tempdir);
    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_tempdir);
    __Pyx_INCREF(__pyx_v_package);
    __Pyx_GIVEREF(__pyx_v_package);
    PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_package);
    __Pyx_INCREF(__pyx_v_keeptemp);
    __Pyx_GIVEREF(__pyx_v_keeptemp);
    PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_keeptemp);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_compiler, __pyx_v_compiler) < 0) __PYX_ERR(0, 3010, __pyx_L1_error)

    /* "metaphor/monal/driver/_driver.py":3009
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 *         return source.saveModel(filename, savingformat, count, savedir,             # <<<<<<<<<<<<<<
 *                   tempdir, package, keeptemp, compiler=compiler)
 *     imax = len(source) - 1
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/monal/driver/_driver.py":3008
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):             # <<<<<<<<<<<<<<
 *         return source.saveModel(filename, savingformat, count, savedir,
 *                   tempdir, package, keeptemp, compiler=compiler)
 */
  }

  /* "metaphor/monal/driver/_driver.py":3011
 *         return source.saveModel(filename, savingformat, count, savedir,
 *                   tempdir, package, keeptemp, compiler=compiler)
 *     imax = len(source) - 1             # <<<<<<<<<<<<<<
 *     for i, model in enumerate(source):
 *         if i == 0:
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_source); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3011, __pyx_L1_error)
  __pyx_v_imax = (__pyx_t_7 - 1);

  /* "metaphor/monal/driver/_driver.py":3012
 *                   tempdir, package, keeptemp, compiler=compiler)
 *     imax = len(source) - 1
 *     for i, model in enumerate(source):             # <<<<<<<<<<<<<<
 *         if i == 0:
 *             keeptemp= CC.KT_AFTER
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_6 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_source)) || PyTuple_CheckExact(__pyx_v_source)) {
    __pyx_t_5 = __pyx_v_source; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_source); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3012, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3012, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3012, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3012, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_model, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":3013
 *     imax = len(source) - 1
 *     for i, model in enumerate(source):
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             keeptemp= CC.KT_AFTER
 *         elif (i < imax) or tempdir:
 */
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_i, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3013, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":3014
 *     for i, model in enumerate(source):
 *         if i == 0:
 *             keeptemp= CC.KT_AFTER             # <<<<<<<<<<<<<<
 *         elif (i < imax) or tempdir:
 *             keeptemp = CC.KT_BEFORE + CC.KT_AFTER
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_KT_AFTER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_keeptemp, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/monal/driver/_driver.py":3013
 *     imax = len(source) - 1
 *     for i, model in enumerate(source):
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             keeptemp= CC.KT_AFTER
 *         elif (i < imax) or tempdir:
 */
      goto __pyx_L6;
    }

    /* "metaphor/monal/driver/_driver.py":3015
 *         if i == 0:
 *             keeptemp= CC.KT_AFTER
 *         elif (i < imax) or tempdir:             # <<<<<<<<<<<<<<
 *             keeptemp = CC.KT_BEFORE + CC.KT_AFTER
 *         else:
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_imax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tempdir); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_2;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_3) {

      /* "metaphor/monal/driver/_driver.py":3016
 *             keeptemp= CC.KT_AFTER
 *         elif (i < imax) or tempdir:
 *             keeptemp = CC.KT_BEFORE + CC.KT_AFTER             # <<<<<<<<<<<<<<
 *         else:
 *             model.saveModel(filename, C.SF_CPYTHON, savedir=savedir,
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_KT_BEFORE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_KT_AFTER); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF_SET(__pyx_v_keeptemp, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "metaphor/monal/driver/_driver.py":3015
 *         if i == 0:
 *             keeptemp= CC.KT_AFTER
 *         elif (i < imax) or tempdir:             # <<<<<<<<<<<<<<
 *             keeptemp = CC.KT_BEFORE + CC.KT_AFTER
 *         else:
 */
      goto __pyx_L6;
    }

    /* "metaphor/monal/driver/_driver.py":3018
 *             keeptemp = CC.KT_BEFORE + CC.KT_AFTER
 *         else:
 *             model.saveModel(filename, C.SF_CPYTHON, savedir=savedir,             # <<<<<<<<<<<<<<
 *                 tempdir=tempdir, package=package, keeptemp=keeptemp,
 *                 compiler=compiler) #keeptemp = CC.KT_BEFORE,
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_saveModel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_SF_CPYTHON); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_savedir, __pyx_v_savedir) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":3019
 *         else:
 *             model.saveModel(filename, C.SF_CPYTHON, savedir=savedir,
 *                 tempdir=tempdir, package=package, keeptemp=keeptemp,             # <<<<<<<<<<<<<<
 *                 compiler=compiler) #keeptemp = CC.KT_BEFORE,
 * 
 */
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tempdir, __pyx_v_tempdir) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_package, __pyx_v_package) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_keeptemp, __pyx_v_keeptemp) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":3020
 *             model.saveModel(filename, C.SF_CPYTHON, savedir=savedir,
 *                 tempdir=tempdir, package=package, keeptemp=keeptemp,
 *                 compiler=compiler) #keeptemp = CC.KT_BEFORE,             # <<<<<<<<<<<<<<
 * 
 * if __name__ == "__main__":
 */
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_compiler, __pyx_v_compiler) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)

      /* "metaphor/monal/driver/_driver.py":3018
 *             keeptemp = CC.KT_BEFORE + CC.KT_AFTER
 *         else:
 *             model.saveModel(filename, C.SF_CPYTHON, savedir=savedir,             # <<<<<<<<<<<<<<
 *                 tempdir=tempdir, package=package, keeptemp=keeptemp,
 *                 compiler=compiler) #keeptemp = CC.KT_BEFORE,
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3018, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_L6:;

    /* "metaphor/monal/driver/_driver.py":3012
 *                   tempdir, package, keeptemp, compiler=compiler)
 *     imax = len(source) - 1
 *     for i, model in enumerate(source):             # <<<<<<<<<<<<<<
 *         if i == 0:
 *             keeptemp= CC.KT_AFTER
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":3006
 *         self.mainModel.addComment(value)
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,             # <<<<<<<<<<<<<<
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.monal.driver._driver.saveModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_model);
  __Pyx_XDECREF(__pyx_v_keeptemp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__driver(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__driver},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "_driver",
    __pyx_k_Created_on_13_janv_2011_author, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0},
  {&__pyx_kp_u_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 1, 0, 0},
  {&__pyx_kp_u_0_18_15g, __pyx_k_0_18_15g, sizeof(__pyx_k_0_18_15g), 0, 1, 0, 0},
  {&__pyx_kp_u_0_1_18_15g, __pyx_k_0_1_18_15g, sizeof(__pyx_k_0_1_18_15g), 0, 1, 0, 0},
  {&__pyx_kp_u_0_1_2, __pyx_k_0_1_2, sizeof(__pyx_k_0_1_2), 0, 1, 0, 0},
  {&__pyx_kp_u_0_2, __pyx_k_0_2, sizeof(__pyx_k_0_2), 0, 1, 0, 0},
  {&__pyx_kp_u_0_c, __pyx_k_0_c, sizeof(__pyx_k_0_c), 0, 1, 0, 0},
  {&__pyx_kp_u_0_dll_c, __pyx_k_0_dll_c, sizeof(__pyx_k_0_dll_c), 0, 1, 0, 0},
  {&__pyx_kp_u_0_trainbase_c, __pyx_k_0_trainbase_c, sizeof(__pyx_k_0_trainbase_c), 0, 1, 0, 0},
  {&__pyx_kp_u_0_usebase_c, __pyx_k_0_usebase_c, sizeof(__pyx_k_0_usebase_c), 0, 1, 0, 0},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_u_BFGS, __pyx_k_BFGS, sizeof(__pyx_k_BFGS), 0, 1, 0, 1},
  {&__pyx_n_u_BFGS_NT, __pyx_k_BFGS_NT, sizeof(__pyx_k_BFGS_NT), 0, 1, 0, 1},
  {&__pyx_n_u_BSweights, __pyx_k_BSweights, sizeof(__pyx_k_BSweights), 0, 1, 0, 1},
  {&__pyx_n_s_BSweights_2, __pyx_k_BSweights_2, sizeof(__pyx_k_BSweights_2), 0, 0, 1, 1},
  {&__pyx_n_s_Bopt, __pyx_k_Bopt, sizeof(__pyx_k_Bopt), 0, 0, 1, 1},
  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
  {&__pyx_n_s_CC, __pyx_k_CC, sizeof(__pyx_k_CC), 0, 0, 1, 1},
  {&__pyx_n_u_CG, __pyx_k_CG, sizeof(__pyx_k_CG), 0, 1, 0, 1},
  {&__pyx_n_s_CIm, __pyx_k_CIm, sizeof(__pyx_k_CIm), 0, 0, 1, 1},
  {&__pyx_n_s_CIp, __pyx_k_CIp, sizeof(__pyx_k_CIp), 0, 0, 1, 1},
  {&__pyx_kp_u_Cannot_modify_model_count, __pyx_k_Cannot_modify_model_count, sizeof(__pyx_k_Cannot_modify_model_count), 0, 1, 0, 0},
  {&__pyx_n_s_CodeFichier, __pyx_k_CodeFichier, sizeof(__pyx_k_CodeFichier), 0, 0, 1, 1},
  {&__pyx_n_s_CodeWriterC, __pyx_k_CodeWriterC, sizeof(__pyx_k_CodeWriterC), 0, 0, 1, 1},
  {&__pyx_n_s_Component, __pyx_k_Component, sizeof(__pyx_k_Component), 0, 0, 1, 1},
  {&__pyx_n_s_ConfidenceLevel, __pyx_k_ConfidenceLevel, sizeof(__pyx_k_ConfidenceLevel), 0, 0, 1, 1},
  {&__pyx_kp_u_Current_model_is_linear, __pyx_k_Current_model_is_linear, sizeof(__pyx_k_Current_model_is_linear), 0, 1, 0, 0},
  {&__pyx_n_s_DEBUGDLL, __pyx_k_DEBUGDLL, sizeof(__pyx_k_DEBUGDLL), 0, 0, 1, 1},
  {&__pyx_n_s_DIMENSION, __pyx_k_DIMENSION, sizeof(__pyx_k_DIMENSION), 0, 0, 1, 1},
  {&__pyx_n_s_DataManager, __pyx_k_DataManager, sizeof(__pyx_k_DataManager), 0, 0, 1, 1},
  {&__pyx_n_s_Dfun, __pyx_k_Dfun, sizeof(__pyx_k_Dfun), 0, 0, 1, 1},
  {&__pyx_n_s_Driver, __pyx_k_Driver, sizeof(__pyx_k_Driver), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase, __pyx_k_DriverBase, sizeof(__pyx_k_DriverBase), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase___init, __pyx_k_DriverBase___init, sizeof(__pyx_k_DriverBase___init), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase__setaction, __pyx_k_DriverBase__setaction, sizeof(__pyx_k_DriverBase__setaction), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_action, __pyx_k_DriverBase_action, sizeof(__pyx_k_DriverBase_action), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_callback, __pyx_k_DriverBase_callback, sizeof(__pyx_k_DriverBase_callback), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_computeFromJacobian, __pyx_k_DriverBase_computeFromJacobian, sizeof(__pyx_k_DriverBase_computeFromJacobian), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_computeTrainingResult, __pyx_k_DriverBase_computeTrainingResult, sizeof(__pyx_k_DriverBase_computeTrainingResult), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_computeTrainingResult_2, __pyx_k_DriverBase_computeTrainingResult_2, sizeof(__pyx_k_DriverBase_computeTrainingResult_2), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_computeTrainingResult_3, __pyx_k_DriverBase_computeTrainingResult_3, sizeof(__pyx_k_DriverBase_computeTrainingResult_3), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_computeUsageLeverages, __pyx_k_DriverBase_computeUsageLeverages, sizeof(__pyx_k_DriverBase_computeUsageLeverages), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_dispersionMatrix, __pyx_k_DriverBase_dispersionMatrix, sizeof(__pyx_k_DriverBase_dispersionMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_extraCount, __pyx_k_DriverBase_extraCount, sizeof(__pyx_k_DriverBase_extraCount), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_getNewWeights, __pyx_k_DriverBase_getNewWeights, sizeof(__pyx_k_DriverBase_getNewWeights), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_getTransferResults, __pyx_k_DriverBase_getTransferResults, sizeof(__pyx_k_DriverBase_getTransferResults), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_hasResampling, __pyx_k_DriverBase_hasResampling, sizeof(__pyx_k_DriverBase_hasResampling), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadASCIIDispersion, __pyx_k_DriverBase_loadASCIIDispersion, sizeof(__pyx_k_DriverBase_loadASCIIDispersion), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadFromASCIIStrList, __pyx_k_DriverBase_loadFromASCIIStrList, sizeof(__pyx_k_DriverBase_loadFromASCIIStrList), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadFromDict, __pyx_k_DriverBase_loadFromDict, sizeof(__pyx_k_DriverBase_loadFromDict), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadNormFromASCIIStrL, __pyx_k_DriverBase_loadNormFromASCIIStrL, sizeof(__pyx_k_DriverBase_loadNormFromASCIIStrL), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadWeightsASCII, __pyx_k_DriverBase_loadWeightsASCII, sizeof(__pyx_k_DriverBase_loadWeightsASCII), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadWeightsBinary, __pyx_k_DriverBase_loadWeightsBinary, sizeof(__pyx_k_DriverBase_loadWeightsBinary), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_loadWeightsXML, __pyx_k_DriverBase_loadWeightsXML, sizeof(__pyx_k_DriverBase_loadWeightsXML), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_modelType, __pyx_k_DriverBase_modelType, sizeof(__pyx_k_DriverBase_modelType), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_reprlst, __pyx_k_DriverBase_reprlst, sizeof(__pyx_k_DriverBase_reprlst), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_saveParameters, __pyx_k_DriverBase_saveParameters, sizeof(__pyx_k_DriverBase_saveParameters), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_setCallback, __pyx_k_DriverBase_setCallback, sizeof(__pyx_k_DriverBase_setCallback), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_signature, __pyx_k_DriverBase_signature, sizeof(__pyx_k_DriverBase_signature), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_trainingStddev, __pyx_k_DriverBase_trainingStddev, sizeof(__pyx_k_DriverBase_trainingStddev), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_weights, __pyx_k_DriverBase_weights, sizeof(__pyx_k_DriverBase_weights), 0, 0, 1, 1},
  {&__pyx_n_s_DriverBase_wused, __pyx_k_DriverBase_wused, sizeof(__pyx_k_DriverBase_wused), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_Jacobian2, __pyx_k_Driver_Jacobian2, sizeof(__pyx_k_Driver_Jacobian2), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_Jacobian2long, __pyx_k_Driver_Jacobian2long, sizeof(__pyx_k_Driver_Jacobian2long), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_NMLstring, __pyx_k_Driver_NMLstring, sizeof(__pyx_k_Driver_NMLstring), 0, 0, 1, 1},
  {&__pyx_n_s_Driver__UnNormalizeModel, __pyx_k_Driver__UnNormalizeModel, sizeof(__pyx_k_Driver__UnNormalizeModel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver___del, __pyx_k_Driver___del, sizeof(__pyx_k_Driver___del), 0, 0, 1, 1},
  {&__pyx_n_s_Driver___init, __pyx_k_Driver___init, sizeof(__pyx_k_Driver___init), 0, 0, 1, 1},
  {&__pyx_n_s_Driver__createModel, __pyx_k_Driver__createModel, sizeof(__pyx_k_Driver__createModel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver__expandvec, __pyx_k_Driver__expandvec, sizeof(__pyx_k_Driver__expandvec), 0, 0, 1, 1},
  {&__pyx_n_s_Driver__getComputeCondition, __pyx_k_Driver__getComputeCondition, sizeof(__pyx_k_Driver__getComputeCondition), 0, 0, 1, 1},
  {&__pyx_n_s_Driver__reducevec, __pyx_k_Driver__reducevec, sizeof(__pyx_k_Driver__reducevec), 0, 0, 1, 1},
  {&__pyx_n_s_Driver__xmlText, __pyx_k_Driver__xmlText, sizeof(__pyx_k_Driver__xmlText), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_addComment, __pyx_k_Driver_addComment, sizeof(__pyx_k_Driver_addComment), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_backupParams, __pyx_k_Driver_backupParams, sizeof(__pyx_k_Driver_backupParams), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_backupParamsNT, __pyx_k_Driver_backupParamsNT, sizeof(__pyx_k_Driver_backupParamsNT), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_checkModel, __pyx_k_Driver_checkModel, sizeof(__pyx_k_Driver_checkModel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_chrono, __pyx_k_Driver_chrono, sizeof(__pyx_k_Driver_chrono), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_computeTrainData, __pyx_k_Driver_computeTrainData, sizeof(__pyx_k_Driver_computeTrainData), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_computeTrainDataDirect, __pyx_k_Driver_computeTrainDataDirect, sizeof(__pyx_k_Driver_computeTrainDataDirect), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_computeTrainDataProgressi, __pyx_k_Driver_computeTrainDataProgressi, sizeof(__pyx_k_Driver_computeTrainDataProgressi), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_computeTrainingResults, __pyx_k_Driver_computeTrainingResults, sizeof(__pyx_k_Driver_computeTrainingResults), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_confidenceLevel, __pyx_k_Driver_confidenceLevel, sizeof(__pyx_k_Driver_confidenceLevel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_cost, __pyx_k_Driver_cost, sizeof(__pyx_k_Driver_cost), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_cost2, __pyx_k_Driver_cost2, sizeof(__pyx_k_Driver_cost2), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_costAndPrime, __pyx_k_Driver_costAndPrime, sizeof(__pyx_k_Driver_costAndPrime), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_costNT, __pyx_k_Driver_costNT, sizeof(__pyx_k_Driver_costNT), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_costgradientNT, __pyx_k_Driver_costgradientNT, sizeof(__pyx_k_Driver_costgradientNT), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_dataCount, __pyx_k_Driver_dataCount, sizeof(__pyx_k_Driver_dataCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_dataWidth, __pyx_k_Driver_dataWidth, sizeof(__pyx_k_Driver_dataWidth), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_dimension, __pyx_k_Driver_dimension, sizeof(__pyx_k_Driver_dimension), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_directInputGradient, __pyx_k_Driver_directInputGradient, sizeof(__pyx_k_Driver_directInputGradient), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_extendedInputCount, __pyx_k_Driver_extendedInputCount, sizeof(__pyx_k_Driver_extendedInputCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getCost, __pyx_k_Driver_getCost, sizeof(__pyx_k_Driver_getCost), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getNeuronOfId, __pyx_k_Driver_getNeuronOfId, sizeof(__pyx_k_Driver_getNeuronOfId), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getNomalizingMatrixFromDa, __pyx_k_Driver_getNomalizingMatrixFromDa, sizeof(__pyx_k_Driver_getNomalizingMatrixFromDa), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getPRESS, __pyx_k_Driver_getPRESS, sizeof(__pyx_k_Driver_getPRESS), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getPrime, __pyx_k_Driver_getPrime, sizeof(__pyx_k_Driver_getPrime), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getResiduals, __pyx_k_Driver_getResiduals, sizeof(__pyx_k_Driver_getResiduals), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getResults, __pyx_k_Driver_getResults, sizeof(__pyx_k_Driver_getResults), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getindexinfo, __pyx_k_Driver_getindexinfo, sizeof(__pyx_k_Driver_getindexinfo), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getinfo, __pyx_k_Driver_getinfo, sizeof(__pyx_k_Driver_getinfo), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getlastresiduals, __pyx_k_Driver_getlastresiduals, sizeof(__pyx_k_Driver_getlastresiduals), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_getrealvalue, __pyx_k_Driver_getrealvalue, sizeof(__pyx_k_Driver_getrealvalue), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_gettargets, __pyx_k_Driver_gettargets, sizeof(__pyx_k_Driver_gettargets), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_gradient, __pyx_k_Driver_gradient, sizeof(__pyx_k_Driver_gradient), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_gradientCompute, __pyx_k_Driver_gradientCompute, sizeof(__pyx_k_Driver_gradientCompute), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_hasInputMiniMaxi, __pyx_k_Driver_hasInputMiniMaxi, sizeof(__pyx_k_Driver_hasInputMiniMaxi), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_hasOutputMiniMaxi, __pyx_k_Driver_hasOutputMiniMaxi, sizeof(__pyx_k_Driver_hasOutputMiniMaxi), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_hessian, __pyx_k_Driver_hessian, sizeof(__pyx_k_Driver_hessian), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_indexInitialState, __pyx_k_Driver_indexInitialState, sizeof(__pyx_k_Driver_indexInitialState), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_initWeights, __pyx_k_Driver_initWeights, sizeof(__pyx_k_Driver_initWeights), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputCount, __pyx_k_Driver_inputCount, sizeof(__pyx_k_Driver_inputCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainCost, __pyx_k_Driver_inputTrainCost, sizeof(__pyx_k_Driver_inputTrainCost), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainFunc, __pyx_k_Driver_inputTrainFunc, sizeof(__pyx_k_Driver_inputTrainFunc), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainFunc_locals_lam, __pyx_k_Driver_inputTrainFunc_locals_lam, sizeof(__pyx_k_Driver_inputTrainFunc_locals_lam), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainGrad, __pyx_k_Driver_inputTrainGrad, sizeof(__pyx_k_Driver_inputTrainGrad), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainPrime, __pyx_k_Driver_inputTrainPrime, sizeof(__pyx_k_Driver_inputTrainPrime), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainPrimeFull, __pyx_k_Driver_inputTrainPrimeFull, sizeof(__pyx_k_Driver_inputTrainPrimeFull), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputTrainPrimeFull_local, __pyx_k_Driver_inputTrainPrimeFull_local, sizeof(__pyx_k_Driver_inputTrainPrimeFull_local), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputnorm, __pyx_k_Driver_inputnorm, sizeof(__pyx_k_Driver_inputnorm), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputs, __pyx_k_Driver_inputs, sizeof(__pyx_k_Driver_inputs), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_inputsMinMaxList, __pyx_k_Driver_inputsMinMaxList, sizeof(__pyx_k_Driver_inputsMinMaxList), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_isParallel, __pyx_k_Driver_isParallel, sizeof(__pyx_k_Driver_isParallel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_loadParameters, __pyx_k_Driver_loadParameters, sizeof(__pyx_k_Driver_loadParameters), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_loadTrainingData, __pyx_k_Driver_loadTrainingData, sizeof(__pyx_k_Driver_loadTrainingData), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_longParamCount, __pyx_k_Driver_longParamCount, sizeof(__pyx_k_Driver_longParamCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_lparameterNames, __pyx_k_Driver_lparameterNames, sizeof(__pyx_k_Driver_lparameterNames), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_ltrainingData, __pyx_k_Driver_ltrainingData, sizeof(__pyx_k_Driver_ltrainingData), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_multitrain, __pyx_k_Driver_multitrain, sizeof(__pyx_k_Driver_multitrain), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_multitrain_locals_lambda, __pyx_k_Driver_multitrain_locals_lambda, sizeof(__pyx_k_Driver_multitrain_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_normalizeInputs, __pyx_k_Driver_normalizeInputs, sizeof(__pyx_k_Driver_normalizeInputs), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_normalizeModel, __pyx_k_Driver_normalizeModel, sizeof(__pyx_k_Driver_normalizeModel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_outputCount, __pyx_k_Driver_outputCount, sizeof(__pyx_k_Driver_outputCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_outputnorm, __pyx_k_Driver_outputnorm, sizeof(__pyx_k_Driver_outputnorm), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_outputs, __pyx_k_Driver_outputs, sizeof(__pyx_k_Driver_outputs), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_outputsMinMaxList, __pyx_k_Driver_outputsMinMaxList, sizeof(__pyx_k_Driver_outputsMinMaxList), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_paramCount, __pyx_k_Driver_paramCount, sizeof(__pyx_k_Driver_paramCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_parameterNames, __pyx_k_Driver_parameterNames, sizeof(__pyx_k_Driver_parameterNames), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_prime, __pyx_k_Driver_prime, sizeof(__pyx_k_Driver_prime), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_prime2, __pyx_k_Driver_prime2, sizeof(__pyx_k_Driver_prime2), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_propertyName, __pyx_k_Driver_propertyName, sizeof(__pyx_k_Driver_propertyName), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_residuals, __pyx_k_Driver_residuals, sizeof(__pyx_k_Driver_residuals), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_residuals2, __pyx_k_Driver_residuals2, sizeof(__pyx_k_Driver_residuals2), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_residualsPrime, __pyx_k_Driver_residualsPrime, sizeof(__pyx_k_Driver_residualsPrime), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_restoreParams, __pyx_k_Driver_restoreParams, sizeof(__pyx_k_Driver_restoreParams), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_restoreParamsNT, __pyx_k_Driver_restoreParamsNT, sizeof(__pyx_k_Driver_restoreParamsNT), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_reverse_train, __pyx_k_Driver_reverse_train, sizeof(__pyx_k_Driver_reverse_train), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_saveModel, __pyx_k_Driver_saveModel, sizeof(__pyx_k_Driver_saveModel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_saveParameters, __pyx_k_Driver_saveParameters, sizeof(__pyx_k_Driver_saveParameters), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_sdataCount, __pyx_k_Driver_sdataCount, sizeof(__pyx_k_Driver_sdataCount), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setLeverageComputation, __pyx_k_Driver_setLeverageComputation, sizeof(__pyx_k_Driver_setLeverageComputation), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setLeverageComputationOld, __pyx_k_Driver_setLeverageComputationOld, sizeof(__pyx_k_Driver_setLeverageComputationOld), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setPseudoMatrix, __pyx_k_Driver_setPseudoMatrix, sizeof(__pyx_k_Driver_setPseudoMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setWeights, __pyx_k_Driver_setWeights, sizeof(__pyx_k_Driver_setWeights), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setindexvalue, __pyx_k_Driver_setindexvalue, sizeof(__pyx_k_Driver_setindexvalue), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setivalue, __pyx_k_Driver_setivalue, sizeof(__pyx_k_Driver_setivalue), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_setrealvalue, __pyx_k_Driver_setrealvalue, sizeof(__pyx_k_Driver_setrealvalue), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_sltrainingData, __pyx_k_Driver_sltrainingData, sizeof(__pyx_k_Driver_sltrainingData), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_splitModel, __pyx_k_Driver_splitModel, sizeof(__pyx_k_Driver_splitModel), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_strainingData, __pyx_k_Driver_strainingData, sizeof(__pyx_k_Driver_strainingData), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_suseOriginal, __pyx_k_Driver_suseOriginal, sizeof(__pyx_k_Driver_suseOriginal), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_toFullXML, __pyx_k_Driver_toFullXML, sizeof(__pyx_k_Driver_toFullXML), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_train, __pyx_k_Driver_train, sizeof(__pyx_k_Driver_train), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_trainable, __pyx_k_Driver_trainable, sizeof(__pyx_k_Driver_trainable), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_trainingData, __pyx_k_Driver_trainingData, sizeof(__pyx_k_Driver_trainingData), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transfer, __pyx_k_Driver_transfer, sizeof(__pyx_k_Driver_transfer), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferAndDirectGradient, __pyx_k_Driver_transferAndDirectGradient, sizeof(__pyx_k_Driver_transferAndDirectGradient), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferCI, __pyx_k_Driver_transferCI, sizeof(__pyx_k_Driver_transferCI), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferCIOld, __pyx_k_Driver_transferCIOld, sizeof(__pyx_k_Driver_transferCIOld), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferEx, __pyx_k_Driver_transferEx, sizeof(__pyx_k_Driver_transferEx), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferExtra, __pyx_k_Driver_transferExtra, sizeof(__pyx_k_Driver_transferExtra), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferExtraCI, __pyx_k_Driver_transferExtraCI, sizeof(__pyx_k_Driver_transferExtraCI), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_transferLeverages, __pyx_k_Driver_transferLeverages, sizeof(__pyx_k_Driver_transferLeverages), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_unnormalizeOutputs, __pyx_k_Driver_unnormalizeOutputs, sizeof(__pyx_k_Driver_unnormalizeOutputs), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_useLongParams, __pyx_k_Driver_useLongParams, sizeof(__pyx_k_Driver_useLongParams), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_useOriginal, __pyx_k_Driver_useOriginal, sizeof(__pyx_k_Driver_useOriginal), 0, 0, 1, 1},
  {&__pyx_n_s_Driver_writeCostFunction, __pyx_k_Driver_writeCostFunction, sizeof(__pyx_k_Driver_writeCostFunction), 0, 0, 1, 1},
  {&__pyx_kp_u_Either_file_source_or_dataset_bu, __pyx_k_Either_file_source_or_dataset_bu, sizeof(__pyx_k_Either_file_source_or_dataset_bu), 0, 1, 0, 0},
  {&__pyx_kp_u_Either_file_source_or_dataset_ne, __pyx_k_Either_file_source_or_dataset_ne, sizeof(__pyx_k_Either_file_source_or_dataset_ne), 0, 1, 0, 0},
  {&__pyx_n_s_ID_COMPUTE, __pyx_k_ID_COMPUTE, sizeof(__pyx_k_ID_COMPUTE), 0, 0, 1, 1},
  {&__pyx_n_s_ID_DIFF, __pyx_k_ID_DIFF, sizeof(__pyx_k_ID_DIFF), 0, 0, 1, 1},
  {&__pyx_n_s_II_P_LAYER_LENGTH, __pyx_k_II_P_LAYER_LENGTH, sizeof(__pyx_k_II_P_LAYER_LENGTH), 0, 0, 1, 1},
  {&__pyx_n_s_II_P_SYN_CHILDREN, __pyx_k_II_P_SYN_CHILDREN, sizeof(__pyx_k_II_P_SYN_CHILDREN), 0, 0, 1, 1},
  {&__pyx_n_s_II_P_SYN_PARENTS, __pyx_k_II_P_SYN_PARENTS, sizeof(__pyx_k_II_P_SYN_PARENTS), 0, 0, 1, 1},
  {&__pyx_n_s_INPUT_COUNT, __pyx_k_INPUT_COUNT, sizeof(__pyx_k_INPUT_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_n_u_InNorm, __pyx_k_InNorm, sizeof(__pyx_k_InNorm), 0, 1, 0, 1},
  {&__pyx_kp_u_Incorrect_dataformat, __pyx_k_Incorrect_dataformat, sizeof(__pyx_k_Incorrect_dataformat), 0, 1, 0, 0},
  {&__pyx_n_s_IndexValueError, __pyx_k_IndexValueError, sizeof(__pyx_k_IndexValueError), 0, 0, 1, 1},
  {&__pyx_kp_u_Information_Model_creation, __pyx_k_Information_Model_creation, sizeof(__pyx_k_Information_Model_creation), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_accuracy_reached, __pyx_k_Information_accuracy_reached, sizeof(__pyx_k_Information_accuracy_reached), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_activation, __pyx_k_Information_activation, sizeof(__pyx_k_Information_activation), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_data_loaded_from, __pyx_k_Information_data_loaded_from, sizeof(__pyx_k_Information_data_loaded_from), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_data_normalized, __pyx_k_Information_data_normalized, sizeof(__pyx_k_Information_data_normalized), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_dimension, __pyx_k_Information_dimension, sizeof(__pyx_k_Information_dimension), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_hidden, __pyx_k_Information_hidden, sizeof(__pyx_k_Information_hidden), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_inputs, __pyx_k_Information_inputs, sizeof(__pyx_k_Information_inputs), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_no_acceptable_point, __pyx_k_Information_no_acceptable_point, sizeof(__pyx_k_Information_no_acceptable_point), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_outputs, __pyx_k_Information_outputs, sizeof(__pyx_k_Information_outputs), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_stop_for_maxiter, __pyx_k_Information_stop_for_maxiter, sizeof(__pyx_k_Information_stop_for_maxiter), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_training_0_max_iter, __pyx_k_Information_training_0_max_iter, sizeof(__pyx_k_Information_training_0_max_iter), 0, 1, 0, 0},
  {&__pyx_kp_u_Information_weights_loaded_from, __pyx_k_Information_weights_loaded_from, sizeof(__pyx_k_Information_weights_loaded_from), 0, 1, 0, 0},
  {&__pyx_n_s_InverseMtMdvd, __pyx_k_InverseMtMdvd, sizeof(__pyx_k_InverseMtMdvd), 0, 0, 1, 1},
  {&__pyx_n_s_InverseStudent, __pyx_k_InverseStudent, sizeof(__pyx_k_InverseStudent), 0, 0, 1, 1},
  {&__pyx_n_s_Jacobian2, __pyx_k_Jacobian2, sizeof(__pyx_k_Jacobian2), 0, 0, 1, 1},
  {&__pyx_n_s_Jacobian2long, __pyx_k_Jacobian2long, sizeof(__pyx_k_Jacobian2long), 0, 0, 1, 1},
  {&__pyx_n_s_KT_AFTER, __pyx_k_KT_AFTER, sizeof(__pyx_k_KT_AFTER), 0, 0, 1, 1},
  {&__pyx_n_s_KT_BEFORE, __pyx_k_KT_BEFORE, sizeof(__pyx_k_KT_BEFORE), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_LAYER_COUNT, __pyx_k_LAYER_COUNT, sizeof(__pyx_k_LAYER_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_LEV_EARLY, __pyx_k_LEV_EARLY, sizeof(__pyx_k_LEV_EARLY), 0, 0, 1, 1},
  {&__pyx_n_s_LEV_METHOD, __pyx_k_LEV_METHOD, sizeof(__pyx_k_LEV_METHOD), 0, 0, 1, 1},
  {&__pyx_n_u_LM, __pyx_k_LM, sizeof(__pyx_k_LM), 0, 1, 0, 1},
  {&__pyx_n_u_LM_NT, __pyx_k_LM_NT, sizeof(__pyx_k_LM_NT), 0, 1, 0, 1},
  {&__pyx_n_u_LOOweights, __pyx_k_LOOweights, sizeof(__pyx_k_LOOweights), 0, 1, 0, 1},
  {&__pyx_n_s_LOOweightsMulti, __pyx_k_LOOweightsMulti, sizeof(__pyx_k_LOOweightsMulti), 0, 0, 1, 1},
  {&__pyx_n_s_LOOweights_2, __pyx_k_LOOweights_2, sizeof(__pyx_k_LOOweights_2), 0, 0, 1, 1},
  {&__pyx_n_s_LS_FIXE, __pyx_k_LS_FIXE, sizeof(__pyx_k_LS_FIXE), 0, 0, 1, 1},
  {&__pyx_n_s_MA_CONFIDENCE_COMPUTATION, __pyx_k_MA_CONFIDENCE_COMPUTATION, sizeof(__pyx_k_MA_CONFIDENCE_COMPUTATION), 0, 0, 1, 1},
  {&__pyx_n_u_MODEL, __pyx_k_MODEL, sizeof(__pyx_k_MODEL), 0, 1, 0, 1},
  {&__pyx_n_s_Model, __pyx_k_Model, sizeof(__pyx_k_Model), 0, 0, 1, 1},
  {&__pyx_kp_u_Model_must_have_at_least_1_input, __pyx_k_Model_must_have_at_least_1_input, sizeof(__pyx_k_Model_must_have_at_least_1_input), 0, 1, 0, 0},
  {&__pyx_n_s_MonalError, __pyx_k_MonalError, sizeof(__pyx_k_MonalError), 0, 0, 1, 1},
  {&__pyx_n_s_Multimodel, __pyx_k_Multimodel, sizeof(__pyx_k_Multimodel), 0, 0, 1, 1},
  {&__pyx_kp_u_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 1, 0, 0},
  {&__pyx_n_s_NMLstring, __pyx_k_NMLstring, sizeof(__pyx_k_NMLstring), 0, 0, 1, 1},
  {&__pyx_n_s_N_2, __pyx_k_N_2, sizeof(__pyx_k_N_2), 0, 0, 1, 1},
  {&__pyx_n_s_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 1, 1},
  {&__pyx_n_s_Network, __pyx_k_Network, sizeof(__pyx_k_Network), 0, 0, 1, 1},
  {&__pyx_n_s_Nf, __pyx_k_Nf, sizeof(__pyx_k_Nf), 0, 0, 1, 1},
  {&__pyx_n_s_Ng, __pyx_k_Ng, sizeof(__pyx_k_Ng), 0, 0, 1, 1},
  {&__pyx_n_s_Normalizer, __pyx_k_Normalizer, sizeof(__pyx_k_Normalizer), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_kp_u_Not_Implemented_without_Scipy, __pyx_k_Not_Implemented_without_Scipy, sizeof(__pyx_k_Not_Implemented_without_Scipy), 0, 1, 0, 0},
  {&__pyx_n_s_NpzFile, __pyx_k_NpzFile, sizeof(__pyx_k_NpzFile), 0, 0, 1, 1},
  {&__pyx_n_s_OKScipy, __pyx_k_OKScipy, sizeof(__pyx_k_OKScipy), 0, 0, 1, 1},
  {&__pyx_n_s_ORDER, __pyx_k_ORDER, sizeof(__pyx_k_ORDER), 0, 0, 1, 1},
  {&__pyx_n_s_OUTPUT_COUNT, __pyx_k_OUTPUT_COUNT, sizeof(__pyx_k_OUTPUT_COUNT), 0, 0, 1, 1},
  {&__pyx_n_u_OutNorm, __pyx_k_OutNorm, sizeof(__pyx_k_OutNorm), 0, 1, 0, 1},
  {&__pyx_n_s_OutputProc, __pyx_k_OutputProc, sizeof(__pyx_k_OutputProc), 0, 0, 1, 1},
  {&__pyx_n_s_PY2, __pyx_k_PY2, sizeof(__pyx_k_PY2), 0, 0, 1, 1},
  {&__pyx_n_u_Pi, __pyx_k_Pi, sizeof(__pyx_k_Pi), 0, 1, 0, 1},
  {&__pyx_kp_s_Pilote_d_apprentissage_de_modle, __pyx_k_Pilote_d_apprentissage_de_modle, sizeof(__pyx_k_Pilote_d_apprentissage_de_modle), 0, 0, 1, 0},
  {&__pyx_n_s_Polynom, __pyx_k_Polynom, sizeof(__pyx_k_Polynom), 0, 0, 1, 1},
  {&__pyx_n_s_Properties, __pyx_k_Properties, sizeof(__pyx_k_Properties), 0, 0, 1, 1},
  {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
  {&__pyx_n_s_PseudoMatrix, __pyx_k_PseudoMatrix, sizeof(__pyx_k_PseudoMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_PyCodeList, __pyx_k_PyCodeList, sizeof(__pyx_k_PyCodeList), 0, 0, 1, 1},
  {&__pyx_n_s_PyCodeList2, __pyx_k_PyCodeList2, sizeof(__pyx_k_PyCodeList2), 0, 0, 1, 1},
  {&__pyx_n_s_PyCodeListShort, __pyx_k_PyCodeListShort, sizeof(__pyx_k_PyCodeListShort), 0, 0, 1, 1},
  {&__pyx_n_s_PyCodeSingleTrain, __pyx_k_PyCodeSingleTrain, sizeof(__pyx_k_PyCodeSingleTrain), 0, 0, 1, 1},
  {&__pyx_n_u_RealByteVector, __pyx_k_RealByteVector, sizeof(__pyx_k_RealByteVector), 0, 1, 0, 1},
  {&__pyx_n_u_RealVector, __pyx_k_RealVector, sizeof(__pyx_k_RealVector), 0, 1, 0, 1},
  {&__pyx_n_s_RuntimeWarning, __pyx_k_RuntimeWarning, sizeof(__pyx_k_RuntimeWarning), 0, 0, 1, 1},
  {&__pyx_n_s_SF_ASCII, __pyx_k_SF_ASCII, sizeof(__pyx_k_SF_ASCII), 0, 0, 1, 1},
  {&__pyx_n_s_SF_BINARY, __pyx_k_SF_BINARY, sizeof(__pyx_k_SF_BINARY), 0, 0, 1, 1},
  {&__pyx_n_s_SF_CCODE, __pyx_k_SF_CCODE, sizeof(__pyx_k_SF_CCODE), 0, 0, 1, 1},
  {&__pyx_n_s_SF_CCODEMULTI, __pyx_k_SF_CCODEMULTI, sizeof(__pyx_k_SF_CCODEMULTI), 0, 0, 1, 1},
  {&__pyx_n_s_SF_CPYTHON, __pyx_k_SF_CPYTHON, sizeof(__pyx_k_SF_CPYTHON), 0, 0, 1, 1},
  {&__pyx_n_s_SF_DLL, __pyx_k_SF_DLL, sizeof(__pyx_k_SF_DLL), 0, 0, 1, 1},
  {&__pyx_n_s_SF_DLLTRAIN, __pyx_k_SF_DLLTRAIN, sizeof(__pyx_k_SF_DLLTRAIN), 0, 0, 1, 1},
  {&__pyx_n_s_SF_JSON, __pyx_k_SF_JSON, sizeof(__pyx_k_SF_JSON), 0, 0, 1, 1},
  {&__pyx_n_s_SF_XML, __pyx_k_SF_XML, sizeof(__pyx_k_SF_XML), 0, 0, 1, 1},
  {&__pyx_n_u_SPX, __pyx_k_SPX, sizeof(__pyx_k_SPX), 0, 1, 0, 1},
  {&__pyx_n_s_SYNAPSE_COUNT, __pyx_k_SYNAPSE_COUNT, sizeof(__pyx_k_SYNAPSE_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_SaveDir, __pyx_k_SaveDir, sizeof(__pyx_k_SaveDir), 0, 0, 1, 1},
  {&__pyx_n_u_Sigma, __pyx_k_Sigma, sizeof(__pyx_k_Sigma), 0, 1, 0, 1},
  {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
  {&__pyx_n_u_TANH, __pyx_k_TANH, sizeof(__pyx_k_TANH), 0, 1, 0, 1},
  {&__pyx_n_s_TCR_CONDITIONNING, __pyx_k_TCR_CONDITIONNING, sizeof(__pyx_k_TCR_CONDITIONNING), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_CORREL, __pyx_k_TCR_CORREL, sizeof(__pyx_k_TCR_CORREL), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_CORREL_MAX, __pyx_k_TCR_CORREL_MAX, sizeof(__pyx_k_TCR_CORREL_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_CORREL_MAX_ADDR, __pyx_k_TCR_CORREL_MAX_ADDR, sizeof(__pyx_k_TCR_CORREL_MAX_ADDR), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_CORREL_MEAN, __pyx_k_TCR_CORREL_MEAN, sizeof(__pyx_k_TCR_CORREL_MEAN), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_COST, __pyx_k_TCR_COST, sizeof(__pyx_k_TCR_COST), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_COUNT, __pyx_k_TCR_COUNT, sizeof(__pyx_k_TCR_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_DELTA_RANK, __pyx_k_TCR_DELTA_RANK, sizeof(__pyx_k_TCR_DELTA_RANK), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_DETERMINANT, __pyx_k_TCR_DETERMINANT, sizeof(__pyx_k_TCR_DETERMINANT), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_DONT_CARE, __pyx_k_TCR_DONT_CARE, sizeof(__pyx_k_TCR_DONT_CARE), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_EIGEN_MAX, __pyx_k_TCR_EIGEN_MAX, sizeof(__pyx_k_TCR_EIGEN_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_EIGEN_MIN, __pyx_k_TCR_EIGEN_MIN, sizeof(__pyx_k_TCR_EIGEN_MIN), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_EPOCHS, __pyx_k_TCR_EPOCHS, sizeof(__pyx_k_TCR_EPOCHS), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_HIDDEN, __pyx_k_TCR_HIDDEN, sizeof(__pyx_k_TCR_HIDDEN), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_MINIMIZE, __pyx_k_TCR_MINIMIZE, sizeof(__pyx_k_TCR_MINIMIZE), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_MU, __pyx_k_TCR_MU, sizeof(__pyx_k_TCR_MU), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_PRESS, __pyx_k_TCR_PRESS, sizeof(__pyx_k_TCR_PRESS), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_R2, __pyx_k_TCR_R2, sizeof(__pyx_k_TCR_R2), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_R2_ADJUST, __pyx_k_TCR_R2_ADJUST, sizeof(__pyx_k_TCR_R2_ADJUST), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_SHII, __pyx_k_TCR_SHII, sizeof(__pyx_k_TCR_SHII), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_STD_DEV_BIAS_LESS, __pyx_k_TCR_STD_DEV_BIAS_LESS, sizeof(__pyx_k_TCR_STD_DEV_BIAS_LESS), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_TRACE, __pyx_k_TCR_TRACE, sizeof(__pyx_k_TCR_TRACE), 0, 0, 1, 1},
  {&__pyx_n_s_TCR_ZEROINCLUDED, __pyx_k_TCR_ZEROINCLUDED, sizeof(__pyx_k_TCR_ZEROINCLUDED), 0, 0, 1, 1},
  {&__pyx_n_s_TFR_GRADIENT, __pyx_k_TFR_GRADIENT, sizeof(__pyx_k_TFR_GRADIENT), 0, 0, 1, 1},
  {&__pyx_n_s_TFR_GRADIENTINPUTS, __pyx_k_TFR_GRADIENTINPUTS, sizeof(__pyx_k_TFR_GRADIENTINPUTS), 0, 0, 1, 1},
  {&__pyx_n_s_TFR_LEVERAGE, __pyx_k_TFR_LEVERAGE, sizeof(__pyx_k_TFR_LEVERAGE), 0, 0, 1, 1},
  {&__pyx_n_s_TFR_STD, __pyx_k_TFR_STD, sizeof(__pyx_k_TFR_STD), 0, 0, 1, 1},
  {&__pyx_n_s_TSR_IN_NORM, __pyx_k_TSR_IN_NORM, sizeof(__pyx_k_TSR_IN_NORM), 0, 0, 1, 1},
  {&__pyx_n_s_TSR_OUT_NORM, __pyx_k_TSR_OUT_NORM, sizeof(__pyx_k_TSR_OUT_NORM), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_USE_INTEGRATED_LEVERAGE, __pyx_k_USE_INTEGRATED_LEVERAGE, sizeof(__pyx_k_USE_INTEGRATED_LEVERAGE), 0, 0, 1, 1},
  {&__pyx_n_s_UnNormalizeModel, __pyx_k_UnNormalizeModel, sizeof(__pyx_k_UnNormalizeModel), 0, 0, 1, 1},
  {&__pyx_n_s_UnpicklingError, __pyx_k_UnpicklingError, sizeof(__pyx_k_UnpicklingError), 0, 0, 1, 1},
  {&__pyx_kp_u__148, __pyx_k__148, sizeof(__pyx_k__148), 0, 1, 0, 0},
  {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0},
  {&__pyx_kp_u__150, __pyx_k__150, sizeof(__pyx_k__150), 0, 1, 0, 0},
  {&__pyx_n_s__155, __pyx_k__155, sizeof(__pyx_k__155), 0, 0, 1, 1},
  {&__pyx_n_s__173, __pyx_k__173, sizeof(__pyx_k__173), 0, 0, 1, 1},
  {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 1},
  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
  {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
  {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0},
  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {&__pyx_n_s_absolute, __pyx_k_absolute, sizeof(__pyx_k_absolute), 0, 0, 1, 1},
  {&__pyx_n_s_absorb, __pyx_k_absorb, sizeof(__pyx_k_absorb), 0, 0, 1, 1},
  {&__pyx_n_s_acc, __pyx_k_acc, sizeof(__pyx_k_acc), 0, 0, 1, 1},
  {&__pyx_n_s_action, __pyx_k_action, sizeof(__pyx_k_action), 0, 0, 1, 1},
  {&__pyx_n_s_activation, __pyx_k_activation, sizeof(__pyx_k_activation), 0, 0, 1, 1},
  {&__pyx_n_s_activfunc, __pyx_k_activfunc, sizeof(__pyx_k_activfunc), 0, 0, 1, 1},
  {&__pyx_n_s_actualepochs, __pyx_k_actualepochs, sizeof(__pyx_k_actualepochs), 0, 0, 1, 1},
  {&__pyx_n_s_addComment, __pyx_k_addComment, sizeof(__pyx_k_addComment), 0, 0, 1, 1},
  {&__pyx_n_s_algo, __pyx_k_algo, sizeof(__pyx_k_algo), 0, 0, 1, 1},
  {&__pyx_n_s_allow_pickle, __pyx_k_allow_pickle, sizeof(__pyx_k_allow_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_allvecs, __pyx_k_allvecs, sizeof(__pyx_k_allvecs), 0, 0, 1, 1},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_appdatadir, __pyx_k_appdatadir, sizeof(__pyx_k_appdatadir), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_appli, __pyx_k_appli, sizeof(__pyx_k_appli), 0, 0, 1, 1},
  {&__pyx_n_s_argmax, __pyx_k_argmax, sizeof(__pyx_k_argmax), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_u_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 1, 0, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_asmatrix, __pyx_k_asmatrix, sizeof(__pyx_k_asmatrix), 0, 0, 1, 1},
  {&__pyx_n_s_assign, __pyx_k_assign, sizeof(__pyx_k_assign), 0, 0, 1, 1},
  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
  {&__pyx_n_s_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 0, 0, 1, 1},
  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
  {&__pyx_n_s_back, __pyx_k_back, sizeof(__pyx_k_back), 0, 0, 1, 1},
  {&__pyx_n_s_backPropagate, __pyx_k_backPropagate, sizeof(__pyx_k_backPropagate), 0, 0, 1, 1},
  {&__pyx_n_s_backPropagateCoreMultiOutput, __pyx_k_backPropagateCoreMultiOutput, sizeof(__pyx_k_backPropagateCoreMultiOutput), 0, 0, 1, 1},
  {&__pyx_n_s_backPropagateCoreSingleOutput, __pyx_k_backPropagateCoreSingleOutput, sizeof(__pyx_k_backPropagateCoreSingleOutput), 0, 0, 1, 1},
  {&__pyx_n_s_backupParams, __pyx_k_backupParams, sizeof(__pyx_k_backupParams), 0, 0, 1, 1},
  {&__pyx_n_s_backupParamsNT, __pyx_k_backupParamsNT, sizeof(__pyx_k_backupParamsNT), 0, 0, 1, 1},
  {&__pyx_n_s_backupParams_2, __pyx_k_backupParams_2, sizeof(__pyx_k_backupParams_2), 0, 0, 1, 1},
  {&__pyx_n_u_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 1, 0, 1},
  {&__pyx_n_s_baselen, __pyx_k_baselen, sizeof(__pyx_k_baselen), 0, 0, 1, 1},
  {&__pyx_n_u_baselen, __pyx_k_baselen, sizeof(__pyx_k_baselen), 0, 1, 0, 1},
  {&__pyx_n_s_baselen_2, __pyx_k_baselen_2, sizeof(__pyx_k_baselen_2), 0, 0, 1, 1},
  {&__pyx_n_u_baselen_3, __pyx_k_baselen_3, sizeof(__pyx_k_baselen_3), 0, 1, 0, 1},
  {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
  {&__pyx_n_s_best, __pyx_k_best, sizeof(__pyx_k_best), 0, 0, 1, 1},
  {&__pyx_n_s_bestList, __pyx_k_bestList, sizeof(__pyx_k_bestList), 0, 0, 1, 1},
  {&__pyx_n_s_bests, __pyx_k_bests, sizeof(__pyx_k_bests), 0, 0, 1, 1},
  {&__pyx_n_s_bias, __pyx_k_bias, sizeof(__pyx_k_bias), 0, 0, 1, 1},
  {&__pyx_n_s_bias0, __pyx_k_bias0, sizeof(__pyx_k_bias0), 0, 0, 1, 1},
  {&__pyx_n_s_biasBaseId, __pyx_k_biasBaseId, sizeof(__pyx_k_biasBaseId), 0, 0, 1, 1},
  {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
  {&__pyx_n_s_cPickle, __pyx_k_cPickle, sizeof(__pyx_k_cPickle), 0, 0, 1, 1},
  {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
  {&__pyx_n_s_callback_2, __pyx_k_callback_2, sizeof(__pyx_k_callback_2), 0, 0, 1, 1},
  {&__pyx_n_s_category, __pyx_k_category, sizeof(__pyx_k_category), 0, 0, 1, 1},
  {&__pyx_n_s_chdir, __pyx_k_chdir, sizeof(__pyx_k_chdir), 0, 0, 1, 1},
  {&__pyx_n_s_checkModel, __pyx_k_checkModel, sizeof(__pyx_k_checkModel), 0, 0, 1, 1},
  {&__pyx_n_s_chrono, __pyx_k_chrono, sizeof(__pyx_k_chrono), 0, 0, 1, 1},
  {&__pyx_n_s_chrono_2, __pyx_k_chrono_2, sizeof(__pyx_k_chrono_2), 0, 0, 1, 1},
  {&__pyx_n_u_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 1, 0, 1},
  {&__pyx_n_s_classCostDict, __pyx_k_classCostDict, sizeof(__pyx_k_classCostDict), 0, 0, 1, 1},
  {&__pyx_n_s_class_2, __pyx_k_class_2, sizeof(__pyx_k_class_2), 0, 0, 1, 1},
  {&__pyx_n_s_classif, __pyx_k_classif, sizeof(__pyx_k_classif), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_clist, __pyx_k_clist, sizeof(__pyx_k_clist), 0, 0, 1, 1},
  {&__pyx_n_u_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 1, 0, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_codeWriter, __pyx_k_codeWriter, sizeof(__pyx_k_codeWriter), 0, 0, 1, 1},
  {&__pyx_n_s_codeconst, __pyx_k_codeconst, sizeof(__pyx_k_codeconst), 0, 0, 1, 1},
  {&__pyx_n_s_codelist, __pyx_k_codelist, sizeof(__pyx_k_codelist), 0, 0, 1, 1},
  {&__pyx_n_u_codeversion, __pyx_k_codeversion, sizeof(__pyx_k_codeversion), 0, 1, 0, 1},
  {&__pyx_n_s_compileAsDll, __pyx_k_compileAsDll, sizeof(__pyx_k_compileAsDll), 0, 0, 1, 1},
  {&__pyx_n_s_compileAsExtension, __pyx_k_compileAsExtension, sizeof(__pyx_k_compileAsExtension), 0, 0, 1, 1},
  {&__pyx_n_s_compiler, __pyx_k_compiler, sizeof(__pyx_k_compiler), 0, 0, 1, 1},
  {&__pyx_n_s_computeFromJacobian, __pyx_k_computeFromJacobian, sizeof(__pyx_k_computeFromJacobian), 0, 0, 1, 1},
  {&__pyx_n_s_computeLevel, __pyx_k_computeLevel, sizeof(__pyx_k_computeLevel), 0, 0, 1, 1},
  {&__pyx_n_s_computeTrainData, __pyx_k_computeTrainData, sizeof(__pyx_k_computeTrainData), 0, 0, 1, 1},
  {&__pyx_n_s_computeTrainDataDirect, __pyx_k_computeTrainDataDirect, sizeof(__pyx_k_computeTrainDataDirect), 0, 0, 1, 1},
  {&__pyx_n_s_computeTrainDataProgressive, __pyx_k_computeTrainDataProgressive, sizeof(__pyx_k_computeTrainDataProgressive), 0, 0, 1, 1},
  {&__pyx_n_s_computeTrainingResults, __pyx_k_computeTrainingResults, sizeof(__pyx_k_computeTrainingResults), 0, 0, 1, 1},
  {&__pyx_n_s_computeTrainingResultsIntegrated, __pyx_k_computeTrainingResultsIntegrated, sizeof(__pyx_k_computeTrainingResultsIntegrated), 0, 0, 1, 1},
  {&__pyx_n_s_computeTrainingResultsOld, __pyx_k_computeTrainingResultsOld, sizeof(__pyx_k_computeTrainingResultsOld), 0, 0, 1, 1},
  {&__pyx_n_s_computeUsageLeverages, __pyx_k_computeUsageLeverages, sizeof(__pyx_k_computeUsageLeverages), 0, 0, 1, 1},
  {&__pyx_n_s_computelevel, __pyx_k_computelevel, sizeof(__pyx_k_computelevel), 0, 0, 1, 1},
  {&__pyx_n_s_cond, __pyx_k_cond, sizeof(__pyx_k_cond), 0, 0, 1, 1},
  {&__pyx_n_s_conditionning, __pyx_k_conditionning, sizeof(__pyx_k_conditionning), 0, 0, 1, 1},
  {&__pyx_n_s_confidenceLevel, __pyx_k_confidenceLevel, sizeof(__pyx_k_confidenceLevel), 0, 0, 1, 1},
  {&__pyx_n_s_confidencelevel, __pyx_k_confidencelevel, sizeof(__pyx_k_confidencelevel), 0, 0, 1, 1},
  {&__pyx_n_u_confidencelevel_2, __pyx_k_confidencelevel_2, sizeof(__pyx_k_confidencelevel_2), 0, 1, 0, 1},
  {&__pyx_n_u_configuration, __pyx_k_configuration, sizeof(__pyx_k_configuration), 0, 1, 0, 1},
  {&__pyx_n_s_const_st, __pyx_k_const_st, sizeof(__pyx_k_const_st), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_copyTo, __pyx_k_copyTo, sizeof(__pyx_k_copyTo), 0, 0, 1, 1},
  {&__pyx_n_s_corrcoef, __pyx_k_corrcoef, sizeof(__pyx_k_corrcoef), 0, 0, 1, 1},
  {&__pyx_n_s_correl, __pyx_k_correl, sizeof(__pyx_k_correl), 0, 0, 1, 1},
  {&__pyx_n_s_correlMatrix, __pyx_k_correlMatrix, sizeof(__pyx_k_correlMatrix), 0, 0, 1, 1},
  {&__pyx_n_u_correlMatrix_2, __pyx_k_correlMatrix_2, sizeof(__pyx_k_correlMatrix_2), 0, 1, 0, 1},
  {&__pyx_n_s_correlflat, __pyx_k_correlflat, sizeof(__pyx_k_correlflat), 0, 0, 1, 1},
  {&__pyx_n_s_cost, __pyx_k_cost, sizeof(__pyx_k_cost), 0, 0, 1, 1},
  {&__pyx_n_s_cost2, __pyx_k_cost2, sizeof(__pyx_k_cost2), 0, 0, 1, 1},
  {&__pyx_n_s_costAndPrime, __pyx_k_costAndPrime, sizeof(__pyx_k_costAndPrime), 0, 0, 1, 1},
  {&__pyx_n_s_costD, __pyx_k_costD, sizeof(__pyx_k_costD), 0, 0, 1, 1},
  {&__pyx_n_s_costFunction, __pyx_k_costFunction, sizeof(__pyx_k_costFunction), 0, 0, 1, 1},
  {&__pyx_n_s_costNT, __pyx_k_costNT, sizeof(__pyx_k_costNT), 0, 0, 1, 1},
  {&__pyx_n_s_costfunction, __pyx_k_costfunction, sizeof(__pyx_k_costfunction), 0, 0, 1, 1},
  {&__pyx_n_s_costgradientNT, __pyx_k_costgradientNT, sizeof(__pyx_k_costgradientNT), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_u_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 1, 0, 1},
  {&__pyx_kp_u_count_0, __pyx_k_count_0, sizeof(__pyx_k_count_0), 0, 1, 0, 0},
  {&__pyx_kp_u_count_2, __pyx_k_count_2, sizeof(__pyx_k_count_2), 0, 1, 0, 0},
  {&__pyx_n_s_cov, __pyx_k_cov, sizeof(__pyx_k_cov), 0, 0, 1, 1},
  {&__pyx_n_s_createCodeWriter, __pyx_k_createCodeWriter, sizeof(__pyx_k_createCodeWriter), 0, 0, 1, 1},
  {&__pyx_n_s_createLink, __pyx_k_createLink, sizeof(__pyx_k_createLink), 0, 0, 1, 1},
  {&__pyx_n_s_createModel, __pyx_k_createModel, sizeof(__pyx_k_createModel), 0, 0, 1, 1},
  {&__pyx_n_u_created, __pyx_k_created, sizeof(__pyx_k_created), 0, 1, 0, 1},
  {&__pyx_n_s_criterion, __pyx_k_criterion, sizeof(__pyx_k_criterion), 0, 0, 1, 1},
  {&__pyx_n_s_cst, __pyx_k_cst, sizeof(__pyx_k_cst), 0, 0, 1, 1},
  {&__pyx_n_u_csv, __pyx_k_csv, sizeof(__pyx_k_csv), 0, 1, 0, 1},
  {&__pyx_n_s_cumul, __pyx_k_cumul, sizeof(__pyx_k_cumul), 0, 0, 1, 1},
  {&__pyx_n_s_cur, __pyx_k_cur, sizeof(__pyx_k_cur), 0, 0, 1, 1},
  {&__pyx_n_s_curWeights, __pyx_k_curWeights, sizeof(__pyx_k_curWeights), 0, 0, 1, 1},
  {&__pyx_n_s_curdisp, __pyx_k_curdisp, sizeof(__pyx_k_curdisp), 0, 0, 1, 1},
  {&__pyx_n_s_curw, __pyx_k_curw, sizeof(__pyx_k_curw), 0, 0, 1, 1},
  {&__pyx_n_s_curweights, __pyx_k_curweights, sizeof(__pyx_k_curweights), 0, 0, 1, 1},
  {&__pyx_n_s_dat, __pyx_k_dat, sizeof(__pyx_k_dat), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_dataArray, __pyx_k_dataArray, sizeof(__pyx_k_dataArray), 0, 0, 1, 1},
  {&__pyx_n_s_dataCount, __pyx_k_dataCount, sizeof(__pyx_k_dataCount), 0, 0, 1, 1},
  {&__pyx_n_u_dataCount, __pyx_k_dataCount, sizeof(__pyx_k_dataCount), 0, 1, 0, 1},
  {&__pyx_n_s_dataWidth, __pyx_k_dataWidth, sizeof(__pyx_k_dataWidth), 0, 0, 1, 1},
  {&__pyx_n_s_dataformat, __pyx_k_dataformat, sizeof(__pyx_k_dataformat), 0, 0, 1, 1},
  {&__pyx_n_s_dataindex, __pyx_k_dataindex, sizeof(__pyx_k_dataindex), 0, 0, 1, 1},
  {&__pyx_n_s_dataset, __pyx_k_dataset, sizeof(__pyx_k_dataset), 0, 0, 1, 1},
  {&__pyx_n_s_datasource, __pyx_k_datasource, sizeof(__pyx_k_datasource), 0, 0, 1, 1},
  {&__pyx_n_s_datastyle, __pyx_k_datastyle, sizeof(__pyx_k_datastyle), 0, 0, 1, 1},
  {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  {&__pyx_n_s_decal, __pyx_k_decal, sizeof(__pyx_k_decal), 0, 0, 1, 1},
  {&__pyx_n_s_del, __pyx_k_del, sizeof(__pyx_k_del), 0, 0, 1, 1},
  {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1},
  {&__pyx_n_s_deltares, __pyx_k_deltares, sizeof(__pyx_k_deltares), 0, 0, 1, 1},
  {&__pyx_n_s_deltash, __pyx_k_deltash, sizeof(__pyx_k_deltash), 0, 0, 1, 1},
  {&__pyx_n_u_deltasquare, __pyx_k_deltasquare, sizeof(__pyx_k_deltasquare), 0, 1, 0, 1},
  {&__pyx_n_s_derive, __pyx_k_derive, sizeof(__pyx_k_derive), 0, 0, 1, 1},
  {&__pyx_n_s_determinant, __pyx_k_determinant, sizeof(__pyx_k_determinant), 0, 0, 1, 1},
  {&__pyx_n_s_determinant_2, __pyx_k_determinant_2, sizeof(__pyx_k_determinant_2), 0, 0, 1, 1},
  {&__pyx_n_u_determinant_2, __pyx_k_determinant_2, sizeof(__pyx_k_determinant_2), 0, 1, 0, 1},
  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
  {&__pyx_n_s_dimension, __pyx_k_dimension, sizeof(__pyx_k_dimension), 0, 0, 1, 1},
  {&__pyx_n_u_dimension, __pyx_k_dimension, sizeof(__pyx_k_dimension), 0, 1, 0, 1},
  {&__pyx_n_u_direct, __pyx_k_direct, sizeof(__pyx_k_direct), 0, 1, 0, 1},
  {&__pyx_n_s_directInputGradient, __pyx_k_directInputGradient, sizeof(__pyx_k_directInputGradient), 0, 0, 1, 1},
  {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1},
  {&__pyx_n_s_disp, __pyx_k_disp, sizeof(__pyx_k_disp), 0, 0, 1, 1},
  {&__pyx_n_s_dispersion, __pyx_k_dispersion, sizeof(__pyx_k_dispersion), 0, 0, 1, 1},
  {&__pyx_n_u_dispersion, __pyx_k_dispersion, sizeof(__pyx_k_dispersion), 0, 1, 0, 1},
  {&__pyx_n_s_dispersionMatrix, __pyx_k_dispersionMatrix, sizeof(__pyx_k_dispersionMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_dispersionMatrix_2, __pyx_k_dispersionMatrix_2, sizeof(__pyx_k_dispersionMatrix_2), 0, 0, 1, 1},
  {&__pyx_n_u_dispersionMatrix_2, __pyx_k_dispersionMatrix_2, sizeof(__pyx_k_dispersionMatrix_2), 0, 1, 0, 1},
  {&__pyx_n_u_dispersion_2, __pyx_k_dispersion_2, sizeof(__pyx_k_dispersion_2), 0, 1, 0, 1},
  {&__pyx_n_s_disploc, __pyx_k_disploc, sizeof(__pyx_k_disploc), 0, 0, 1, 1},
  {&__pyx_n_s_doSaveParameters, __pyx_k_doSaveParameters, sizeof(__pyx_k_doSaveParameters), 0, 0, 1, 1},
  {&__pyx_n_s_doSum, __pyx_k_doSum, sizeof(__pyx_k_doSum), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_doit, __pyx_k_doit, sizeof(__pyx_k_doit), 0, 0, 1, 1},
  {&__pyx_n_u_done, __pyx_k_done, sizeof(__pyx_k_done), 0, 1, 0, 1},
  {&__pyx_n_s_donorm, __pyx_k_donorm, sizeof(__pyx_k_donorm), 0, 0, 1, 1},
  {&__pyx_n_s_doprint, __pyx_k_doprint, sizeof(__pyx_k_doprint), 0, 0, 1, 1},
  {&__pyx_n_s_dosave, __pyx_k_dosave, sizeof(__pyx_k_dosave), 0, 0, 1, 1},
  {&__pyx_n_s_doset, __pyx_k_doset, sizeof(__pyx_k_doset), 0, 0, 1, 1},
  {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
  {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
  {&__pyx_n_s_downLinks, __pyx_k_downLinks, sizeof(__pyx_k_downLinks), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_dynamiclinking, __pyx_k_dynamiclinking, sizeof(__pyx_k_dynamiclinking), 0, 0, 1, 1},
  {&__pyx_n_s_eigval, __pyx_k_eigval, sizeof(__pyx_k_eigval), 0, 0, 1, 1},
  {&__pyx_n_s_element, __pyx_k_element, sizeof(__pyx_k_element), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 1},
  {&__pyx_n_s_epochs, __pyx_k_epochs, sizeof(__pyx_k_epochs), 0, 0, 1, 1},
  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
  {&__pyx_n_s_existingnode, __pyx_k_existingnode, sizeof(__pyx_k_existingnode), 0, 0, 1, 1},
  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_expandvec, __pyx_k_expandvec, sizeof(__pyx_k_expandvec), 0, 0, 1, 1},
  {&__pyx_n_s_exports, __pyx_k_exports, sizeof(__pyx_k_exports), 0, 0, 1, 1},
  {&__pyx_n_s_extendedInputCount, __pyx_k_extendedInputCount, sizeof(__pyx_k_extendedInputCount), 0, 0, 1, 1},
  {&__pyx_n_s_extfmt, __pyx_k_extfmt, sizeof(__pyx_k_extfmt), 0, 0, 1, 1},
  {&__pyx_kp_u_extraCount, __pyx_k_extraCount, sizeof(__pyx_k_extraCount), 0, 1, 0, 0},
  {&__pyx_n_s_extraCount_2, __pyx_k_extraCount_2, sizeof(__pyx_k_extraCount_2), 0, 0, 1, 1},
  {&__pyx_n_s_extraVLOO, __pyx_k_extraVLOO, sizeof(__pyx_k_extraVLOO), 0, 0, 1, 1},
  {&__pyx_n_u_extraVLOO_2, __pyx_k_extraVLOO_2, sizeof(__pyx_k_extraVLOO_2), 0, 1, 0, 1},
  {&__pyx_n_u_extradispersion, __pyx_k_extradispersion, sizeof(__pyx_k_extradispersion), 0, 1, 0, 1},
  {&__pyx_n_s_extradispersions, __pyx_k_extradispersions, sizeof(__pyx_k_extradispersions), 0, 0, 1, 1},
  {&__pyx_n_s_extradispersions_2, __pyx_k_extradispersions_2, sizeof(__pyx_k_extradispersions_2), 0, 0, 1, 1},
  {&__pyx_n_u_extradispersions_2, __pyx_k_extradispersions_2, sizeof(__pyx_k_extradispersions_2), 0, 1, 0, 1},
  {&__pyx_n_s_extrastddev, __pyx_k_extrastddev, sizeof(__pyx_k_extrastddev), 0, 0, 1, 1},
  {&__pyx_n_s_extrastddev_2, __pyx_k_extrastddev_2, sizeof(__pyx_k_extrastddev_2), 0, 0, 1, 1},
  {&__pyx_n_u_extrastddev_2, __pyx_k_extrastddev_2, sizeof(__pyx_k_extrastddev_2), 0, 1, 0, 1},
  {&__pyx_n_s_extraweights, __pyx_k_extraweights, sizeof(__pyx_k_extraweights), 0, 0, 1, 1},
  {&__pyx_n_s_extraweights_2, __pyx_k_extraweights_2, sizeof(__pyx_k_extraweights_2), 0, 0, 1, 1},
  {&__pyx_n_u_extraweights_2, __pyx_k_extraweights_2, sizeof(__pyx_k_extraweights_2), 0, 1, 0, 1},
  {&__pyx_n_u_extraweightslist, __pyx_k_extraweightslist, sizeof(__pyx_k_extraweightslist), 0, 1, 0, 1},
  {&__pyx_n_s_factor, __pyx_k_factor, sizeof(__pyx_k_factor), 0, 0, 1, 1},
  {&__pyx_n_s_fcost, __pyx_k_fcost, sizeof(__pyx_k_fcost), 0, 0, 1, 1},
  {&__pyx_n_s_fct, __pyx_k_fct, sizeof(__pyx_k_fct), 0, 0, 1, 1},
  {&__pyx_n_s_ff, __pyx_k_ff, sizeof(__pyx_k_ff), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_file_2, __pyx_k_file_2, sizeof(__pyx_k_file_2), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
  {&__pyx_n_s_fillstr, __pyx_k_fillstr, sizeof(__pyx_k_fillstr), 0, 0, 1, 1},
  {&__pyx_n_s_filterwarnings, __pyx_k_filterwarnings, sizeof(__pyx_k_filterwarnings), 0, 0, 1, 1},
  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
  {&__pyx_n_s_fix, __pyx_k_fix, sizeof(__pyx_k_fix), 0, 0, 1, 1},
  {&__pyx_n_s_fixed, __pyx_k_fixed, sizeof(__pyx_k_fixed), 0, 0, 1, 1},
  {&__pyx_n_s_fixedinputs, __pyx_k_fixedinputs, sizeof(__pyx_k_fixedinputs), 0, 0, 1, 1},
  {&__pyx_n_s_flat, __pyx_k_flat, sizeof(__pyx_k_flat), 0, 0, 1, 1},
  {&__pyx_n_s_flist, __pyx_k_flist, sizeof(__pyx_k_flist), 0, 0, 1, 1},
  {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
  {&__pyx_n_s_floatEx, __pyx_k_floatEx, sizeof(__pyx_k_floatEx), 0, 0, 1, 1},
  {&__pyx_n_s_floor, __pyx_k_floor, sizeof(__pyx_k_floor), 0, 0, 1, 1},
  {&__pyx_n_s_fmin, __pyx_k_fmin, sizeof(__pyx_k_fmin), 0, 0, 1, 1},
  {&__pyx_n_s_fmin_bfgs, __pyx_k_fmin_bfgs, sizeof(__pyx_k_fmin_bfgs), 0, 0, 1, 1},
  {&__pyx_n_s_fmin_cg, __pyx_k_fmin_cg, sizeof(__pyx_k_fmin_cg), 0, 0, 1, 1},
  {&__pyx_n_s_fname, __pyx_k_fname, sizeof(__pyx_k_fname), 0, 0, 1, 1},
  {&__pyx_n_s_follow, __pyx_k_follow, sizeof(__pyx_k_follow), 0, 0, 1, 1},
  {&__pyx_n_s_fopt, __pyx_k_fopt, sizeof(__pyx_k_fopt), 0, 0, 1, 1},
  {&__pyx_n_s_forcecreate, __pyx_k_forcecreate, sizeof(__pyx_k_forcecreate), 0, 0, 1, 1},
  {&__pyx_n_s_forcelib, __pyx_k_forcelib, sizeof(__pyx_k_forcelib), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fprime, __pyx_k_fprime, sizeof(__pyx_k_fprime), 0, 0, 1, 1},
  {&__pyx_n_s_freedm, __pyx_k_freedm, sizeof(__pyx_k_freedm), 0, 0, 1, 1},
  {&__pyx_n_s_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 0, 0, 1, 1},
  {&__pyx_n_s_fsum, __pyx_k_fsum, sizeof(__pyx_k_fsum), 0, 0, 1, 1},
  {&__pyx_n_s_full, __pyx_k_full, sizeof(__pyx_k_full), 0, 0, 1, 1},
  {&__pyx_n_s_full_output, __pyx_k_full_output, sizeof(__pyx_k_full_output), 0, 0, 1, 1},
  {&__pyx_n_s_fullinputs, __pyx_k_fullinputs, sizeof(__pyx_k_fullinputs), 0, 0, 1, 1},
  {&__pyx_n_s_funcalls, __pyx_k_funcalls, sizeof(__pyx_k_funcalls), 0, 0, 1, 1},
  {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
  {&__pyx_n_u_fvec, __pyx_k_fvec, sizeof(__pyx_k_fvec), 0, 1, 0, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getComputeCondition, __pyx_k_getComputeCondition, sizeof(__pyx_k_getComputeCondition), 0, 0, 1, 1},
  {&__pyx_n_s_getCorrelFromDispersion, __pyx_k_getCorrelFromDispersion, sizeof(__pyx_k_getCorrelFromDispersion), 0, 0, 1, 1},
  {&__pyx_n_s_getCost, __pyx_k_getCost, sizeof(__pyx_k_getCost), 0, 0, 1, 1},
  {&__pyx_n_s_getDispersionMatrixFromJacobian, __pyx_k_getDispersionMatrixFromJacobian, sizeof(__pyx_k_getDispersionMatrixFromJacobian), 0, 0, 1, 1},
  {&__pyx_n_s_getIndexWeightOfName, __pyx_k_getIndexWeightOfName, sizeof(__pyx_k_getIndexWeightOfName), 0, 0, 1, 1},
  {&__pyx_n_s_getJacobian, __pyx_k_getJacobian, sizeof(__pyx_k_getJacobian), 0, 0, 1, 1},
  {&__pyx_n_s_getLeveragesFromSVD, __pyx_k_getLeveragesFromSVD, sizeof(__pyx_k_getLeveragesFromSVD), 0, 0, 1, 1},
  {&__pyx_n_s_getNeuronOfId, __pyx_k_getNeuronOfId, sizeof(__pyx_k_getNeuronOfId), 0, 0, 1, 1},
  {&__pyx_n_s_getNewWeights, __pyx_k_getNewWeights, sizeof(__pyx_k_getNewWeights), 0, 0, 1, 1},
  {&__pyx_n_s_getNomalizingMatrixFromData, __pyx_k_getNomalizingMatrixFromData, sizeof(__pyx_k_getNomalizingMatrixFromData), 0, 0, 1, 1},
  {&__pyx_n_s_getPRESS, __pyx_k_getPRESS, sizeof(__pyx_k_getPRESS), 0, 0, 1, 1},
  {&__pyx_n_s_getParamsStr, __pyx_k_getParamsStr, sizeof(__pyx_k_getParamsStr), 0, 0, 1, 1},
  {&__pyx_n_s_getPrime, __pyx_k_getPrime, sizeof(__pyx_k_getPrime), 0, 0, 1, 1},
  {&__pyx_n_s_getResiduals, __pyx_k_getResiduals, sizeof(__pyx_k_getResiduals), 0, 0, 1, 1},
  {&__pyx_n_s_getResults, __pyx_k_getResults, sizeof(__pyx_k_getResults), 0, 0, 1, 1},
  {&__pyx_n_s_getSVDChildren, __pyx_k_getSVDChildren, sizeof(__pyx_k_getSVDChildren), 0, 0, 1, 1},
  {&__pyx_n_s_getTempDir, __pyx_k_getTempDir, sizeof(__pyx_k_getTempDir), 0, 0, 1, 1},
  {&__pyx_n_s_getTransferResults, __pyx_k_getTransferResults, sizeof(__pyx_k_getTransferResults), 0, 0, 1, 1},
  {&__pyx_n_u_getbaselen, __pyx_k_getbaselen, sizeof(__pyx_k_getbaselen), 0, 1, 0, 1},
  {&__pyx_n_u_getbiasbased, __pyx_k_getbiasbased, sizeof(__pyx_k_getbiasbased), 0, 1, 0, 1},
  {&__pyx_n_s_getchildren, __pyx_k_getchildren, sizeof(__pyx_k_getchildren), 0, 0, 1, 1},
  {&__pyx_n_u_getcost, __pyx_k_getcost, sizeof(__pyx_k_getcost), 0, 1, 0, 1},
  {&__pyx_n_s_getcwd, __pyx_k_getcwd, sizeof(__pyx_k_getcwd), 0, 0, 1, 1},
  {&__pyx_n_u_getdata, __pyx_k_getdata, sizeof(__pyx_k_getdata), 0, 1, 0, 1},
  {&__pyx_n_u_getdebugfile, __pyx_k_getdebugfile, sizeof(__pyx_k_getdebugfile), 0, 1, 0, 1},
  {&__pyx_n_u_getdirector, __pyx_k_getdirector, sizeof(__pyx_k_getdirector), 0, 1, 0, 1},
  {&__pyx_n_u_getdispersion, __pyx_k_getdispersion, sizeof(__pyx_k_getdispersion), 0, 1, 0, 1},
  {&__pyx_n_u_getfreedom, __pyx_k_getfreedom, sizeof(__pyx_k_getfreedom), 0, 1, 0, 1},
  {&__pyx_n_u_getfreedomindex, __pyx_k_getfreedomindex, sizeof(__pyx_k_getfreedomindex), 0, 1, 0, 1},
  {&__pyx_n_u_gethalfdispersion, __pyx_k_gethalfdispersion, sizeof(__pyx_k_gethalfdispersion), 0, 1, 0, 1},
  {&__pyx_n_s_getindexinfo, __pyx_k_getindexinfo, sizeof(__pyx_k_getindexinfo), 0, 0, 1, 1},
  {&__pyx_kp_u_getindexinfo_incomplete_with_sty, __pyx_k_getindexinfo_incomplete_with_sty, sizeof(__pyx_k_getindexinfo_incomplete_with_sty), 0, 1, 0, 0},
  {&__pyx_n_s_getinfo, __pyx_k_getinfo, sizeof(__pyx_k_getinfo), 0, 0, 1, 1},
  {&__pyx_kp_u_getinfo_incomplete_with_style, __pyx_k_getinfo_incomplete_with_style, sizeof(__pyx_k_getinfo_incomplete_with_style), 0, 1, 0, 0},
  {&__pyx_n_u_getinputnorm, __pyx_k_getinputnorm, sizeof(__pyx_k_getinputnorm), 0, 1, 0, 1},
  {&__pyx_n_s_getiterator, __pyx_k_getiterator, sizeof(__pyx_k_getiterator), 0, 0, 1, 1},
  {&__pyx_n_s_getjacobian, __pyx_k_getjacobian, sizeof(__pyx_k_getjacobian), 0, 0, 1, 1},
  {&__pyx_n_u_getjacobian, __pyx_k_getjacobian, sizeof(__pyx_k_getjacobian), 0, 1, 0, 1},
  {&__pyx_n_u_getlastcost, __pyx_k_getlastcost, sizeof(__pyx_k_getlastcost), 0, 1, 0, 1},
  {&__pyx_n_s_getlastresiduals, __pyx_k_getlastresiduals, sizeof(__pyx_k_getlastresiduals), 0, 0, 1, 1},
  {&__pyx_n_u_getnames, __pyx_k_getnames, sizeof(__pyx_k_getnames), 0, 1, 0, 1},
  {&__pyx_n_u_getnorm, __pyx_k_getnorm, sizeof(__pyx_k_getnorm), 0, 1, 0, 1},
  {&__pyx_n_u_getoutlinks, __pyx_k_getoutlinks, sizeof(__pyx_k_getoutlinks), 0, 1, 0, 1},
  {&__pyx_n_u_getparams, __pyx_k_getparams, sizeof(__pyx_k_getparams), 0, 1, 0, 1},
  {&__pyx_n_u_getpress, __pyx_k_getpress, sizeof(__pyx_k_getpress), 0, 1, 0, 1},
  {&__pyx_n_u_getprime, __pyx_k_getprime, sizeof(__pyx_k_getprime), 0, 1, 0, 1},
  {&__pyx_n_u_getproperty, __pyx_k_getproperty, sizeof(__pyx_k_getproperty), 0, 1, 0, 1},
  {&__pyx_n_s_getrealvalue, __pyx_k_getrealvalue, sizeof(__pyx_k_getrealvalue), 0, 0, 1, 1},
  {&__pyx_kp_u_getrealvalue_incomplete_with_sty, __pyx_k_getrealvalue_incomplete_with_sty, sizeof(__pyx_k_getrealvalue_incomplete_with_sty), 0, 1, 0, 0},
  {&__pyx_n_s_getresiduals, __pyx_k_getresiduals, sizeof(__pyx_k_getresiduals), 0, 0, 1, 1},
  {&__pyx_n_u_getresiduals, __pyx_k_getresiduals, sizeof(__pyx_k_getresiduals), 0, 1, 0, 1},
  {&__pyx_n_s_getroot, __pyx_k_getroot, sizeof(__pyx_k_getroot), 0, 0, 1, 1},
  {&__pyx_n_u_getstddev, __pyx_k_getstddev, sizeof(__pyx_k_getstddev), 0, 1, 0, 1},
  {&__pyx_n_s_gettargets, __pyx_k_gettargets, sizeof(__pyx_k_gettargets), 0, 0, 1, 1},
  {&__pyx_n_u_gettargets, __pyx_k_gettargets, sizeof(__pyx_k_gettargets), 0, 1, 0, 1},
  {&__pyx_n_u_gettrainstyle, __pyx_k_gettrainstyle, sizeof(__pyx_k_gettrainstyle), 0, 1, 0, 1},
  {&__pyx_n_u_gettraintype, __pyx_k_gettraintype, sizeof(__pyx_k_gettraintype), 0, 1, 0, 1},
  {&__pyx_n_u_getwused, __pyx_k_getwused, sizeof(__pyx_k_getwused), 0, 1, 0, 1},
  {&__pyx_n_s_givetime, __pyx_k_givetime, sizeof(__pyx_k_givetime), 0, 0, 1, 1},
  {&__pyx_n_s_gopt, __pyx_k_gopt, sizeof(__pyx_k_gopt), 0, 0, 1, 1},
  {&__pyx_n_s_grad, __pyx_k_grad, sizeof(__pyx_k_grad), 0, 0, 1, 1},
  {&__pyx_n_s_gradient, __pyx_k_gradient, sizeof(__pyx_k_gradient), 0, 0, 1, 1},
  {&__pyx_n_s_gradientCompute, __pyx_k_gradientCompute, sizeof(__pyx_k_gradientCompute), 0, 0, 1, 1},
  {&__pyx_n_s_gradientInput, __pyx_k_gradientInput, sizeof(__pyx_k_gradientInput), 0, 0, 1, 1},
  {&__pyx_n_s_gradient_2, __pyx_k_gradient_2, sizeof(__pyx_k_gradient_2), 0, 0, 1, 1},
  {&__pyx_n_s_gradloc, __pyx_k_gradloc, sizeof(__pyx_k_gradloc), 0, 0, 1, 1},
  {&__pyx_n_s_grads, __pyx_k_grads, sizeof(__pyx_k_grads), 0, 0, 1, 1},
  {&__pyx_n_s_gradval, __pyx_k_gradval, sizeof(__pyx_k_gradval), 0, 0, 1, 1},
  {&__pyx_n_s_gradvalue, __pyx_k_gradvalue, sizeof(__pyx_k_gradvalue), 0, 0, 1, 1},
  {&__pyx_n_s_halfDispersionMatrix, __pyx_k_halfDispersionMatrix, sizeof(__pyx_k_halfDispersionMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_halfDispersionMatrix_2, __pyx_k_halfDispersionMatrix_2, sizeof(__pyx_k_halfDispersionMatrix_2), 0, 0, 1, 1},
  {&__pyx_n_s_halfdispersion, __pyx_k_halfdispersion, sizeof(__pyx_k_halfdispersion), 0, 0, 1, 1},
  {&__pyx_n_u_halfdispersion_2, __pyx_k_halfdispersion_2, sizeof(__pyx_k_halfdispersion_2), 0, 1, 0, 1},
  {&__pyx_n_s_hasInputMiniMaxi, __pyx_k_hasInputMiniMaxi, sizeof(__pyx_k_hasInputMiniMaxi), 0, 0, 1, 1},
  {&__pyx_n_s_hasOutputMiniMaxi, __pyx_k_hasOutputMiniMaxi, sizeof(__pyx_k_hasOutputMiniMaxi), 0, 0, 1, 1},
  {&__pyx_n_s_hasResampling, __pyx_k_hasResampling, sizeof(__pyx_k_hasResampling), 0, 0, 1, 1},
  {&__pyx_n_s_hasw, __pyx_k_hasw, sizeof(__pyx_k_hasw), 0, 0, 1, 1},
  {&__pyx_n_s_hessian, __pyx_k_hessian, sizeof(__pyx_k_hessian), 0, 0, 1, 1},
  {&__pyx_n_s_hessian_2, __pyx_k_hessian_2, sizeof(__pyx_k_hessian_2), 0, 0, 1, 1},
  {&__pyx_n_s_hh, __pyx_k_hh, sizeof(__pyx_k_hh), 0, 0, 1, 1},
  {&__pyx_n_s_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 0, 1, 1},
  {&__pyx_n_u_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 1, 0, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_i1, __pyx_k_i1, sizeof(__pyx_k_i1), 0, 0, 1, 1},
  {&__pyx_n_s_i2, __pyx_k_i2, sizeof(__pyx_k_i2), 0, 0, 1, 1},
  {&__pyx_n_s_ic, __pyx_k_ic, sizeof(__pyx_k_ic), 0, 0, 1, 1},
  {&__pyx_n_s_identity, __pyx_k_identity, sizeof(__pyx_k_identity), 0, 0, 1, 1},
  {&__pyx_n_s_ier, __pyx_k_ier, sizeof(__pyx_k_ier), 0, 0, 1, 1},
  {&__pyx_n_u_ignore, __pyx_k_ignore, sizeof(__pyx_k_ignore), 0, 1, 0, 1},
  {&__pyx_n_s_il, __pyx_k_il, sizeof(__pyx_k_il), 0, 0, 1, 1},
  {&__pyx_n_s_imax, __pyx_k_imax, sizeof(__pyx_k_imax), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_importXML, __pyx_k_importXML, sizeof(__pyx_k_importXML), 0, 0, 1, 1},
  {&__pyx_n_s_inNames, __pyx_k_inNames, sizeof(__pyx_k_inNames), 0, 0, 1, 1},
  {&__pyx_n_s_inNormModel, __pyx_k_inNormModel, sizeof(__pyx_k_inNormModel), 0, 0, 1, 1},
  {&__pyx_n_u_include, __pyx_k_include, sizeof(__pyx_k_include), 0, 1, 0, 1},
  {&__pyx_n_s_includedirs, __pyx_k_includedirs, sizeof(__pyx_k_includedirs), 0, 0, 1, 1},
  {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1},
  {&__pyx_n_s_indata, __pyx_k_indata, sizeof(__pyx_k_indata), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_indexInitialState, __pyx_k_indexInitialState, sizeof(__pyx_k_indexInitialState), 0, 0, 1, 1},
  {&__pyx_n_s_indloc, __pyx_k_indloc, sizeof(__pyx_k_indloc), 0, 0, 1, 1},
  {&__pyx_n_s_infodict, __pyx_k_infodict, sizeof(__pyx_k_infodict), 0, 0, 1, 1},
  {&__pyx_n_s_ingrad, __pyx_k_ingrad, sizeof(__pyx_k_ingrad), 0, 0, 1, 1},
  {&__pyx_n_s_ingrads, __pyx_k_ingrads, sizeof(__pyx_k_ingrads), 0, 0, 1, 1},
  {&__pyx_n_s_ingradval, __pyx_k_ingradval, sizeof(__pyx_k_ingradval), 0, 0, 1, 1},
  {&__pyx_n_s_ingradvalue, __pyx_k_ingradvalue, sizeof(__pyx_k_ingradvalue), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_initWeights, __pyx_k_initWeights, sizeof(__pyx_k_initWeights), 0, 0, 1, 1},
  {&__pyx_n_s_initcount, __pyx_k_initcount, sizeof(__pyx_k_initcount), 0, 0, 1, 1},
  {&__pyx_n_s_initweights, __pyx_k_initweights, sizeof(__pyx_k_initweights), 0, 0, 1, 1},
  {&__pyx_n_s_inivalue, __pyx_k_inivalue, sizeof(__pyx_k_inivalue), 0, 0, 1, 1},
  {&__pyx_n_s_inivec, __pyx_k_inivec, sizeof(__pyx_k_inivec), 0, 0, 1, 1},
  {&__pyx_n_s_inname, __pyx_k_inname, sizeof(__pyx_k_inname), 0, 0, 1, 1},
  {&__pyx_n_s_innode, __pyx_k_innode, sizeof(__pyx_k_innode), 0, 0, 1, 1},
  {&__pyx_n_s_innorm, __pyx_k_innorm, sizeof(__pyx_k_innorm), 0, 0, 1, 1},
  {&__pyx_n_u_innorm, __pyx_k_innorm, sizeof(__pyx_k_innorm), 0, 1, 0, 1},
  {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1},
  {&__pyx_n_s_inputArray, __pyx_k_inputArray, sizeof(__pyx_k_inputArray), 0, 0, 1, 1},
  {&__pyx_n_s_inputCount, __pyx_k_inputCount, sizeof(__pyx_k_inputCount), 0, 0, 1, 1},
  {&__pyx_n_u_inputCount, __pyx_k_inputCount, sizeof(__pyx_k_inputCount), 0, 1, 0, 1},
  {&__pyx_n_s_inputDim, __pyx_k_inputDim, sizeof(__pyx_k_inputDim), 0, 0, 1, 1},
  {&__pyx_n_s_inputNames, __pyx_k_inputNames, sizeof(__pyx_k_inputNames), 0, 0, 1, 1},
  {&__pyx_n_s_inputNodes, __pyx_k_inputNodes, sizeof(__pyx_k_inputNodes), 0, 0, 1, 1},
  {&__pyx_n_s_inputNorm, __pyx_k_inputNorm, sizeof(__pyx_k_inputNorm), 0, 0, 1, 1},
  {&__pyx_n_s_inputTrainCost, __pyx_k_inputTrainCost, sizeof(__pyx_k_inputTrainCost), 0, 0, 1, 1},
  {&__pyx_n_s_inputTrainFunc, __pyx_k_inputTrainFunc, sizeof(__pyx_k_inputTrainFunc), 0, 0, 1, 1},
  {&__pyx_n_s_inputTrainGrad, __pyx_k_inputTrainGrad, sizeof(__pyx_k_inputTrainGrad), 0, 0, 1, 1},
  {&__pyx_n_s_inputTrainPrime, __pyx_k_inputTrainPrime, sizeof(__pyx_k_inputTrainPrime), 0, 0, 1, 1},
  {&__pyx_n_s_inputTrainPrimeFull, __pyx_k_inputTrainPrimeFull, sizeof(__pyx_k_inputTrainPrimeFull), 0, 0, 1, 1},
  {&__pyx_n_s_inputini, __pyx_k_inputini, sizeof(__pyx_k_inputini), 0, 0, 1, 1},
  {&__pyx_n_s_inputnamelist, __pyx_k_inputnamelist, sizeof(__pyx_k_inputnamelist), 0, 0, 1, 1},
  {&__pyx_n_u_inputnames, __pyx_k_inputnames, sizeof(__pyx_k_inputnames), 0, 1, 0, 1},
  {&__pyx_n_s_inputnorm, __pyx_k_inputnorm, sizeof(__pyx_k_inputnorm), 0, 0, 1, 1},
  {&__pyx_n_u_inputnorm, __pyx_k_inputnorm, sizeof(__pyx_k_inputnorm), 0, 1, 0, 1},
  {&__pyx_n_s_inputnormindex, __pyx_k_inputnormindex, sizeof(__pyx_k_inputnormindex), 0, 0, 1, 1},
  {&__pyx_n_s_inputs, __pyx_k_inputs, sizeof(__pyx_k_inputs), 0, 0, 1, 1},
  {&__pyx_n_s_inputsMinMaxList, __pyx_k_inputsMinMaxList, sizeof(__pyx_k_inputsMinMaxList), 0, 0, 1, 1},
  {&__pyx_n_s_inputsloc, __pyx_k_inputsloc, sizeof(__pyx_k_inputsloc), 0, 0, 1, 1},
  {&__pyx_n_s_insertLayer, __pyx_k_insertLayer, sizeof(__pyx_k_insertLayer), 0, 0, 1, 1},
  {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
  {&__pyx_n_u_integrated, __pyx_k_integrated, sizeof(__pyx_k_integrated), 0, 1, 0, 1},
  {&__pyx_n_s_isFix, __pyx_k_isFix, sizeof(__pyx_k_isFix), 0, 0, 1, 1},
  {&__pyx_n_s_isLinear, __pyx_k_isLinear, sizeof(__pyx_k_isLinear), 0, 0, 1, 1},
  {&__pyx_n_s_isNewWeight, __pyx_k_isNewWeight, sizeof(__pyx_k_isNewWeight), 0, 0, 1, 1},
  {&__pyx_n_s_isParallel, __pyx_k_isParallel, sizeof(__pyx_k_isParallel), 0, 0, 1, 1},
  {&__pyx_n_s_isStrNum, __pyx_k_isStrNum, sizeof(__pyx_k_isStrNum), 0, 0, 1, 1},
  {&__pyx_n_s_is_windows, __pyx_k_is_windows, sizeof(__pyx_k_is_windows), 0, 0, 1, 1},
  {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {&__pyx_n_s_jacob, __pyx_k_jacob, sizeof(__pyx_k_jacob), 0, 0, 1, 1},
  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
  {&__pyx_n_u_jacobian_2, __pyx_k_jacobian_2, sizeof(__pyx_k_jacobian_2), 0, 1, 0, 1},
  {&__pyx_n_s_jacobians, __pyx_k_jacobians, sizeof(__pyx_k_jacobians), 0, 0, 1, 1},
  {&__pyx_n_s_jacobians_2, __pyx_k_jacobians_2, sizeof(__pyx_k_jacobians_2), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_keep0, __pyx_k_keep0, sizeof(__pyx_k_keep0), 0, 0, 1, 1},
  {&__pyx_n_s_keeptemp, __pyx_k_keeptemp, sizeof(__pyx_k_keeptemp), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_kwd, __pyx_k_kwd, sizeof(__pyx_k_kwd), 0, 0, 1, 1},
  {&__pyx_n_s_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 0, 1, 1},
  {&__pyx_n_s_lastaction, __pyx_k_lastaction, sizeof(__pyx_k_lastaction), 0, 0, 1, 1},
  {&__pyx_n_u_lasterror, __pyx_k_lasterror, sizeof(__pyx_k_lasterror), 0, 1, 0, 1},
  {&__pyx_n_u_lastoutput, __pyx_k_lastoutput, sizeof(__pyx_k_lastoutput), 0, 1, 0, 1},
  {&__pyx_n_s_layerCount, __pyx_k_layerCount, sizeof(__pyx_k_layerCount), 0, 0, 1, 1},
  {&__pyx_n_s_layerLength, __pyx_k_layerLength, sizeof(__pyx_k_layerLength), 0, 0, 1, 1},
  {&__pyx_n_s_lcode, __pyx_k_lcode, sizeof(__pyx_k_lcode), 0, 0, 1, 1},
  {&__pyx_n_s_lcode_codewriterC, __pyx_k_lcode_codewriterC, sizeof(__pyx_k_lcode_codewriterC), 0, 0, 1, 1},
  {&__pyx_n_s_leastsq, __pyx_k_leastsq, sizeof(__pyx_k_leastsq), 0, 0, 1, 1},
  {&__pyx_n_s_lengetter, __pyx_k_lengetter, sizeof(__pyx_k_lengetter), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_lensetter, __pyx_k_lensetter, sizeof(__pyx_k_lensetter), 0, 0, 1, 1},
  {&__pyx_n_s_lev, __pyx_k_lev, sizeof(__pyx_k_lev), 0, 0, 1, 1},
  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
  {&__pyx_n_s_leverage, __pyx_k_leverage, sizeof(__pyx_k_leverage), 0, 0, 1, 1},
  {&__pyx_n_s_leverageUsages, __pyx_k_leverageUsages, sizeof(__pyx_k_leverageUsages), 0, 0, 1, 1},
  {&__pyx_n_s_leverages, __pyx_k_leverages, sizeof(__pyx_k_leverages), 0, 0, 1, 1},
  {&__pyx_n_s_leverages_2, __pyx_k_leverages_2, sizeof(__pyx_k_leverages_2), 0, 0, 1, 1},
  {&__pyx_n_u_leverages_2, __pyx_k_leverages_2, sizeof(__pyx_k_leverages_2), 0, 1, 0, 1},
  {&__pyx_n_s_levs, __pyx_k_levs, sizeof(__pyx_k_levs), 0, 0, 1, 1},
  {&__pyx_n_s_lib, __pyx_k_lib, sizeof(__pyx_k_lib), 0, 0, 1, 1},
  {&__pyx_n_s_libname, __pyx_k_libname, sizeof(__pyx_k_libname), 0, 0, 1, 1},
  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
  {&__pyx_n_u_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 1, 0, 1},
  {&__pyx_n_s_linksCount, __pyx_k_linksCount, sizeof(__pyx_k_linksCount), 0, 0, 1, 1},
  {&__pyx_n_s_llst, __pyx_k_llst, sizeof(__pyx_k_llst), 0, 0, 1, 1},
  {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {&__pyx_n_s_loadASCIIDispersion, __pyx_k_loadASCIIDispersion, sizeof(__pyx_k_loadASCIIDispersion), 0, 0, 1, 1},
  {&__pyx_n_s_loadFromASCIIStrList, __pyx_k_loadFromASCIIStrList, sizeof(__pyx_k_loadFromASCIIStrList), 0, 0, 1, 1},
  {&__pyx_n_s_loadFromDict, __pyx_k_loadFromDict, sizeof(__pyx_k_loadFromDict), 0, 0, 1, 1},
  {&__pyx_n_s_loadNormFromASCIIStrList, __pyx_k_loadNormFromASCIIStrList, sizeof(__pyx_k_loadNormFromASCIIStrList), 0, 0, 1, 1},
  {&__pyx_n_s_loadParameters, __pyx_k_loadParameters, sizeof(__pyx_k_loadParameters), 0, 0, 1, 1},
  {&__pyx_n_s_loadTrainingData, __pyx_k_loadTrainingData, sizeof(__pyx_k_loadTrainingData), 0, 0, 1, 1},
  {&__pyx_n_s_loadWeightsASCII, __pyx_k_loadWeightsASCII, sizeof(__pyx_k_loadWeightsASCII), 0, 0, 1, 1},
  {&__pyx_n_s_loadWeightsBinary, __pyx_k_loadWeightsBinary, sizeof(__pyx_k_loadWeightsBinary), 0, 0, 1, 1},
  {&__pyx_n_s_loadWeightsXML, __pyx_k_loadWeightsXML, sizeof(__pyx_k_loadWeightsXML), 0, 0, 1, 1},
  {&__pyx_n_u_loaddatabase, __pyx_k_loaddatabase, sizeof(__pyx_k_loaddatabase), 0, 1, 0, 1},
  {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__pyx_n_s_local, __pyx_k_local, sizeof(__pyx_k_local), 0, 0, 1, 1},
  {&__pyx_n_s_locallst, __pyx_k_locallst, sizeof(__pyx_k_locallst), 0, 0, 1, 1},
  {&__pyx_n_s_locrow, __pyx_k_locrow, sizeof(__pyx_k_locrow), 0, 0, 1, 1},
  {&__pyx_n_s_longParamCount, __pyx_k_longParamCount, sizeof(__pyx_k_longParamCount), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_lparameterNames, __pyx_k_lparameterNames, sizeof(__pyx_k_lparameterNames), 0, 0, 1, 1},
  {&__pyx_n_s_ls, __pyx_k_ls, sizeof(__pyx_k_ls), 0, 0, 1, 1},
  {&__pyx_n_s_lst, __pyx_k_lst, sizeof(__pyx_k_lst), 0, 0, 1, 1},
  {&__pyx_n_s_ltrainingData, __pyx_k_ltrainingData, sizeof(__pyx_k_ltrainingData), 0, 0, 1, 1},
  {&__pyx_kp_u_m_d, __pyx_k_m_d, sizeof(__pyx_k_m_d), 0, 1, 0, 0},
  {&__pyx_n_s_maimModel, __pyx_k_maimModel, sizeof(__pyx_k_maimModel), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
  {&__pyx_n_s_mainModel, __pyx_k_mainModel, sizeof(__pyx_k_mainModel), 0, 0, 1, 1},
  {&__pyx_n_u_mainModel, __pyx_k_mainModel, sizeof(__pyx_k_mainModel), 0, 1, 0, 1},
  {&__pyx_n_s_mainModelMaster, __pyx_k_mainModelMaster, sizeof(__pyx_k_mainModelMaster), 0, 0, 1, 1},
  {&__pyx_n_s_mainfile, __pyx_k_mainfile, sizeof(__pyx_k_mainfile), 0, 0, 1, 1},
  {&__pyx_n_u_mark, __pyx_k_mark, sizeof(__pyx_k_mark), 0, 1, 0, 1},
  {&__pyx_n_s_master, __pyx_k_master, sizeof(__pyx_k_master), 0, 0, 1, 1},
  {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1},
  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
  {&__pyx_n_s_matlin, __pyx_k_matlin, sizeof(__pyx_k_matlin), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_maxcorrel, __pyx_k_maxcorrel, sizeof(__pyx_k_maxcorrel), 0, 0, 1, 1},
  {&__pyx_n_s_maxfev, __pyx_k_maxfev, sizeof(__pyx_k_maxfev), 0, 0, 1, 1},
  {&__pyx_n_s_maxi, __pyx_k_maxi, sizeof(__pyx_k_maxi), 0, 0, 1, 1},
  {&__pyx_n_s_maximum, __pyx_k_maximum, sizeof(__pyx_k_maximum), 0, 0, 1, 1},
  {&__pyx_n_s_maxindex, __pyx_k_maxindex, sizeof(__pyx_k_maxindex), 0, 0, 1, 1},
  {&__pyx_n_s_maxiter, __pyx_k_maxiter, sizeof(__pyx_k_maxiter), 0, 0, 1, 1},
  {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1},
  {&__pyx_n_s_meancorrel, __pyx_k_meancorrel, sizeof(__pyx_k_meancorrel), 0, 0, 1, 1},
  {&__pyx_n_s_mem, __pyx_k_mem, sizeof(__pyx_k_mem), 0, 0, 1, 1},
  {&__pyx_n_s_memdisp, __pyx_k_memdisp, sizeof(__pyx_k_memdisp), 0, 0, 1, 1},
  {&__pyx_n_s_memw, __pyx_k_memw, sizeof(__pyx_k_memw), 0, 0, 1, 1},
  {&__pyx_n_s_memweights, __pyx_k_memweights, sizeof(__pyx_k_memweights), 0, 0, 1, 1},
  {&__pyx_n_s_mesg, __pyx_k_mesg, sizeof(__pyx_k_mesg), 0, 0, 1, 1},
  {&__pyx_n_s_mess, __pyx_k_mess, sizeof(__pyx_k_mess), 0, 0, 1, 1},
  {&__pyx_n_s_met, __pyx_k_met, sizeof(__pyx_k_met), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_u_metaphor, __pyx_k_metaphor, sizeof(__pyx_k_metaphor), 0, 1, 0, 1},
  {&__pyx_n_s_metaphor_monal_driver__driver, __pyx_k_metaphor_monal_driver__driver, sizeof(__pyx_k_metaphor_monal_driver__driver), 0, 0, 1, 1},
  {&__pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_k_metaphor_monal_driver__driver_py, sizeof(__pyx_k_metaphor_monal_driver__driver_py), 0, 0, 1, 0},
  {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
  {&__pyx_n_s_middleoutputs, __pyx_k_middleoutputs, sizeof(__pyx_k_middleoutputs), 0, 0, 1, 1},
  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {&__pyx_n_s_mini, __pyx_k_mini, sizeof(__pyx_k_mini), 0, 0, 1, 1},
  {&__pyx_n_s_minimum, __pyx_k_minimum, sizeof(__pyx_k_minimum), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_mode_2, __pyx_k_mode_2, sizeof(__pyx_k_mode_2), 0, 0, 1, 1},
  {&__pyx_kp_u_mode_should_be_in_integrated_dir, __pyx_k_mode_should_be_in_integrated_dir, sizeof(__pyx_k_mode_should_be_in_integrated_dir), 0, 1, 0, 0},
  {&__pyx_n_s_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 0, 1, 1},
  {&__pyx_n_u_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 1, 0, 1},
  {&__pyx_n_s_modelCount, __pyx_k_modelCount, sizeof(__pyx_k_modelCount), 0, 0, 1, 1},
  {&__pyx_n_u_modelCount, __pyx_k_modelCount, sizeof(__pyx_k_modelCount), 0, 1, 0, 1},
  {&__pyx_n_s_modelData, __pyx_k_modelData, sizeof(__pyx_k_modelData), 0, 0, 1, 1},
  {&__pyx_n_u_modelName, __pyx_k_modelName, sizeof(__pyx_k_modelName), 0, 1, 0, 1},
  {&__pyx_kp_u_modelType, __pyx_k_modelType, sizeof(__pyx_k_modelType), 0, 1, 0, 0},
  {&__pyx_n_s_modelType_2, __pyx_k_modelType_2, sizeof(__pyx_k_modelType_2), 0, 0, 1, 1},
  {&__pyx_n_s_model__monalfunc, __pyx_k_model__monalfunc, sizeof(__pyx_k_model__monalfunc), 0, 0, 1, 1},
  {&__pyx_n_s_modeldata, __pyx_k_modeldata, sizeof(__pyx_k_modeldata), 0, 0, 1, 1},
  {&__pyx_n_s_modelindex, __pyx_k_modelindex, sizeof(__pyx_k_modelindex), 0, 0, 1, 1},
  {&__pyx_n_s_modelname, __pyx_k_modelname, sizeof(__pyx_k_modelname), 0, 0, 1, 1},
  {&__pyx_n_s_models, __pyx_k_models, sizeof(__pyx_k_models), 0, 0, 1, 1},
  {&__pyx_n_u_models, __pyx_k_models, sizeof(__pyx_k_models), 0, 1, 0, 1},
  {&__pyx_n_s_modeltemplate, __pyx_k_modeltemplate, sizeof(__pyx_k_modeltemplate), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_u_moduleName, __pyx_k_moduleName, sizeof(__pyx_k_moduleName), 0, 1, 0, 1},
  {&__pyx_n_s_modulename, __pyx_k_modulename, sizeof(__pyx_k_modulename), 0, 0, 1, 1},
  {&__pyx_n_u_moduletype, __pyx_k_moduletype, sizeof(__pyx_k_moduletype), 0, 1, 0, 1},
  {&__pyx_n_u_monalVersion, __pyx_k_monalVersion, sizeof(__pyx_k_monalVersion), 0, 1, 0, 1},
  {&__pyx_n_s_monalconst, __pyx_k_monalconst, sizeof(__pyx_k_monalconst), 0, 0, 1, 1},
  {&__pyx_n_s_monalfile, __pyx_k_monalfile, sizeof(__pyx_k_monalfile), 0, 0, 1, 1},
  {&__pyx_n_s_monaltoolbox, __pyx_k_monaltoolbox, sizeof(__pyx_k_monaltoolbox), 0, 0, 1, 1},
  {&__pyx_n_s_monalversion, __pyx_k_monalversion, sizeof(__pyx_k_monalversion), 0, 0, 1, 1},
  {&__pyx_n_s_mtb, __pyx_k_mtb, sizeof(__pyx_k_mtb), 0, 0, 1, 1},
  {&__pyx_n_s_mu, __pyx_k_mu, sizeof(__pyx_k_mu), 0, 0, 1, 1},
  {&__pyx_n_u_mu, __pyx_k_mu, sizeof(__pyx_k_mu), 0, 1, 0, 1},
  {&__pyx_n_s_mu_2, __pyx_k_mu_2, sizeof(__pyx_k_mu_2), 0, 0, 1, 1},
  {&__pyx_n_s_multitrain, __pyx_k_multitrain, sizeof(__pyx_k_multitrain), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_nbmulti, __pyx_k_nbmulti, sizeof(__pyx_k_nbmulti), 0, 0, 1, 1},
  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
  {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1},
  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
  {&__pyx_n_s_newaxis, __pyx_k_newaxis, sizeof(__pyx_k_newaxis), 0, 0, 1, 1},
  {&__pyx_n_s_newinputs, __pyx_k_newinputs, sizeof(__pyx_k_newinputs), 0, 0, 1, 1},
  {&__pyx_n_s_newreducedinputs, __pyx_k_newreducedinputs, sizeof(__pyx_k_newreducedinputs), 0, 0, 1, 1},
  {&__pyx_n_u_nfev, __pyx_k_nfev, sizeof(__pyx_k_nfev), 0, 1, 0, 1},
  {&__pyx_n_s_ni, __pyx_k_ni, sizeof(__pyx_k_ni), 0, 0, 1, 1},
  {&__pyx_n_s_nm, __pyx_k_nm, sizeof(__pyx_k_nm), 0, 0, 1, 1},
  {&__pyx_n_u_nn, __pyx_k_nn, sizeof(__pyx_k_nn), 0, 1, 0, 1},
  {&__pyx_n_s_nntb, __pyx_k_nntb, sizeof(__pyx_k_nntb), 0, 0, 1, 1},
  {&__pyx_n_s_nntoolbox, __pyx_k_nntoolbox, sizeof(__pyx_k_nntoolbox), 0, 0, 1, 1},
  {&__pyx_n_s_nntoolbox_dataset, __pyx_k_nntoolbox_dataset, sizeof(__pyx_k_nntoolbox_dataset), 0, 0, 1, 1},
  {&__pyx_n_s_nntoolbox_utils, __pyx_k_nntoolbox_utils, sizeof(__pyx_k_nntoolbox_utils), 0, 0, 1, 1},
  {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
  {&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1},
  {&__pyx_n_s_nodes, __pyx_k_nodes, sizeof(__pyx_k_nodes), 0, 0, 1, 1},
  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
  {&__pyx_n_s_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 0, 1, 1},
  {&__pyx_n_s_normalizeInputs, __pyx_k_normalizeInputs, sizeof(__pyx_k_normalizeInputs), 0, 0, 1, 1},
  {&__pyx_n_s_normalizeModel, __pyx_k_normalizeModel, sizeof(__pyx_k_normalizeModel), 0, 0, 1, 1},
  {&__pyx_n_s_normgrad, __pyx_k_normgrad, sizeof(__pyx_k_normgrad), 0, 0, 1, 1},
  {&__pyx_n_s_norminputgrad, __pyx_k_norminputgrad, sizeof(__pyx_k_norminputgrad), 0, 0, 1, 1},
  {&__pyx_n_s_normnode, __pyx_k_normnode, sizeof(__pyx_k_normnode), 0, 0, 1, 1},
  {&__pyx_n_s_normnodes, __pyx_k_normnodes, sizeof(__pyx_k_normnodes), 0, 0, 1, 1},
  {&__pyx_n_s_nosynapse, __pyx_k_nosynapse, sizeof(__pyx_k_nosynapse), 0, 0, 1, 1},
  {&__pyx_n_s_npcopy, __pyx_k_npcopy, sizeof(__pyx_k_npcopy), 0, 0, 1, 1},
  {&__pyx_n_s_npdouble, __pyx_k_npdouble, sizeof(__pyx_k_npdouble), 0, 0, 1, 1},
  {&__pyx_n_s_npfloat64, __pyx_k_npfloat64, sizeof(__pyx_k_npfloat64), 0, 0, 1, 1},
  {&__pyx_n_s_npint, __pyx_k_npint, sizeof(__pyx_k_npint), 0, 0, 1, 1},
  {&__pyx_n_s_npsum, __pyx_k_npsum, sizeof(__pyx_k_npsum), 0, 0, 1, 1},
  {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_s_numpy_lib_npyio, __pyx_k_numpy_lib_npyio, sizeof(__pyx_k_numpy_lib_npyio), 0, 0, 1, 1},
  {&__pyx_n_s_numpy_random, __pyx_k_numpy_random, sizeof(__pyx_k_numpy_random), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_oname, __pyx_k_oname, sizeof(__pyx_k_oname), 0, 0, 1, 1},
  {&__pyx_n_s_ones, __pyx_k_ones, sizeof(__pyx_k_ones), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_optim_bfgs, __pyx_k_optim_bfgs, sizeof(__pyx_k_optim_bfgs), 0, 0, 1, 1},
  {&__pyx_n_s_optim_leastsq, __pyx_k_optim_leastsq, sizeof(__pyx_k_optim_leastsq), 0, 0, 1, 1},
  {&__pyx_n_s_optimize, __pyx_k_optimize, sizeof(__pyx_k_optimize), 0, 0, 1, 1},
  {&__pyx_n_s_optimizer, __pyx_k_optimizer, sizeof(__pyx_k_optimizer), 0, 0, 1, 1},
  {&__pyx_n_s_optimizer_2, __pyx_k_optimizer_2, sizeof(__pyx_k_optimizer_2), 0, 0, 1, 1},
  {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
  {&__pyx_n_s_originParamCount, __pyx_k_originParamCount, sizeof(__pyx_k_originParamCount), 0, 0, 1, 1},
  {&__pyx_n_u_originParamCount_2, __pyx_k_originParamCount_2, sizeof(__pyx_k_originParamCount_2), 0, 1, 0, 1},
  {&__pyx_n_s_original, __pyx_k_original, sizeof(__pyx_k_original), 0, 0, 1, 1},
  {&__pyx_n_s_originallink, __pyx_k_originallink, sizeof(__pyx_k_originallink), 0, 0, 1, 1},
  {&__pyx_n_s_originalsavedir, __pyx_k_originalsavedir, sizeof(__pyx_k_originalsavedir), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_outCost, __pyx_k_outCost, sizeof(__pyx_k_outCost), 0, 0, 1, 1},
  {&__pyx_n_s_outGradient, __pyx_k_outGradient, sizeof(__pyx_k_outGradient), 0, 0, 1, 1},
  {&__pyx_n_s_outIndex, __pyx_k_outIndex, sizeof(__pyx_k_outIndex), 0, 0, 1, 1},
  {&__pyx_n_s_outNames, __pyx_k_outNames, sizeof(__pyx_k_outNames), 0, 0, 1, 1},
  {&__pyx_n_s_outNormModel, __pyx_k_outNormModel, sizeof(__pyx_k_outNormModel), 0, 0, 1, 1},
  {&__pyx_n_s_outProcList, __pyx_k_outProcList, sizeof(__pyx_k_outProcList), 0, 0, 1, 1},
  {&__pyx_n_s_outProcList_2, __pyx_k_outProcList_2, sizeof(__pyx_k_outProcList_2), 0, 0, 1, 1},
  {&__pyx_n_s_outResult, __pyx_k_outResult, sizeof(__pyx_k_outResult), 0, 0, 1, 1},
  {&__pyx_n_s_outResult_2, __pyx_k_outResult_2, sizeof(__pyx_k_outResult_2), 0, 0, 1, 1},
  {&__pyx_n_s_outindex, __pyx_k_outindex, sizeof(__pyx_k_outindex), 0, 0, 1, 1},
  {&__pyx_n_s_outlev, __pyx_k_outlev, sizeof(__pyx_k_outlev), 0, 0, 1, 1},
  {&__pyx_n_s_outlevs, __pyx_k_outlevs, sizeof(__pyx_k_outlevs), 0, 0, 1, 1},
  {&__pyx_n_s_outnode, __pyx_k_outnode, sizeof(__pyx_k_outnode), 0, 0, 1, 1},
  {&__pyx_n_s_outnorm, __pyx_k_outnorm, sizeof(__pyx_k_outnorm), 0, 0, 1, 1},
  {&__pyx_n_u_outnorm, __pyx_k_outnorm, sizeof(__pyx_k_outnorm), 0, 1, 0, 1},
  {&__pyx_n_u_outnorm_2, __pyx_k_outnorm_2, sizeof(__pyx_k_outnorm_2), 0, 1, 0, 1},
  {&__pyx_n_s_outproc, __pyx_k_outproc, sizeof(__pyx_k_outproc), 0, 0, 1, 1},
  {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
  {&__pyx_n_s_outputArray, __pyx_k_outputArray, sizeof(__pyx_k_outputArray), 0, 0, 1, 1},
  {&__pyx_n_s_outputCount, __pyx_k_outputCount, sizeof(__pyx_k_outputCount), 0, 0, 1, 1},
  {&__pyx_n_u_outputCount, __pyx_k_outputCount, sizeof(__pyx_k_outputCount), 0, 1, 0, 1},
  {&__pyx_n_s_outputNames, __pyx_k_outputNames, sizeof(__pyx_k_outputNames), 0, 0, 1, 1},
  {&__pyx_n_s_outputNodes, __pyx_k_outputNodes, sizeof(__pyx_k_outputNodes), 0, 0, 1, 1},
  {&__pyx_n_s_outputNorm, __pyx_k_outputNorm, sizeof(__pyx_k_outputNorm), 0, 0, 1, 1},
  {&__pyx_n_s_outputWeighting, __pyx_k_outputWeighting, sizeof(__pyx_k_outputWeighting), 0, 0, 1, 1},
  {&__pyx_n_s_outputWeighting_2, __pyx_k_outputWeighting_2, sizeof(__pyx_k_outputWeighting_2), 0, 0, 1, 1},
  {&__pyx_n_u_outputnames, __pyx_k_outputnames, sizeof(__pyx_k_outputnames), 0, 1, 0, 1},
  {&__pyx_n_s_outputnorm, __pyx_k_outputnorm, sizeof(__pyx_k_outputnorm), 0, 0, 1, 1},
  {&__pyx_n_u_outputnorm, __pyx_k_outputnorm, sizeof(__pyx_k_outputnorm), 0, 1, 0, 1},
  {&__pyx_n_s_outputnormindex, __pyx_k_outputnormindex, sizeof(__pyx_k_outputnormindex), 0, 0, 1, 1},
  {&__pyx_n_s_outputs, __pyx_k_outputs, sizeof(__pyx_k_outputs), 0, 0, 1, 1},
  {&__pyx_n_s_outputsMinMaxList, __pyx_k_outputsMinMaxList, sizeof(__pyx_k_outputsMinMaxList), 0, 0, 1, 1},
  {&__pyx_n_s_outputs_2, __pyx_k_outputs_2, sizeof(__pyx_k_outputs_2), 0, 0, 1, 1},
  {&__pyx_n_s_outputsicm, __pyx_k_outputsicm, sizeof(__pyx_k_outputsicm), 0, 0, 1, 1},
  {&__pyx_n_s_outputsicp, __pyx_k_outputsicp, sizeof(__pyx_k_outputsicp), 0, 0, 1, 1},
  {&__pyx_n_s_outputtarget, __pyx_k_outputtarget, sizeof(__pyx_k_outputtarget), 0, 0, 1, 1},
  {&__pyx_n_s_outs, __pyx_k_outs, sizeof(__pyx_k_outs), 0, 0, 1, 1},
  {&__pyx_n_s_owner, __pyx_k_owner, sizeof(__pyx_k_owner), 0, 0, 1, 1},
  {&__pyx_n_s_package, __pyx_k_package, sizeof(__pyx_k_package), 0, 0, 1, 1},
  {&__pyx_n_s_param, __pyx_k_param, sizeof(__pyx_k_param), 0, 0, 1, 1},
  {&__pyx_n_s_paramCount, __pyx_k_paramCount, sizeof(__pyx_k_paramCount), 0, 0, 1, 1},
  {&__pyx_n_u_paramCount, __pyx_k_paramCount, sizeof(__pyx_k_paramCount), 0, 1, 0, 1},
  {&__pyx_n_s_paramList, __pyx_k_paramList, sizeof(__pyx_k_paramList), 0, 0, 1, 1},
  {&__pyx_n_s_paramNames, __pyx_k_paramNames, sizeof(__pyx_k_paramNames), 0, 0, 1, 1},
  {&__pyx_n_s_parameterNames, __pyx_k_parameterNames, sizeof(__pyx_k_parameterNames), 0, 0, 1, 1},
  {&__pyx_n_u_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 1, 0, 1},
  {&__pyx_n_s_paramnames, __pyx_k_paramnames, sizeof(__pyx_k_paramnames), 0, 0, 1, 1},
  {&__pyx_n_u_paramnames, __pyx_k_paramnames, sizeof(__pyx_k_paramnames), 0, 1, 0, 1},
  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {&__pyx_n_u_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 1, 0, 1},
  {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pathmem, __pyx_k_pathmem, sizeof(__pyx_k_pathmem), 0, 0, 1, 1},
  {&__pyx_n_s_pcount, __pyx_k_pcount, sizeof(__pyx_k_pcount), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pname, __pyx_k_pname, sizeof(__pyx_k_pname), 0, 0, 1, 1},
  {&__pyx_n_s_polyType, __pyx_k_polyType, sizeof(__pyx_k_polyType), 0, 0, 1, 1},
  {&__pyx_n_s_polytype, __pyx_k_polytype, sizeof(__pyx_k_polytype), 0, 0, 1, 1},
  {&__pyx_n_s_popt, __pyx_k_popt, sizeof(__pyx_k_popt), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_press, __pyx_k_press, sizeof(__pyx_k_press), 0, 0, 1, 1},
  {&__pyx_n_s_prime, __pyx_k_prime, sizeof(__pyx_k_prime), 0, 0, 1, 1},
  {&__pyx_n_s_prime2, __pyx_k_prime2, sizeof(__pyx_k_prime2), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_print_2, __pyx_k_print_2, sizeof(__pyx_k_print_2), 0, 0, 1, 1},
  {&__pyx_n_u_progressive, __pyx_k_progressive, sizeof(__pyx_k_progressive), 0, 1, 0, 1},
  {&__pyx_n_u_projectionMatrix, __pyx_k_projectionMatrix, sizeof(__pyx_k_projectionMatrix), 0, 1, 0, 1},
  {&__pyx_n_s_propagate, __pyx_k_propagate, sizeof(__pyx_k_propagate), 0, 0, 1, 1},
  {&__pyx_n_s_propagateAndDirectGradient, __pyx_k_propagateAndDirectGradient, sizeof(__pyx_k_propagateAndDirectGradient), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_kp_u_propertyName, __pyx_k_propertyName, sizeof(__pyx_k_propertyName), 0, 1, 0, 0},
  {&__pyx_n_s_propertyName_2, __pyx_k_propertyName_2, sizeof(__pyx_k_propertyName_2), 0, 0, 1, 1},
  {&__pyx_n_s_propertyName_3, __pyx_k_propertyName_3, sizeof(__pyx_k_propertyName_3), 0, 0, 1, 1},
  {&__pyx_n_s_propertyname, __pyx_k_propertyname, sizeof(__pyx_k_propertyname), 0, 0, 1, 1},
  {&__pyx_n_u_propertyname, __pyx_k_propertyname, sizeof(__pyx_k_propertyname), 0, 1, 0, 1},
  {&__pyx_n_u_putnorm, __pyx_k_putnorm, sizeof(__pyx_k_putnorm), 0, 1, 0, 1},
  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_quiet, __pyx_k_quiet, sizeof(__pyx_k_quiet), 0, 0, 1, 1},
  {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
  {&__pyx_n_s_randn, __pyx_k_randn, sizeof(__pyx_k_randn), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_rank, __pyx_k_rank, sizeof(__pyx_k_rank), 0, 0, 1, 1},
  {&__pyx_n_s_rank_2, __pyx_k_rank_2, sizeof(__pyx_k_rank_2), 0, 0, 1, 1},
  {&__pyx_n_u_rank_2, __pyx_k_rank_2, sizeof(__pyx_k_rank_2), 0, 1, 0, 1},
  {&__pyx_n_u_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 1, 0, 1},
  {&__pyx_n_s_readlines, __pyx_k_readlines, sizeof(__pyx_k_readlines), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reducedinputs, __pyx_k_reducedinputs, sizeof(__pyx_k_reducedinputs), 0, 0, 1, 1},
  {&__pyx_n_s_reducevec, __pyx_k_reducevec, sizeof(__pyx_k_reducevec), 0, 0, 1, 1},
  {&__pyx_n_s_reprlst, __pyx_k_reprlst, sizeof(__pyx_k_reprlst), 0, 0, 1, 1},
  {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {&__pyx_n_s_res0, __pyx_k_res0, sizeof(__pyx_k_res0), 0, 0, 1, 1},
  {&__pyx_n_s_res2, __pyx_k_res2, sizeof(__pyx_k_res2), 0, 0, 1, 1},
  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
  {&__pyx_n_s_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 0, 1, 1},
  {&__pyx_n_s_residuals, __pyx_k_residuals, sizeof(__pyx_k_residuals), 0, 0, 1, 1},
  {&__pyx_n_s_residuals2, __pyx_k_residuals2, sizeof(__pyx_k_residuals2), 0, 0, 1, 1},
  {&__pyx_n_s_residualsPrime, __pyx_k_residualsPrime, sizeof(__pyx_k_residualsPrime), 0, 0, 1, 1},
  {&__pyx_n_s_resloc, __pyx_k_resloc, sizeof(__pyx_k_resloc), 0, 0, 1, 1},
  {&__pyx_n_s_restable, __pyx_k_restable, sizeof(__pyx_k_restable), 0, 0, 1, 1},
  {&__pyx_n_s_restoreParams, __pyx_k_restoreParams, sizeof(__pyx_k_restoreParams), 0, 0, 1, 1},
  {&__pyx_n_s_restoreParamsNT, __pyx_k_restoreParamsNT, sizeof(__pyx_k_restoreParamsNT), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {&__pyx_n_s_resvec, __pyx_k_resvec, sizeof(__pyx_k_resvec), 0, 0, 1, 1},
  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
  {&__pyx_n_s_reverse_train, __pyx_k_reverse_train, sizeof(__pyx_k_reverse_train), 0, 0, 1, 1},
  {&__pyx_n_s_rnd, __pyx_k_rnd, sizeof(__pyx_k_rnd), 0, 0, 1, 1},
  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
  {&__pyx_n_u_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 1, 0, 1},
  {&__pyx_n_s_rootdic, __pyx_k_rootdic, sizeof(__pyx_k_rootdic), 0, 0, 1, 1},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_u_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 1, 0, 1},
  {&__pyx_n_s_rr, __pyx_k_rr, sizeof(__pyx_k_rr), 0, 0, 1, 1},
  {&__pyx_n_s_saveDir, __pyx_k_saveDir, sizeof(__pyx_k_saveDir), 0, 0, 1, 1},
  {&__pyx_n_u_saveDir_2, __pyx_k_saveDir_2, sizeof(__pyx_k_saveDir_2), 0, 1, 0, 1},
  {&__pyx_n_s_saveModel, __pyx_k_saveModel, sizeof(__pyx_k_saveModel), 0, 0, 1, 1},
  {&__pyx_kp_u_saveModel_not_implemented_yet_wi, __pyx_k_saveModel_not_implemented_yet_wi, sizeof(__pyx_k_saveModel_not_implemented_yet_wi), 0, 1, 0, 0},
  {&__pyx_n_s_saveObj, __pyx_k_saveObj, sizeof(__pyx_k_saveObj), 0, 0, 1, 1},
  {&__pyx_n_s_saveParameters, __pyx_k_saveParameters, sizeof(__pyx_k_saveParameters), 0, 0, 1, 1},
  {&__pyx_n_s_savedir, __pyx_k_savedir, sizeof(__pyx_k_savedir), 0, 0, 1, 1},
  {&__pyx_n_s_savez_compressed, __pyx_k_savez_compressed, sizeof(__pyx_k_savez_compressed), 0, 0, 1, 1},
  {&__pyx_n_s_savingformat, __pyx_k_savingformat, sizeof(__pyx_k_savingformat), 0, 0, 1, 1},
  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
  {&__pyx_n_s_scipy, __pyx_k_scipy, sizeof(__pyx_k_scipy), 0, 0, 1, 1},
  {&__pyx_n_s_sdataCount, __pyx_k_sdataCount, sizeof(__pyx_k_sdataCount), 0, 0, 1, 1},
  {&__pyx_n_s_seed, __pyx_k_seed, sizeof(__pyx_k_seed), 0, 0, 1, 1},
  {&__pyx_n_u_seed, __pyx_k_seed, sizeof(__pyx_k_seed), 0, 1, 0, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_self_callback, __pyx_k_self_callback, sizeof(__pyx_k_self_callback), 0, 0, 1, 1},
  {&__pyx_n_s_setCallback, __pyx_k_setCallback, sizeof(__pyx_k_setCallback), 0, 0, 1, 1},
  {&__pyx_n_s_setLeverageComputation, __pyx_k_setLeverageComputation, sizeof(__pyx_k_setLeverageComputation), 0, 0, 1, 1},
  {&__pyx_n_s_setLeverageComputationOld, __pyx_k_setLeverageComputationOld, sizeof(__pyx_k_setLeverageComputationOld), 0, 0, 1, 1},
  {&__pyx_n_s_setPseudoMatrix, __pyx_k_setPseudoMatrix, sizeof(__pyx_k_setPseudoMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_setRandSeed, __pyx_k_setRandSeed, sizeof(__pyx_k_setRandSeed), 0, 0, 1, 1},
  {&__pyx_n_s_setSavingFormat, __pyx_k_setSavingFormat, sizeof(__pyx_k_setSavingFormat), 0, 0, 1, 1},
  {&__pyx_n_s_setWeights, __pyx_k_setWeights, sizeof(__pyx_k_setWeights), 0, 0, 1, 1},
  {&__pyx_n_s_setaction, __pyx_k_setaction, sizeof(__pyx_k_setaction), 0, 0, 1, 1},
  {&__pyx_n_u_setbaselen, __pyx_k_setbaselen, sizeof(__pyx_k_setbaselen), 0, 1, 0, 1},
  {&__pyx_n_u_setcallback, __pyx_k_setcallback, sizeof(__pyx_k_setcallback), 0, 1, 0, 1},
  {&__pyx_n_u_setdebugfile, __pyx_k_setdebugfile, sizeof(__pyx_k_setdebugfile), 0, 1, 0, 1},
  {&__pyx_n_u_setdirector, __pyx_k_setdirector, sizeof(__pyx_k_setdirector), 0, 1, 0, 1},
  {&__pyx_n_u_setdispersion, __pyx_k_setdispersion, sizeof(__pyx_k_setdispersion), 0, 1, 0, 1},
  {&__pyx_n_u_sethalfdispersion, __pyx_k_sethalfdispersion, sizeof(__pyx_k_sethalfdispersion), 0, 1, 0, 1},
  {&__pyx_n_u_setidentifier, __pyx_k_setidentifier, sizeof(__pyx_k_setidentifier), 0, 1, 0, 1},
  {&__pyx_n_s_setindexvalue, __pyx_k_setindexvalue, sizeof(__pyx_k_setindexvalue), 0, 0, 1, 1},
  {&__pyx_kp_u_setindexvaluenNot_implemented_ye, __pyx_k_setindexvaluenNot_implemented_ye, sizeof(__pyx_k_setindexvaluenNot_implemented_ye), 0, 1, 0, 0},
  {&__pyx_n_u_setinputnorm, __pyx_k_setinputnorm, sizeof(__pyx_k_setinputnorm), 0, 1, 0, 1},
  {&__pyx_n_s_setivalue, __pyx_k_setivalue, sizeof(__pyx_k_setivalue), 0, 0, 1, 1},
  {&__pyx_n_u_setnorm, __pyx_k_setnorm, sizeof(__pyx_k_setnorm), 0, 1, 0, 1},
  {&__pyx_n_u_setparams, __pyx_k_setparams, sizeof(__pyx_k_setparams), 0, 1, 0, 1},
  {&__pyx_n_u_setproperty, __pyx_k_setproperty, sizeof(__pyx_k_setproperty), 0, 1, 0, 1},
  {&__pyx_n_s_setrealvalue, __pyx_k_setrealvalue, sizeof(__pyx_k_setrealvalue), 0, 0, 1, 1},
  {&__pyx_kp_u_setrealvalue_not_implemented_yet, __pyx_k_setrealvalue_not_implemented_yet, sizeof(__pyx_k_setrealvalue_not_implemented_yet), 0, 1, 0, 0},
  {&__pyx_n_u_setstddev, __pyx_k_setstddev, sizeof(__pyx_k_setstddev), 0, 1, 0, 1},
  {&__pyx_n_u_settargets, __pyx_k_settargets, sizeof(__pyx_k_settargets), 0, 1, 0, 1},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_u_settrainingset, __pyx_k_settrainingset, sizeof(__pyx_k_settrainingset), 0, 1, 0, 1},
  {&__pyx_n_u_settrainstyle, __pyx_k_settrainstyle, sizeof(__pyx_k_settrainstyle), 0, 1, 0, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_shift, __pyx_k_shift, sizeof(__pyx_k_shift), 0, 0, 1, 1},
  {&__pyx_n_s_signature, __pyx_k_signature, sizeof(__pyx_k_signature), 0, 0, 1, 1},
  {&__pyx_n_s_sing, __pyx_k_sing, sizeof(__pyx_k_sing), 0, 0, 1, 1},
  {&__pyx_n_s_singular, __pyx_k_singular, sizeof(__pyx_k_singular), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_sltrainingData, __pyx_k_sltrainingData, sizeof(__pyx_k_sltrainingData), 0, 0, 1, 1},
  {&__pyx_n_u_smiles, __pyx_k_smiles, sizeof(__pyx_k_smiles), 0, 1, 0, 1},
  {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_sourceopen, __pyx_k_sourceopen, sizeof(__pyx_k_sourceopen), 0, 0, 1, 1},
  {&__pyx_n_s_sp, __pyx_k_sp, sizeof(__pyx_k_sp), 0, 0, 1, 1},
  {&__pyx_n_s_special, __pyx_k_special, sizeof(__pyx_k_special), 0, 0, 1, 1},
  {&__pyx_n_s_specialmath, __pyx_k_specialmath, sizeof(__pyx_k_specialmath), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_splitModel, __pyx_k_splitModel, sizeof(__pyx_k_splitModel), 0, 0, 1, 1},
  {&__pyx_n_s_splitlines, __pyx_k_splitlines, sizeof(__pyx_k_splitlines), 0, 0, 1, 1},
  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
  {&__pyx_n_s_squeeze, __pyx_k_squeeze, sizeof(__pyx_k_squeeze), 0, 0, 1, 1},
  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},
  {&__pyx_n_s_st_CostFuncUnknown, __pyx_k_st_CostFuncUnknown, sizeof(__pyx_k_st_CostFuncUnknown), 0, 0, 1, 1},
  {&__pyx_n_s_st_IndexErrorWithLimits, __pyx_k_st_IndexErrorWithLimits, sizeof(__pyx_k_st_IndexErrorWithLimits), 0, 0, 1, 1},
  {&__pyx_n_s_st_ModelURL, __pyx_k_st_ModelURL, sizeof(__pyx_k_st_ModelURL), 0, 0, 1, 1},
  {&__pyx_n_s_st_NeedFunctionName, __pyx_k_st_NeedFunctionName, sizeof(__pyx_k_st_NeedFunctionName), 0, 0, 1, 1},
  {&__pyx_n_s_st_REAL, __pyx_k_st_REAL, sizeof(__pyx_k_st_REAL), 0, 0, 1, 1},
  {&__pyx_n_s_st_WEIGHTS, __pyx_k_st_WEIGHTS, sizeof(__pyx_k_st_WEIGHTS), 0, 0, 1, 1},
  {&__pyx_n_s_st_XMLEncoding, __pyx_k_st_XMLEncoding, sizeof(__pyx_k_st_XMLEncoding), 0, 0, 1, 1},
  {&__pyx_n_s_st_XMLHeader, __pyx_k_st_XMLHeader, sizeof(__pyx_k_st_XMLHeader), 0, 0, 1, 1},
  {&__pyx_n_s_st_XMLSchema, __pyx_k_st_XMLSchema, sizeof(__pyx_k_st_XMLSchema), 0, 0, 1, 1},
  {&__pyx_n_s_st_XMLSchemaLoc, __pyx_k_st_XMLSchemaLoc, sizeof(__pyx_k_st_XMLSchemaLoc), 0, 0, 1, 1},
  {&__pyx_n_s_st_XMLStyleSheet, __pyx_k_st_XMLStyleSheet, sizeof(__pyx_k_st_XMLStyleSheet), 0, 0, 1, 1},
  {&__pyx_n_s_st_XMLVersion, __pyx_k_st_XMLVersion, sizeof(__pyx_k_st_XMLVersion), 0, 0, 1, 1},
  {&__pyx_n_s_st_normName, __pyx_k_st_normName, sizeof(__pyx_k_st_normName), 0, 0, 1, 1},
  {&__pyx_n_s_st_version, __pyx_k_st_version, sizeof(__pyx_k_st_version), 0, 0, 1, 1},
  {&__pyx_n_s_st_xmlns_xsi, __pyx_k_st_xmlns_xsi, sizeof(__pyx_k_st_xmlns_xsi), 0, 0, 1, 1},
  {&__pyx_n_s_startWeights, __pyx_k_startWeights, sizeof(__pyx_k_startWeights), 0, 0, 1, 1},
  {&__pyx_n_s_startw, __pyx_k_startw, sizeof(__pyx_k_startw), 0, 0, 1, 1},
  {&__pyx_n_s_statelayer, __pyx_k_statelayer, sizeof(__pyx_k_statelayer), 0, 0, 1, 1},
  {&__pyx_n_s_statenodeindex, __pyx_k_statenodeindex, sizeof(__pyx_k_statenodeindex), 0, 0, 1, 1},
  {&__pyx_n_s_std, __pyx_k_std, sizeof(__pyx_k_std), 0, 0, 1, 1},
  {&__pyx_n_s_stddev, __pyx_k_stddev, sizeof(__pyx_k_stddev), 0, 0, 1, 1},
  {&__pyx_n_u_stddev, __pyx_k_stddev, sizeof(__pyx_k_stddev), 0, 1, 0, 1},
  {&__pyx_n_u_stddev_2, __pyx_k_stddev_2, sizeof(__pyx_k_stddev_2), 0, 1, 0, 1},
  {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
  {&__pyx_n_s_stds, __pyx_k_stds, sizeof(__pyx_k_stds), 0, 0, 1, 1},
  {&__pyx_n_s_stdtrain, __pyx_k_stdtrain, sizeof(__pyx_k_stdtrain), 0, 0, 1, 1},
  {&__pyx_n_u_stdtrain_2, __pyx_k_stdtrain_2, sizeof(__pyx_k_stdtrain_2), 0, 1, 0, 1},
  {&__pyx_n_s_stdtrit, __pyx_k_stdtrit, sizeof(__pyx_k_stdtrit), 0, 0, 1, 1},
  {&__pyx_n_s_strainingData, __pyx_k_strainingData, sizeof(__pyx_k_strainingData), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_u_student, __pyx_k_student, sizeof(__pyx_k_student), 0, 1, 0, 1},
  {&__pyx_n_s_student95, __pyx_k_student95, sizeof(__pyx_k_student95), 0, 0, 1, 1},
  {&__pyx_kp_u_student_variable_computation_not, __pyx_k_student_variable_computation_not, sizeof(__pyx_k_student_variable_computation_not), 0, 1, 0, 0},
  {&__pyx_n_s_students, __pyx_k_students, sizeof(__pyx_k_students), 0, 0, 1, 1},
  {&__pyx_n_s_studentvariable, __pyx_k_studentvariable, sizeof(__pyx_k_studentvariable), 0, 0, 1, 1},
  {&__pyx_n_u_studentvariable_2, __pyx_k_studentvariable_2, sizeof(__pyx_k_studentvariable_2), 0, 1, 0, 1},
  {&__pyx_n_s_stval, __pyx_k_stval, sizeof(__pyx_k_stval), 0, 0, 1, 1},
  {&__pyx_n_s_style, __pyx_k_style, sizeof(__pyx_k_style), 0, 0, 1, 1},
  {&__pyx_n_s_style0, __pyx_k_style0, sizeof(__pyx_k_style0), 0, 0, 1, 1},
  {&__pyx_n_s_stylePos, __pyx_k_stylePos, sizeof(__pyx_k_stylePos), 0, 0, 1, 1},
  {&__pyx_n_s_subkey, __pyx_k_subkey, sizeof(__pyx_k_subkey), 0, 0, 1, 1},
  {&__pyx_n_s_subval, __pyx_k_subval, sizeof(__pyx_k_subval), 0, 0, 1, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_suseOriginal, __pyx_k_suseOriginal, sizeof(__pyx_k_suseOriginal), 0, 0, 1, 1},
  {&__pyx_n_s_synapseCount, __pyx_k_synapseCount, sizeof(__pyx_k_synapseCount), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_tab, __pyx_k_tab, sizeof(__pyx_k_tab), 0, 0, 1, 1},
  {&__pyx_n_s_tagname, __pyx_k_tagname, sizeof(__pyx_k_tagname), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_targets, __pyx_k_targets, sizeof(__pyx_k_targets), 0, 0, 1, 1},
  {&__pyx_n_u_targets, __pyx_k_targets, sizeof(__pyx_k_targets), 0, 1, 0, 1},
  {&__pyx_n_s_tb, __pyx_k_tb, sizeof(__pyx_k_tb), 0, 0, 1, 1},
  {&__pyx_n_s_tempdir, __pyx_k_tempdir, sizeof(__pyx_k_tempdir), 0, 0, 1, 1},
  {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
  {&__pyx_n_s_text_type, __pyx_k_text_type, sizeof(__pyx_k_text_type), 0, 0, 1, 1},
  {&__pyx_n_s_tf, __pyx_k_tf, sizeof(__pyx_k_tf), 0, 0, 1, 1},
  {&__pyx_n_s_tg, __pyx_k_tg, sizeof(__pyx_k_tg), 0, 0, 1, 1},
  {&__pyx_n_s_titles, __pyx_k_titles, sizeof(__pyx_k_titles), 0, 0, 1, 1},
  {&__pyx_n_s_toFullXML, __pyx_k_toFullXML, sizeof(__pyx_k_toFullXML), 0, 0, 1, 1},
  {&__pyx_n_s_toolbox, __pyx_k_toolbox, sizeof(__pyx_k_toolbox), 0, 0, 1, 1},
  {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
  {&__pyx_n_s_train, __pyx_k_train, sizeof(__pyx_k_train), 0, 0, 1, 1},
  {&__pyx_n_u_train, __pyx_k_train, sizeof(__pyx_k_train), 0, 1, 0, 1},
  {&__pyx_n_s_trainable, __pyx_k_trainable, sizeof(__pyx_k_trainable), 0, 0, 1, 1},
  {&__pyx_n_s_trainable_2, __pyx_k_trainable_2, sizeof(__pyx_k_trainable_2), 0, 0, 1, 1},
  {&__pyx_n_u_trainbase, __pyx_k_trainbase, sizeof(__pyx_k_trainbase), 0, 1, 0, 1},
  {&__pyx_n_u_trainex, __pyx_k_trainex, sizeof(__pyx_k_trainex), 0, 1, 0, 1},
  {&__pyx_n_s_trainingData, __pyx_k_trainingData, sizeof(__pyx_k_trainingData), 0, 0, 1, 1},
  {&__pyx_n_s_trainingResults, __pyx_k_trainingResults, sizeof(__pyx_k_trainingResults), 0, 0, 1, 1},
  {&__pyx_n_u_trainingResults_2, __pyx_k_trainingResults_2, sizeof(__pyx_k_trainingResults_2), 0, 1, 0, 1},
  {&__pyx_n_s_trainingStDev, __pyx_k_trainingStDev, sizeof(__pyx_k_trainingStDev), 0, 0, 1, 1},
  {&__pyx_n_s_trainingStddev, __pyx_k_trainingStddev, sizeof(__pyx_k_trainingStddev), 0, 0, 1, 1},
  {&__pyx_n_s_trainstyle, __pyx_k_trainstyle, sizeof(__pyx_k_trainstyle), 0, 0, 1, 1},
  {&__pyx_n_s_transfer, __pyx_k_transfer, sizeof(__pyx_k_transfer), 0, 0, 1, 1},
  {&__pyx_n_u_transfer, __pyx_k_transfer, sizeof(__pyx_k_transfer), 0, 1, 0, 1},
  {&__pyx_n_s_transferAndDirectGradient, __pyx_k_transferAndDirectGradient, sizeof(__pyx_k_transferAndDirectGradient), 0, 0, 1, 1},
  {&__pyx_n_s_transferCI, __pyx_k_transferCI, sizeof(__pyx_k_transferCI), 0, 0, 1, 1},
  {&__pyx_n_s_transferCIOld, __pyx_k_transferCIOld, sizeof(__pyx_k_transferCIOld), 0, 0, 1, 1},
  {&__pyx_n_s_transferEx, __pyx_k_transferEx, sizeof(__pyx_k_transferEx), 0, 0, 1, 1},
  {&__pyx_n_s_transferExtra, __pyx_k_transferExtra, sizeof(__pyx_k_transferExtra), 0, 0, 1, 1},
  {&__pyx_n_s_transferExtraCI, __pyx_k_transferExtraCI, sizeof(__pyx_k_transferExtraCI), 0, 0, 1, 1},
  {&__pyx_n_s_transferLeverages, __pyx_k_transferLeverages, sizeof(__pyx_k_transferLeverages), 0, 0, 1, 1},
  {&__pyx_n_s_transferOld, __pyx_k_transferOld, sizeof(__pyx_k_transferOld), 0, 0, 1, 1},
  {&__pyx_n_u_transfergradient, __pyx_k_transfergradient, sizeof(__pyx_k_transfergradient), 0, 1, 0, 1},
  {&__pyx_n_s_transfergradientindex, __pyx_k_transfergradientindex, sizeof(__pyx_k_transfergradientindex), 0, 0, 1, 1},
  {&__pyx_n_u_transfergradientindex, __pyx_k_transfergradientindex, sizeof(__pyx_k_transfergradientindex), 0, 1, 0, 1},
  {&__pyx_n_s_transferindex, __pyx_k_transferindex, sizeof(__pyx_k_transferindex), 0, 0, 1, 1},
  {&__pyx_n_u_transferindex, __pyx_k_transferindex, sizeof(__pyx_k_transferindex), 0, 1, 0, 1},
  {&__pyx_n_u_transferleverage, __pyx_k_transferleverage, sizeof(__pyx_k_transferleverage), 0, 1, 0, 1},
  {&__pyx_n_u_transferleverage2, __pyx_k_transferleverage2, sizeof(__pyx_k_transferleverage2), 0, 1, 0, 1},
  {&__pyx_n_u_transferleverageex, __pyx_k_transferleverageex, sizeof(__pyx_k_transferleverageex), 0, 1, 0, 1},
  {&__pyx_n_u_transferprime, __pyx_k_transferprime, sizeof(__pyx_k_transferprime), 0, 1, 0, 1},
  {&__pyx_n_s_trueGradList, __pyx_k_trueGradList, sizeof(__pyx_k_trueGradList), 0, 0, 1, 1},
  {&__pyx_n_s_trueName, __pyx_k_trueName, sizeof(__pyx_k_trueName), 0, 0, 1, 1},
  {&__pyx_n_s_unnormalizeOutputs, __pyx_k_unnormalizeOutputs, sizeof(__pyx_k_unnormalizeOutputs), 0, 0, 1, 1},
  {&__pyx_n_s_usageleverages, __pyx_k_usageleverages, sizeof(__pyx_k_usageleverages), 0, 0, 1, 1},
  {&__pyx_n_u_use, __pyx_k_use, sizeof(__pyx_k_use), 0, 1, 0, 1},
  {&__pyx_n_s_useLongParams, __pyx_k_useLongParams, sizeof(__pyx_k_useLongParams), 0, 0, 1, 1},
  {&__pyx_n_s_useOriginal, __pyx_k_useOriginal, sizeof(__pyx_k_useOriginal), 0, 0, 1, 1},
  {&__pyx_n_s_util, __pyx_k_util, sizeof(__pyx_k_util), 0, 0, 1, 1},
  {&__pyx_n_s_util_const_st, __pyx_k_util_const_st, sizeof(__pyx_k_util_const_st), 0, 0, 1, 1},
  {&__pyx_n_s_util_leverage, __pyx_k_util_leverage, sizeof(__pyx_k_util_leverage), 0, 0, 1, 1},
  {&__pyx_n_s_util_monalbase, __pyx_k_util_monalbase, sizeof(__pyx_k_util_monalbase), 0, 0, 1, 1},
  {&__pyx_n_s_util_utils, __pyx_k_util_utils, sizeof(__pyx_k_util_utils), 0, 0, 1, 1},
  {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_valelmt, __pyx_k_valelmt, sizeof(__pyx_k_valelmt), 0, 0, 1, 1},
  {&__pyx_n_s_valloc, __pyx_k_valloc, sizeof(__pyx_k_valloc), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_valueid, __pyx_k_valueid, sizeof(__pyx_k_valueid), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_vclass, __pyx_k_vclass, sizeof(__pyx_k_vclass), 0, 0, 1, 1},
  {&__pyx_n_s_vec, __pyx_k_vec, sizeof(__pyx_k_vec), 0, 0, 1, 1},
  {&__pyx_n_s_vecPrime, __pyx_k_vecPrime, sizeof(__pyx_k_vecPrime), 0, 0, 1, 1},
  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1},
  {&__pyx_n_s_warnflag, __pyx_k_warnflag, sizeof(__pyx_k_warnflag), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 0, 0, 1, 1},
  {&__pyx_n_s_weightloc, __pyx_k_weightloc, sizeof(__pyx_k_weightloc), 0, 0, 1, 1},
  {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
  {&__pyx_n_u_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 1, 0, 1},
  {&__pyx_n_s_weights_2, __pyx_k_weights_2, sizeof(__pyx_k_weights_2), 0, 0, 1, 1},
  {&__pyx_n_u_weights_2, __pyx_k_weights_2, sizeof(__pyx_k_weights_2), 0, 1, 0, 1},
  {&__pyx_n_u_weights_3, __pyx_k_weights_3, sizeof(__pyx_k_weights_3), 0, 1, 0, 1},
  {&__pyx_n_s_wformat, __pyx_k_wformat, sizeof(__pyx_k_wformat), 0, 0, 1, 1},
  {&__pyx_n_s_withCI, __pyx_k_withCI, sizeof(__pyx_k_withCI), 0, 0, 1, 1},
  {&__pyx_n_s_withlev, __pyx_k_withlev, sizeof(__pyx_k_withlev), 0, 0, 1, 1},
  {&__pyx_n_s_wname, __pyx_k_wname, sizeof(__pyx_k_wname), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_writeCostFunction, __pyx_k_writeCostFunction, sizeof(__pyx_k_writeCostFunction), 0, 0, 1, 1},
  {&__pyx_n_s_wused, __pyx_k_wused, sizeof(__pyx_k_wused), 0, 0, 1, 1},
  {&__pyx_n_s_ww, __pyx_k_ww, sizeof(__pyx_k_ww), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 0, 0, 1, 1},
  {&__pyx_n_u_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 0, 1, 0, 1},
  {&__pyx_n_s_xmlText, __pyx_k_xmlText, sizeof(__pyx_k_xmlText), 0, 0, 1, 1},
  {&__pyx_n_s_xml_etree_cElementTree, __pyx_k_xml_etree_cElementTree, sizeof(__pyx_k_xml_etree_cElementTree), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) __PYX_ERR(0, 80, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 204, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 3202, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 85, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 147, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 196, __pyx_L1_error)
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 410, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 506, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 594, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 663, __pyx_L1_error)
  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 695, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1675, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 2064, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "metaphor/monal/driver/_driver.py":147
 * 
 *     def __init__(self, verbose=0):
 *         super(DriverBase, self).__init__(None)             # <<<<<<<<<<<<<<
 *         self.verbose = verbose
 *         self_callback = None
 */
  __pyx_tuple_ = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "metaphor/monal/driver/_driver.py":264
 *                 if local and (int(local.attrib["count"]) == self.paramCount):
 *                     res = True
 *                     vclass = local.attrib.get("class", "")             # <<<<<<<<<<<<<<
 *                     if vclass == "RealByteVector":
 *                         for element in local.getchildren():
 */
  __pyx_tuple__3 = PyTuple_Pack(2, __pyx_n_u_class, __pyx_kp_u__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "metaphor/monal/driver/_driver.py":267
 *                     if vclass == "RealByteVector":
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))             # <<<<<<<<<<<<<<
 *                             valelmt = element.find(cst.st_REAL)
 *                             if valelmt is not None:
 */
  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_n_u_row, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "metaphor/monal/driver/_driver.py":274
 *                     elif vclass == "RealVector" :
 *                         for element in local.getchildren():
 *                             row = int(element.attrib.get("row", 0))             # <<<<<<<<<<<<<<
 *                             value = nntb.floatEx(element.text)
 *                             self.weights[row] = value
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_u_row, __pyx_int_0); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "metaphor/monal/driver/_driver.py":349
 *                         for subkey, subval in rootdic.items():
 *                             if subkey == "inputnames":
 *                                 inputnamelist = subval.split(',')             # <<<<<<<<<<<<<<
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.inputNames[indloc] = valloc
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u__6); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "metaphor/monal/driver/_driver.py":353
 *                                     self.mainModel.inputNames[indloc] = valloc
 *                             elif subkey == "outputnames":
 *                                 inputnamelist = subval.split(',')             # <<<<<<<<<<<<<<
 *                                 for indloc, valloc in enumerate(inputnamelist):
 *                                     self.mainModel.outputNames[indloc] = valloc
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u__6); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "metaphor/monal/driver/_driver.py":375
 *                 self._studentvariable = mtb.InverseStudent(0.95, self.baselen-self.paramCount)
 *             if (inputnorm is not None) and isinstance(inputnorm, text_type):
 *                 inputnorm = [float(val) for val in inputnorm.split(";")]             # <<<<<<<<<<<<<<
 *             self.inputnorm = inputnorm
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u__9); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "metaphor/monal/driver/_driver.py":378
 *             self.inputnorm = inputnorm
 *             if (outputnorm is not None) and isinstance(outputnorm, text_type):
 *                 outputnorm = [float(val) for val in outputnorm.split(";")]             # <<<<<<<<<<<<<<
 *             self.outputnorm = outputnorm
 *             self.weights = params
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u__9); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "metaphor/monal/driver/_driver.py":399
 *             if isinstance(source, NpzFile):
 *                 return self.loadFromDict(source)
 *             with load(source, allow_pickle=True) as sourceopen:             # <<<<<<<<<<<<<<
 *                 res = self.loadFromDict(sourceopen)
 *             return res
 */
  __pyx_tuple__12 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "metaphor/monal/driver/_driver.py":410
 *         try:
 *             if os.path.exists(source):
 *                 with open(source) as ff:             # <<<<<<<<<<<<<<
 *                     lst = ff.readlines()
 *             else:
 */
  __pyx_tuple__13 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "metaphor/monal/driver/_driver.py":413
 *                     lst = ff.readlines()
 *             else:
 *                 lst = source.splitlines(False)             # <<<<<<<<<<<<<<
 *         except:
 *             lst = None
 */
  __pyx_tuple__14 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "metaphor/monal/driver/_driver.py":424
 *                 st = lst[ind].strip()
 *                 if (len(st) > 1) and (st[0]=="#"):
 *                     self.propertyName = st[1:].strip()             # <<<<<<<<<<<<<<
 *                     ind += 1
 *                     if ind < len(lst):
 */
  __pyx_slice__16 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__16);
  __Pyx_GIVEREF(__pyx_slice__16);

  /* "metaphor/monal/driver/_driver.py":493
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase
 *         outnorm = zeros((2,))             # <<<<<<<<<<<<<<
 *         for _ in range(2):
 *             st = lst[index]
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_tuple__17); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "metaphor/monal/driver/_driver.py":497
 *             st = lst[index]
 *             index += 1
 *             (oname, value) = tuple(st.split(";"))             # <<<<<<<<<<<<<<
 *             if oname == "Pi":
 *                 outnorm[0] = nntb.floatEx(value)
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u__9); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "metaphor/monal/driver/_driver.py":519
 *         wformat = []
 *         st= lst[index]
 *         llst = st.split('=')             # <<<<<<<<<<<<<<
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u__20); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "metaphor/monal/driver/_driver.py":526
 *             for row in range(dim):
 *                 st = lst[index + row]
 *                 locallst = st.strip().split(";")             # <<<<<<<<<<<<<<
 *                 if mtb.isStrNum(locallst[0]):
 *                     try:
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u__9); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "metaphor/monal/driver/_driver.py":554
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]
 *         llst = st.split('=')             # <<<<<<<<<<<<<<
 *         if llst[0].strip().lower() == "count":
 *             dim = int(llst[1].strip())
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u__20); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "metaphor/monal/driver/_driver.py":622
 *         targets = self.gettargets()  #mainModule.
 *         residuals = out - targets
 *         restable[:, self.inputCount] = targets             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + self.outputCount] = out
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 */
  __pyx_slice__24 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__24);
  __Pyx_GIVEREF(__pyx_slice__24);

  /* "metaphor/monal/driver/_driver.py":623
 *         residuals = out - targets
 *         restable[:, self.inputCount] = targets
 *         restable[:, self.inputCount + self.outputCount] = out             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 */
  __pyx_slice__25 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);

  /* "metaphor/monal/driver/_driver.py":624
 *         restable[:, self.inputCount] = targets
 *         restable[:, self.inputCount + self.outputCount] = out
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2
 */
  __pyx_slice__26 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__26);
  __Pyx_GIVEREF(__pyx_slice__26);

  /* "metaphor/monal/driver/_driver.py":625
 *         restable[:, self.inputCount + self.outputCount] = out
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals             # <<<<<<<<<<<<<<
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2
 *         return restable, jacob
 */
  __pyx_slice__27 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__27);
  __Pyx_GIVEREF(__pyx_slice__27);

  /* "metaphor/monal/driver/_driver.py":626
 *         restable[:, self.inputCount + 2*self.outputCount] = leverages
 *         restable[:, self.inputCount + 3*self.outputCount] = residuals
 *         restable[:, self.inputCount + 4*self.outputCount] = residuals**2             # <<<<<<<<<<<<<<
 *         return restable, jacob
 * 
 */
  __pyx_slice__28 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__28)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__28);
  __Pyx_GIVEREF(__pyx_slice__28);

  /* "metaphor/monal/driver/_driver.py":673
 *             except: pass
 *         #leverageUsages = self.computeUsageLeverages(curw)
 *         correl = corrcoef(outputs, self.gettargets())[0,1]             # <<<<<<<<<<<<<<
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 */
  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "metaphor/monal/driver/_driver.py":829
 * 
 *         #correlflat.index(maxcorrel)
 *         correl = corrcoef(outputs, self.gettargets())[0,1]             # <<<<<<<<<<<<<<
 * 
 *         results[C.TCR_COST] = math.sqrt(cost/N)
 */
  __pyx_tuple__30 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "metaphor/monal/driver/_driver.py":951
 *                     if self.propertyName:
 *                         ff.write("#{0}\n".format(self.propertyName))
 *                     ff.write("weights\n")             # <<<<<<<<<<<<<<
 *                     ff.write("count={0}\n".format(self.paramCount))
 *                     for nm, val in zip(self.parameterNames, self.weights):
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_u_weights_3); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "metaphor/monal/driver/_driver.py":956
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if not self.inputnorm is None:
 *                         ff.write("outnorm\n")             # <<<<<<<<<<<<<<
 *                         for norm in self.inputnorm:
 *                             for nm, val in zip(("Pi", "Sigma"), norm):
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_u_outnorm_2); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "metaphor/monal/driver/_driver.py":958
 *                         ff.write("outnorm\n")
 *                         for norm in self.inputnorm:
 *                             for nm, val in zip(("Pi", "Sigma"), norm):             # <<<<<<<<<<<<<<
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 * 
 */
  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_u_Pi, __pyx_n_u_Sigma); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "metaphor/monal/driver/_driver.py":961
 *                                 ff.write("{0};{1:18.15g}\n".format(nm, val))
 * 
 *                     ff.write("outnorm\n")             # <<<<<<<<<<<<<<
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_u_outnorm_2); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "metaphor/monal/driver/_driver.py":962
 * 
 *                     ff.write("outnorm\n")
 *                     for nm, val in zip(("Pi", "Sigma"), self.outputnorm):             # <<<<<<<<<<<<<<
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:
 */
  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_u_Pi, __pyx_n_u_Sigma); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "metaphor/monal/driver/_driver.py":965
 *                         ff.write("{0};{1:18.15g}\n".format(nm, val))
 *                     if self._baselen:
 *                         ff.write("baselen\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{0}".format(self._baselen))
 *                     #===========================================================
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_u_baselen_3); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "metaphor/monal/driver/_driver.py":973
 *                     #===========================================================
 *                     if self._stdtrain:
 *                         ff.write("stddev\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_u_stddev_2); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "metaphor/monal/driver/_driver.py":977
 *                     if (self._halfDispersionMatrix is not None) and (self._halfDispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension
 *                         ff.write("halfdispersion\n")             # <<<<<<<<<<<<<<
 *                         ff.write("count={0}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_u_halfdispersion_2); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "metaphor/monal/driver/_driver.py":945
 *                 stddev=self._stdtrain, halfdispersion=None, dispersion=self._dispersionMatrix)
 *         else:
 *             with open(filename, "w") as ff:             # <<<<<<<<<<<<<<
 *                 if savingformat != C.SF_ASCII:
 *                     saveObj(ff, self.weights, savingformat)  # a revoir insuffisant
 */
  __pyx_tuple__39 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "metaphor/monal/driver/_driver.py":1083
 *                 self.normalizeModel()
 *                 if verbose >= 3:
 *                     sys.stderr.write('Information: data normalized\n')             # <<<<<<<<<<<<<<
 *         if weights:
 *             self.loadParameters(weights)
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Information_data_normalized); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "metaphor/monal/driver/_driver.py":1220
 *                 if savingformat == C.SF_ASCII:
 *                     if self._baselen:
 *                         ff.write("baselen\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{}\n".format(self._baselen))
 *                     #===========================================================
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_u_baselen_3); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "metaphor/monal/driver/_driver.py":1228
 *                     #===========================================================
 *                     if self._stdtrain:
 *                         ff.write("stddev\n")             # <<<<<<<<<<<<<<
 *                         ff.write("{0:18.15g}\n".format(self._stdtrain))
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_u_stddev_2); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "metaphor/monal/driver/_driver.py":1232
 *                     if (self._dispersionMatrix is not None) and (self._dispersionMatrix.shape[0] == self.dimension):
 *                         N = self.dimension
 *                         ff.write("dispersion\n")             # <<<<<<<<<<<<<<
 *                         ff.write("count={}\n".format(N*(N+1)/2))
 *                         for i in range(self.dimension):
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_n_u_dispersion_2); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "metaphor/monal/driver/_driver.py":1216
 *                 stddev=self._stdtrain, halfdispersion=None)  #self._halfDispersionMatrix
 *         elif savingformat in [C.SF_XML, C.SF_ASCII, C.SF_JSON]:  #, C.SF_BINARY
 *             with open(filename, "w") as ff:             # <<<<<<<<<<<<<<
 *                 self.mainModel.doSaveParameters(ff, savingformat)
 *                 if savingformat == C.SF_ASCII:
 */
  __pyx_tuple__45 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "metaphor/monal/driver/_driver.py":1280
 * 
 *     def setrealvalue(self, style, index, value):  # Driver
 *         raise NotImplementedError("setrealvalue not implemented yet")             # <<<<<<<<<<<<<<
 * 
 *     def setindexvalue(self, style, index, value):  # Driver
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_setrealvalue_not_implemented_yet); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "metaphor/monal/driver/_driver.py":1283
 * 
 *     def setindexvalue(self, style, index, value):  # Driver
 *         raise NotImplementedError("setindexvaluenNot implemented yet")             # <<<<<<<<<<<<<<
 * 
 *     def splitModel(self, source):  # Driver
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_setindexvaluenNot_implemented_ye); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "metaphor/monal/driver/_driver.py":1369
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")             # <<<<<<<<<<<<<<
 *         if datasource is None and dataset is None:
 *             raise MonalError ("Either file source or dataset needs not to be None")
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Either_file_source_or_dataset_bu); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "metaphor/monal/driver/_driver.py":1371
 *             raise MonalError ("Either file source or dataset but not both")
 *         if datasource is None and dataset is None:
 *             raise MonalError ("Either file source or dataset needs not to be None")             # <<<<<<<<<<<<<<
 *         if datasource is not None:
 *             if isinstance(datasource, DataManager):
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Either_file_source_or_dataset_ne); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "metaphor/monal/driver/_driver.py":1379
 *             elif isinstance(datasource, str):
 *                 if os.path.exists(datasource):
 *                     with open(datasource, "r") as ff:             # <<<<<<<<<<<<<<
 *                         dataset = DataManager(datasource=ff)
 *                 else:
 */
  __pyx_tuple__50 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "metaphor/monal/driver/_driver.py":1390
 *             dataformat = list(range(ni + no))
 *         elif len(dataformat) < ni + no:
 *             raise MonalError("Incorrect dataformat")             # <<<<<<<<<<<<<<
 *         if (self._dataArray is None):
 *             self.dataCount = dataset.length
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Incorrect_dataformat); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "metaphor/monal/driver/_driver.py":1424
 *                 value = nntb.floatEx(stval)
 *                 self._dataArray[il, j] = value
 *         self._inputArray = self._dataArray[:, :ni]             # <<<<<<<<<<<<<<
 *         self._outputArray = self._dataArray[:, ni:ni + no]
 *         if normalize:
 */
  __pyx_slice__52 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__52)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__52);
  __Pyx_GIVEREF(__pyx_slice__52);

  /* "metaphor/monal/driver/_driver.py":1425
 *                 self._dataArray[il, j] = value
 *         self._inputArray = self._dataArray[:, :ni]
 *         self._outputArray = self._dataArray[:, ni:ni + no]             # <<<<<<<<<<<<<<
 *         if normalize:
 *             self.normalizeModel()
 */
  __pyx_slice__53 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__53)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);

  /* "metaphor/monal/driver/_driver.py":1428
 *         if normalize:
 *             self.normalizeModel()
 *             computelevel = self._getComputeCondition(1, None)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__54 = PyTuple_Pack(2, __pyx_int_1, Py_None); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "metaphor/monal/driver/_driver.py":1436
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 *         self._outputArray = self._dataArray[:, ni:ni + no]             # <<<<<<<<<<<<<<
 *         self._met = None
 *         if self.inNormModel:
 */
  __pyx_slice__55 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__55);
  __Pyx_GIVEREF(__pyx_slice__55);

  /* "metaphor/monal/driver/_driver.py":1439
 *         self._met = None
 *         if self.inNormModel:
 *             self._inputArray = self._dataArray[:ni, :]             # <<<<<<<<<<<<<<
 *             for ind, value in enumerate(self.inNormModel.inputNames):
 *                 self.mainModel.inputNames[ind] = value
 */
  __pyx_slice__56 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__56);
  __Pyx_GIVEREF(__pyx_slice__56);

  /* "metaphor/monal/driver/_driver.py":1445
 * 
 *         if self.outNormModel:
 *             self._inputArray = self._dataArray[:ni, :]             # <<<<<<<<<<<<<<
 *             for ind, value in enumerate(self.outNormModel.outputNames):
 *                 self.mainModel.outputNames[ind] = value
 */
  __pyx_slice__57 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__57);
  __Pyx_GIVEREF(__pyx_slice__57);

  /* "metaphor/monal/driver/_driver.py":1458
 * 
 *         if self._dataArray is None:
 *             result[:, 1] += 1             # <<<<<<<<<<<<<<
 *         else:
 *             self._dataArray.std(axis=0, out=result[:, 0])
 */
  __pyx_slice__58 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__58)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__58);
  __Pyx_GIVEREF(__pyx_slice__58);
  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_slice__58, __pyx_int_1); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "metaphor/monal/driver/_driver.py":1460
 *             result[:, 1] += 1
 *         else:
 *             self._dataArray.std(axis=0, out=result[:, 0])             # <<<<<<<<<<<<<<
 *             self._dataArray.mean(axis=0, out=result[:, 1])
 * 
 */
  __pyx_slice__60 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__60)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__60);
  __Pyx_GIVEREF(__pyx_slice__60);
  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_slice__60, __pyx_int_0); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "metaphor/monal/driver/_driver.py":1461
 *         else:
 *             self._dataArray.std(axis=0, out=result[:, 0])
 *             self._dataArray.mean(axis=0, out=result[:, 1])             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
  __pyx_slice__62 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__62);
  __Pyx_GIVEREF(__pyx_slice__62);
  __pyx_tuple__63 = PyTuple_Pack(2, __pyx_slice__62, __pyx_int_1); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "metaphor/monal/driver/_driver.py":1529
 *         self._met = self.getNomalizingMatrixFromData()
 *         if scale != 1:
 *             self._met[:, 1] *= scale             # <<<<<<<<<<<<<<
 *         if shift:
 *             self._met[:, 0] += shift
 */
  __pyx_slice__64 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__64)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__64);
  __Pyx_GIVEREF(__pyx_slice__64);
  __pyx_tuple__65 = PyTuple_Pack(2, __pyx_slice__64, __pyx_int_1); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "metaphor/monal/driver/_driver.py":1531
 *             self._met[:, 1] *= scale
 *         if shift:
 *             self._met[:, 0] += shift             # <<<<<<<<<<<<<<
 *         ni = self.mainModel.inputCount
 *         no = self.mainModel.outputCount
 */
  __pyx_slice__66 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__66)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__66);
  __Pyx_GIVEREF(__pyx_slice__66);
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_slice__66, __pyx_int_0); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "metaphor/monal/driver/_driver.py":1560
 *             if inputnormindex > 0:
 *                 self.inNormModel = Normalizer(self.mainModel,
 *                     data= self._met[:ni:, :],             # <<<<<<<<<<<<<<
 *                     inNames=(self.mainModel.inputNames),
 *                     outNames=[cst.st_normName % name for name in self.mainModel.inputNames],
 */
  __pyx_slice__68 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__68)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__68);
  __Pyx_GIVEREF(__pyx_slice__68);

  /* "metaphor/monal/driver/_driver.py":1568
 *                 self._inputArray = zeros((nd, ni))
 *                 for ind in range(ni):
 *                     self._inputArray[:, ind] = (self._dataArray[:, ind] - self._met[ind, 1]) / self._met[ind, 0]             # <<<<<<<<<<<<<<
 *             if outputnormindex > 0:
 *                 self.outNormModel = Normalizer(self.mainModel,
 */
  __pyx_slice__69 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__69);
  __Pyx_GIVEREF(__pyx_slice__69);
  __pyx_slice__70 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__70)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__70);
  __Pyx_GIVEREF(__pyx_slice__70);

  /* "metaphor/monal/driver/_driver.py":1571
 *             if outputnormindex > 0:
 *                 self.outNormModel = Normalizer(self.mainModel,
 *                     data=self._met[ni:ni+no:, ::],             # <<<<<<<<<<<<<<
 *                     inNames=[cst.st_normName % name for name in self.mainModel.outputNames],
 *                     outNames=(self.mainModel.outputNames),
 */
  __pyx_slice__71 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__71)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__71);
  __Pyx_GIVEREF(__pyx_slice__71);

  /* "metaphor/monal/driver/_driver.py":1578
 *                 self._outputArray = zeros((nd, no))
 *                 for ind in range(no):
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]             # <<<<<<<<<<<<<<
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver
 */
  __pyx_slice__72 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__72)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__72);
  __Pyx_GIVEREF(__pyx_slice__72);
  __pyx_slice__73 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__73)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__73);
  __Pyx_GIVEREF(__pyx_slice__73);

  /* "metaphor/monal/driver/_driver.py":1590
 *         if (self._outResult is None) or (self._outResult.shape != (nd, no)):
 *             self._outResult = ndarray((nd, no))
 *         self._outResult.fill(0)             # <<<<<<<<<<<<<<
 * 
 *         if computelevel:
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "metaphor/monal/driver/_driver.py":1595
 *             if (self._jacobians is None) or (self._jacobians.shape != (no, nd, ns)):
 *                 self._jacobians = ndarray((no, nd, ns))
 *             self._jacobians.fill(0)             # <<<<<<<<<<<<<<
 *         return computelevel
 * 
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "metaphor/monal/driver/_driver.py":1602
 *         res = self._outResult
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *             res += self.outNormModel.data[:, 1]
 *         return res
 */
  __pyx_slice__76 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__76);
  __Pyx_GIVEREF(__pyx_slice__76);
  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_slice__76, __pyx_int_0); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "metaphor/monal/driver/_driver.py":1603
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]
 *             res += self.outNormModel.data[:, 1]             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_slice__78 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__78)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__78);
  __Pyx_GIVEREF(__pyx_slice__78);
  __pyx_tuple__79 = PyTuple_Pack(2, __pyx_slice__78, __pyx_int_1); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "metaphor/monal/driver/_driver.py":1610
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *         if deltares is None:
 *             return res
 */
  __pyx_slice__80 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__80);
  __Pyx_GIVEREF(__pyx_slice__80);
  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_slice__80, __pyx_int_0); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "metaphor/monal/driver/_driver.py":1619
 *         res = self.costFunction(self._outResult, self._outputArray)
 *         if donorm and self.outNormModel:
 *             res *= self.outNormModel.data[:, 0]**2             # <<<<<<<<<<<<<<
 *         if doSum:
 *             if (self.mainModel.outputCount > 1) and (self.outputWeighting is not None):
 */
  __pyx_slice__82 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__82)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__82);
  __Pyx_GIVEREF(__pyx_slice__82);
  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_slice__82, __pyx_int_0); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "metaphor/monal/driver/_driver.py":1624
 *                 for outindex, param in enumerate(self.outputWeighting):
 *                     if not outindex:
 *                         result = res[outindex, :] * param             # <<<<<<<<<<<<<<
 *                     else:
 *                         result += res[outindex, :] * param
 */
  __pyx_slice__84 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__84)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__84);
  __Pyx_GIVEREF(__pyx_slice__84);

  /* "metaphor/monal/driver/_driver.py":1626
 *                         result = res[outindex, :] * param
 *                     else:
 *                         result += res[outindex, :] * param             # <<<<<<<<<<<<<<
 *                 return result.sum()
 *             return res.sum()
 */
  __pyx_slice__85 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__85)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__85);
  __Pyx_GIVEREF(__pyx_slice__85);

  /* "metaphor/monal/driver/_driver.py":1674
 *         if index >= 0:
 *             jacob = self.getJacobian(index, donorm)
 *             res = squeeze(residual[:, newaxis]*jacob)             # <<<<<<<<<<<<<<
 *             return sum(res, axis=0)
 *         for outIndex in range(self.mainModel.outputCount):
 */
  __pyx_slice__86 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__86)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__86);
  __Pyx_GIVEREF(__pyx_slice__86);

  /* "metaphor/monal/driver/_driver.py":1678
 *         for outIndex in range(self.mainModel.outputCount):
 *             jacob = self.getJacobian(outIndex, donorm)
 *             costD = residual[:, outIndex]             # <<<<<<<<<<<<<<
 *             resloc = jacob * costD[:, newaxis]
 *             if self._outputWeighting is not None:
 */
  __pyx_slice__87 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__87)) __PYX_ERR(0, 1678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__87);
  __Pyx_GIVEREF(__pyx_slice__87);

  /* "metaphor/monal/driver/_driver.py":1679
 *             jacob = self.getJacobian(outIndex, donorm)
 *             costD = residual[:, outIndex]
 *             resloc = jacob * costD[:, newaxis]             # <<<<<<<<<<<<<<
 *             if self._outputWeighting is not None:
 *                 resloc *= self._outputWeighting[outIndex]
 */
  __pyx_slice__88 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__88)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__88);
  __Pyx_GIVEREF(__pyx_slice__88);

  /* "metaphor/monal/driver/_driver.py":1710
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs             # <<<<<<<<<<<<<<
 *         else:
 *             back = ones((self.mainModel.outputCount))
 */
  __pyx_slice__89 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__89)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__89);
  __Pyx_GIVEREF(__pyx_slice__89);

  /* "metaphor/monal/driver/_driver.py":1714
 *             back = ones((self.mainModel.outputCount))
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs             # <<<<<<<<<<<<<<
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)
 *         #================================= fin du coeur de calcul
 */
  __pyx_slice__90 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__90)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__90);
  __Pyx_GIVEREF(__pyx_slice__90);

  /* "metaphor/monal/driver/_driver.py":1715
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs
 *                 self.mainModel.backPropagate(self._jacobians[:, dataindex, :], None, back)             # <<<<<<<<<<<<<<
 *         #================================= fin du coeur de calcul
 *         return self._outResult
 */
  __pyx_slice__91 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__91)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__91);
  __Pyx_GIVEREF(__pyx_slice__91);
  __pyx_slice__92 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__92);
  __Pyx_GIVEREF(__pyx_slice__92);

  /* "metaphor/monal/driver/_driver.py":1740
 *         if not computelevel:
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagate(indata).outputs             # <<<<<<<<<<<<<<
 *         else:
 *             for dataindex, indata in enumerate(self._inputArray):
 */
  __pyx_slice__93 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__93)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__93);
  __Pyx_GIVEREF(__pyx_slice__93);

  /* "metaphor/monal/driver/_driver.py":1743
 *         else:
 *             for dataindex, indata in enumerate(self._inputArray):
 *                 self._outResult[dataindex, :] = self.mainModel.propagateAndDirectGradient(indata, self._jacobians[:, dataindex, :])[0]             # <<<<<<<<<<<<<<
 *         return self._outResult
 * 
 */
  __pyx_slice__94 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__94)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__94);
  __Pyx_GIVEREF(__pyx_slice__94);
  __pyx_slice__95 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__95)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__95);
  __Pyx_GIVEREF(__pyx_slice__95);
  __pyx_slice__96 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__96)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__96);
  __Pyx_GIVEREF(__pyx_slice__96);

  /* "metaphor/monal/driver/_driver.py":1767
 *         self.mainModel.outputs.copyTo(self._outResult)
 *         if self.mainModel.computeLevel:
 *             self._jacobians.fill(0)             # <<<<<<<<<<<<<<
 *             if self.mainModel.outputCount == 1:
 *                 back = 1
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "metaphor/monal/driver/_driver.py":1770
 *             if self.mainModel.outputCount == 1:
 *                 back = 1
 *                 self.mainModel.backPropagateCoreSingleOutput(self._jacobians[0, :, :], None, back)             # <<<<<<<<<<<<<<
 *             else:
 *                 back = identity(self.mainModel.outputCount)
 */
  __pyx_slice__98 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__98)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__98);
  __Pyx_GIVEREF(__pyx_slice__98);
  __pyx_slice__99 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__99)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__99);
  __Pyx_GIVEREF(__pyx_slice__99);
  __pyx_tuple__100 = PyTuple_Pack(3, __pyx_int_0, __pyx_slice__98, __pyx_slice__99); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "metaphor/monal/driver/_driver.py":1811
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive()
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')             # <<<<<<<<<<<<<<
 * 
 *         outCost = self.getCost(doSum=True, donorm=donorm)
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_u_mode_should_be_in_integrated_dir); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "metaphor/monal/driver/_driver.py":1833
 *         elif mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')             # <<<<<<<<<<<<<<
 * 
 *         if mean:
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_u_mode_should_be_in_integrated_dir); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 1833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "metaphor/monal/driver/_driver.py":1851
 *         elif self._mode == "progressive":
 *             self.computeTrainDataProgressive(C.ID_DIFF)
 *         else: raise MonalError('mode should be in ["integrated", "direct", "progressive"]')             # <<<<<<<<<<<<<<
 * 
 *         return self.getPrime(donorm=donorm)
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_u_mode_should_be_in_integrated_dir); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "metaphor/monal/driver/_driver.py":1881
 *         if (self._jacobians is None) or (self._jacobians.shape != (nd, ns)):
 *             self._jacobians = ndarray((no, nd, ns))
 *         self._jacobians.fill(0)             # <<<<<<<<<<<<<<
 *         if no == 1:
 *             back = 1
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "metaphor/monal/driver/_driver.py":1893
 *             for ind in range(self.mainModel.outputCount):
 *                 if not ind:
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]             # <<<<<<<<<<<<<<
 *                 else:
 *                     res += self._jacobians[ind, :, :] * self._outputWeighting[ind]
 */
  __pyx_slice__105 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__105)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__105);
  __Pyx_GIVEREF(__pyx_slice__105);
  __pyx_slice__106 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__106)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__106);
  __Pyx_GIVEREF(__pyx_slice__106);

  /* "metaphor/monal/driver/_driver.py":1895
 *                     res = self._jacobians[ind, :, :] * self._outputWeighting[ind]
 *                 else:
 *                     res += self._jacobians[ind, :, :] * self._outputWeighting[ind]             # <<<<<<<<<<<<<<
 *             return res
 *         return sum(self._jacobians, axis = 0)
 */
  __pyx_slice__107 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__107)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__107);
  __Pyx_GIVEREF(__pyx_slice__107);
  __pyx_slice__108 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__108)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__108);
  __Pyx_GIVEREF(__pyx_slice__108);

  /* "metaphor/monal/driver/_driver.py":1928
 *         model.setWeights(weights)
 *         result = model(computelevel=C.ID_DIFF)
 *         self._outputs, self._jacobians = result[:2]             # <<<<<<<<<<<<<<
 *         # res[2]: gradInput n'est pas utilise
 *         return self._outputs, self._jacobians
 */
  __pyx_slice__109 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__109)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__109);
  __Pyx_GIVEREF(__pyx_slice__109);

  /* "metaphor/monal/driver/_driver.py":1942
 *         outputs, jacob = self.Jacobian2long(weights)
 *         residuals = outputs - target
 *         return jacob * residuals[:,newaxis]             # <<<<<<<<<<<<<<
 *         #return jacob
 * 
 */
  __pyx_slice__110 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__110)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__110);
  __Pyx_GIVEREF(__pyx_slice__110);

  /* "metaphor/monal/driver/_driver.py":1996
 *             maxiter = 100*(1 + self.mainModel.dimension)
 *         if self.mainModel.isLinear:
 *             print("Current model is linear.")             # <<<<<<<<<<<<<<
 *         self.setRandSeed(seed)
 *         best = -1
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_u_Current_model_is_linear); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 1996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "metaphor/monal/driver/_driver.py":2115
 *             popt, code, N, Nf, Ng, fopt = res
 *         elif not OKScipy:
 *             raise NotImplementedError("Not Implemented without Scipy")             # <<<<<<<<<<<<<<
 *         else:
 *             if style == "LM":  # LM by SciPy
 */
  __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_u_Not_Implemented_without_Scipy); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 2115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "metaphor/monal/driver/_driver.py":2174
 *         if self.inNormModel:
 *             for ind in range(self.mainModel.inputCount):
 *                 res[:, ind] *= self.inNormModel.data[ind, 0]             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):
 */
  __pyx_slice__113 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__113)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__113);
  __Pyx_GIVEREF(__pyx_slice__113);

  /* "metaphor/monal/driver/_driver.py":2177
 *         if self.outNormModel:
 *             for ind in range(self.mainModel.outputCount):
 *                 res[ind, :] *= self.outNormModel.data[ind, 0]             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_slice__114 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__114)) __PYX_ERR(0, 2177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__114);
  __Pyx_GIVEREF(__pyx_slice__114);

  /* "metaphor/monal/driver/_driver.py":2283
 *         """
 *         if not self.inputCount:
 *             raise MonalError("Model must have at least 1 input to be reverse-trained")             # <<<<<<<<<<<<<<
 *         acc=1.49012e-08
 *         if fixedinputs is None:
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_u_Model_must_have_at_least_1_input); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "metaphor/monal/driver/_driver.py":2298
 *             inputs = asarray(self.inputs)
 *         inputs = self.normalizeInputs(inputs)
 *         inputini = inputs[:]             # <<<<<<<<<<<<<<
 *         outputtarget = self.unnormalizeOutputs(outputtarget, reverse=True)
 *         args=(inputini, fixedinputs, outputtarget, modelindex)
 */
  __pyx_slice__116 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__116)) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__116);
  __Pyx_GIVEREF(__pyx_slice__116);

  /* "metaphor/monal/driver/_driver.py":2310
 *         if debug:
 *             if code & 1:
 *                 print_('Information: no acceptable point found', file=sys.stderr)             # <<<<<<<<<<<<<<
 *             if code & 2:
 *                 print_('Information: accuracy reached', file=sys.stderr)
 */
  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_u_Information_no_acceptable_point); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "metaphor/monal/driver/_driver.py":2312
 *                 print_('Information: no acceptable point found', file=sys.stderr)
 *             if code & 2:
 *                 print_('Information: accuracy reached', file=sys.stderr)             # <<<<<<<<<<<<<<
 *             if code & 4:
 *                 print_('Information: stop for maxiter', file=sys.stderr)
 */
  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_u_Information_accuracy_reached); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 2312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "metaphor/monal/driver/_driver.py":2314
 *                 print_('Information: accuracy reached', file=sys.stderr)
 *             if code & 4:
 *                 print_('Information: stop for maxiter', file=sys.stderr)             # <<<<<<<<<<<<<<
 *         newinputs = self._expandvec(newreducedinputs, inputini, fixedinputs)
 *         newinputs = self.normalizeInputs(newinputs, reverse=True)
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_u_Information_stop_for_maxiter); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "metaphor/monal/driver/_driver.py":2463
 *             inputs = self.normalizeInputs(inputs)
 *         res = self.transfer(inputs, C.ID_DIFF)
 *         outs, grad = res[:2]             # <<<<<<<<<<<<<<
 *         if donorm:
 *             outs = self.unnormalizeOutputs(outs)
 */
  __pyx_slice__120 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__120)) __PYX_ERR(0, 2463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__120);
  __Pyx_GIVEREF(__pyx_slice__120);

  /* "metaphor/monal/driver/_driver.py":2472
 *             outputs = asarray(outs)
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]             # <<<<<<<<<<<<<<
 *         if grad.ndim == 1:
 *             grad = grad[newaxis, :]
 */
  __pyx_slice__121 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__121)) __PYX_ERR(0, 2472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__121);
  __Pyx_GIVEREF(__pyx_slice__121);

  /* "metaphor/monal/driver/_driver.py":2474
 *             outputs = outputs[newaxis, :]
 *         if grad.ndim == 1:
 *             grad = grad[newaxis, :]             # <<<<<<<<<<<<<<
 *         no = self.mainModel.outputCount
 *         outlev = zeros((no, self.mainModel.inputDim))
 */
  __pyx_slice__122 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__122)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__122);
  __Pyx_GIVEREF(__pyx_slice__122);

  /* "metaphor/monal/driver/_driver.py":2547
 *         outputs, grad, _ = self.transferOld(inputs, C.ID_DIFF, donorm=False)
 *         if outputs.ndim == 1:
 *             outputs = outputs[newaxis, :]             # <<<<<<<<<<<<<<
 *         if grad.ndim == 1:
 *             outputsicp = npcopy(outputs)
 */
  __pyx_slice__123 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__123)) __PYX_ERR(0, 2547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__123);
  __Pyx_GIVEREF(__pyx_slice__123);

  /* "metaphor/monal/driver/_driver.py":2550
 *         if grad.ndim == 1:
 *             outputsicp = npcopy(outputs)
 *             grad = grad[newaxis, :]             # <<<<<<<<<<<<<<
 *         outputsicm = npcopy(outputs)
 *         no = self.mainModel.outputCount
 */
  __pyx_slice__124 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__124)) __PYX_ERR(0, 2550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__124);
  __Pyx_GIVEREF(__pyx_slice__124);

  /* "metaphor/monal/driver/_driver.py":2612
 *         if norminputgrad:
 *             if reverse:
 *                 return inputs / self.inNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *             else:
 *                 return inputs * self.inNormModel.data[:, 0]
 */
  __pyx_slice__125 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__125)) __PYX_ERR(0, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__125);
  __Pyx_GIVEREF(__pyx_slice__125);
  __pyx_tuple__126 = PyTuple_Pack(2, __pyx_slice__125, __pyx_int_0); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "metaphor/monal/driver/_driver.py":2614
 *                 return inputs / self.inNormModel.data[:, 0]
 *             else:
 *                 return inputs * self.inNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *         if reverse:
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]
 */
  __pyx_slice__127 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__127)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__127);
  __Pyx_GIVEREF(__pyx_slice__127);
  __pyx_tuple__128 = PyTuple_Pack(2, __pyx_slice__127, __pyx_int_0); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "metaphor/monal/driver/_driver.py":2616
 *                 return inputs * self.inNormModel.data[:, 0]
 *         if reverse:
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]             # <<<<<<<<<<<<<<
 *         else:
 *             return (inputs - self.inNormModel.data[:, 1]) / self.inNormModel.data[:, 0]
 */
  __pyx_slice__129 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__129)) __PYX_ERR(0, 2616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__129);
  __Pyx_GIVEREF(__pyx_slice__129);
  __pyx_tuple__130 = PyTuple_Pack(2, __pyx_slice__129, __pyx_int_0); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 2616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_slice__131 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__131)) __PYX_ERR(0, 2616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__131);
  __Pyx_GIVEREF(__pyx_slice__131);
  __pyx_tuple__132 = PyTuple_Pack(2, __pyx_slice__131, __pyx_int_1); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 2616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "metaphor/monal/driver/_driver.py":2618
 *             return inputs * self.inNormModel.data[:, 0] + self.inNormModel.data[:, 1]
 *         else:
 *             return (inputs - self.inNormModel.data[:, 1]) / self.inNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_slice__133 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__133)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__133);
  __Pyx_GIVEREF(__pyx_slice__133);
  __pyx_tuple__134 = PyTuple_Pack(2, __pyx_slice__133, __pyx_int_1); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_slice__135 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__135)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__135);
  __Pyx_GIVEREF(__pyx_slice__135);
  __pyx_tuple__136 = PyTuple_Pack(2, __pyx_slice__135, __pyx_int_0); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "metaphor/monal/driver/_driver.py":2628
 *                 if self.outputCount == 1:
 *                     return outputs * self.outNormModel.data[0]
 *                 return outputs * self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *         else:
 *             if self.outNormModel is not None:
 */
  __pyx_slice__137 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__137)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__137);
  __Pyx_GIVEREF(__pyx_slice__137);
  __pyx_tuple__138 = PyTuple_Pack(2, __pyx_slice__137, __pyx_int_0); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "metaphor/monal/driver/_driver.py":2637
 *                         return outputs * self.outNormModel.data[0] + self.outNormModel.data[1]
 *                 if reverse:
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     return outputs * self.outNormModel.data[:, 0] + self.outNormModel.data[:, 1]
 */
  __pyx_slice__139 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__139)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__139);
  __Pyx_GIVEREF(__pyx_slice__139);
  __pyx_tuple__140 = PyTuple_Pack(2, __pyx_slice__139, __pyx_int_1); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_slice__141 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__141)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__141);
  __Pyx_GIVEREF(__pyx_slice__141);
  __pyx_tuple__142 = PyTuple_Pack(2, __pyx_slice__141, __pyx_int_0); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "metaphor/monal/driver/_driver.py":2639
 *                     return (outputs - self.outNormModel.data[:, 1]) / self.outNormModel.data[:, 0]
 *                 else:
 *                     return outputs * self.outNormModel.data[:, 0] + self.outNormModel.data[:, 1]             # <<<<<<<<<<<<<<
 *         return outputs
 * 
 */
  __pyx_slice__143 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__143)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__143);
  __Pyx_GIVEREF(__pyx_slice__143);
  __pyx_tuple__144 = PyTuple_Pack(2, __pyx_slice__143, __pyx_int_0); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_slice__145 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__145)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__145);
  __Pyx_GIVEREF(__pyx_slice__145);
  __pyx_tuple__146 = PyTuple_Pack(2, __pyx_slice__145, __pyx_int_1); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "metaphor/monal/driver/_driver.py":2697
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():
 *             raise MonalError('Cannot modify model count')             # <<<<<<<<<<<<<<
 *         if value != self.dataCount:
 *             if not (value is None) and (value > 0):
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_u_Cannot_modify_model_count); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 2697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "metaphor/monal/driver/_driver.py":2709
 *         attr += ' {0}="{1}"'.format(cst.st_version, mtb.monalversion)
 *         out = ['', self.mainModel.xml(decal + 1) + nntb.fillstr(decal, '\t')]
 *         out += [outproc.xml(1) for outproc in self.outProcList]             # <<<<<<<<<<<<<<
 *         out.append('')
 *         return '\n'.join(out), attr
 */
  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 2709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "metaphor/monal/driver/_driver.py":2779
 *         elif savingformat in [C.SF_CPYTHON, C.SF_DLL, C.SF_DLLTRAIN]:
 * #            outfile = sys.stdout if verbose else None
 *             tempdir = getTempDir(keeptemp, appli=os.path.join('metaphor', 'nn'), doprint = verbose)             # <<<<<<<<<<<<<<
 * #             isolddir = bool(tempdir)
 * #             if keeptemp and isinstance(keeptemp, str):
 */
  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_u_metaphor, __pyx_n_u_nn); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 2779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "metaphor/monal/driver/_driver.py":2948
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         return self._dataArray[index, :]             # <<<<<<<<<<<<<<
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver
 */
  __pyx_slice__152 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__152)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__152);
  __Pyx_GIVEREF(__pyx_slice__152);

  /* "metaphor/monal/driver/_driver.py":2953
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         self._dataArray[index, :] = values             # <<<<<<<<<<<<<<
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver
 */
  __pyx_slice__153 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__153)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__153);
  __Pyx_GIVEREF(__pyx_slice__153);

  /* "metaphor/monal/driver/_driver.py":2973
 *             self._studentvariable = special.stdtrit(freedm, (self._confidencelevel + 1)/2)
 *         except ImportError:
 *             raise NotImplementedError("student variable computation not yet implemented")             # <<<<<<<<<<<<<<
 * 
 * #     def showResult(self, inputindex=0, outputindex=0, legend="", target=True, color="g", points=100):  # Driver
 */
  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_u_student_variable_computation_not); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 2973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "metaphor/monal/driver/_driver.py":80
 * from xml.etree.cElementTree import fromstring, parse
 * 
 * warnings.filterwarnings("ignore", category=RuntimeWarning)             # <<<<<<<<<<<<<<
 * 
 * def isNewWeight(target, weights):
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_n_u_ignore); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "metaphor/monal/driver/_driver.py":82
 * warnings.filterwarnings("ignore", category=RuntimeWarning)
 * 
 * def isNewWeight(target, weights):             # <<<<<<<<<<<<<<
 *     if weights is None:
 *         return False
 */
  __pyx_tuple__157 = PyTuple_Pack(4, __pyx_n_s_target, __pyx_n_s_weights, __pyx_n_s_tg, __pyx_n_s_val); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_isNewWeight, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 82, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":104
 * #     return rnd.set_state(state)
 * 
 * def setCallback(doset=True, fct=None):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_doset, __pyx_n_s_fct); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setCallback, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_tuple__161 = PyTuple_Pack(2, ((PyObject *)Py_True), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "metaphor/monal/driver/_driver.py":110
 * #     pass
 * 
 * def setSavingFormat( value ):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_tuple__162 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setSavingFormat, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 110, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":146
 *     _tab = ""
 * 
 *     def __init__(self, verbose=0):             # <<<<<<<<<<<<<<
 *         super(DriverBase, self).__init__(None)
 *         self.verbose = verbose
 */
  __pyx_tuple__164 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_verbose, __pyx_n_s_self_callback); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_init, 146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 146, __pyx_L1_error)
  __pyx_tuple__166 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "metaphor/monal/driver/_driver.py":153
 *         #self.wused = None
 * 
 *     def reprlst(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         lst = super(DriverBase, self).reprlst()
 *         lst.append("modelType : {}".format(self.modelType))
 */
  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lst); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_reprlst, 153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 153, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":161
 * 
 *     @Property
 *     def modelType(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.modelType
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_modelType_2, 161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 161, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":167
 *             return 0  #self._modelType
 *     @modelType.setter
 *     def modelType(self, value):             # <<<<<<<<<<<<<<
 *         self.mainModel.modelType = value
 * 
 */
  __pyx_tuple__171 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_modelType_2, 167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 167, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":170
 *         self.mainModel.modelType = value
 * 
 *     def signature(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.signature()
 */
  __pyx_tuple__174 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_inputs, __pyx_n_s_res, __pyx_n_s_ind, __pyx_n_s__173, __pyx_n_s__173); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_signature, 170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 170, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":190
 *             return res
 * 
 *     def wused(self, paramNames=None): # ModelLib             # <<<<<<<<<<<<<<
 *         if paramNames is None:
 *             paramNames = self.paramNames
 */
  __pyx_tuple__176 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_paramNames, __pyx_n_s_ls, __pyx_n_s_target, __pyx_n_s_cur, __pyx_n_s_ind, __pyx_n_s_pname, __pyx_n_s_i); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_wused, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 190, __pyx_L1_error)
  __pyx_tuple__178 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);

  /* "metaphor/monal/driver/_driver.py":205
 * 
 *     @property
 *     def weights(self):             # <<<<<<<<<<<<<<
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:
 */
  __pyx_tuple__179 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hasw); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_weights, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":213
 *         return None
 *     @weights.setter
 *     def weights(self, value):             # <<<<<<<<<<<<<<
 *         self._weights = array(value).copy()
 *         try:
 */
  __pyx_tuple__181 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_weights, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 213, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":220
 * 
 *     @Property
 *     def callback(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._callback
 * #     @callback.setter
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_callback_2, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 220, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":226
 * #         self._callback = fct
 * 
 *     def setCallback(self, fct=None):             # <<<<<<<<<<<<<<
 *         self._callback = fct
 * 
 */
  __pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fct); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setCallback, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_tuple__187 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);

  /* "metaphor/monal/driver/_driver.py":230
 * 
 *     @Property
 *     def hasResampling(self):             # <<<<<<<<<<<<<<
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 *             return self._extraweights.any()
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_hasResampling, 230, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 230, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":235
 *         return False
 * 
 *     def getNewWeights(self, stddev=0.3, keep0=[]):  # DriverBase             # <<<<<<<<<<<<<<
 *         """Create a new weights vector.
 *         The result is not affected to the Driver.weights property.
 */
  __pyx_tuple__190 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_stddev, __pyx_n_s_keep0, __pyx_n_s_result, __pyx_n_s_i); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getNewWeights, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 235, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":245
 *         return result
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         if target == self:
 * 
 */
  __pyx_tuple__192 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_res, __pyx_n_s_node, __pyx_n_s_local, __pyx_n_s_vclass, __pyx_n_s_element, __pyx_n_s_row, __pyx_n_s_valelmt, __pyx_n_s_value); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadWeightsXML, 245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 245, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":282
 * 
 *     @Property
 *     def dispersionMatrix(self):             # <<<<<<<<<<<<<<
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_dispersionMatrix_2, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 282, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":285
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 *     def dispersionMatrix(self, value):             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = value
 * 
 */
  __pyx_tuple__196 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_dispersionMatrix_2, 285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 285, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":289
 * 
 *     @Property
 *     def trainingStddev(self):             # <<<<<<<<<<<<<<
 *         return self._stdtrain
 *     @trainingStddev.setter
 */
  __pyx_tuple__198 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_trainingStddev, 289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 289, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":292
 *         return self._stdtrain
 *     @trainingStddev.setter
 *     def trainingStddev(self, value):             # <<<<<<<<<<<<<<
 *         self._stdtrain = value
 * 
 */
  __pyx_tuple__200 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_trainingStddev, 292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 292, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":295
 *         self._stdtrain = value
 * 
 *     def loadFromDict(self, source, givetime=False): # ModelLib             # <<<<<<<<<<<<<<
 *         self._extradispersions = None
 *         self._extraweights = None
 */
  __pyx_tuple__202 = PyTuple_Pack(27, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_givetime, __pyx_n_s_inputnorm, __pyx_n_s_outputnorm, __pyx_n_s_extradispersions_2, __pyx_n_s_paramnames, __pyx_n_s_dispersionMatrix_2, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_params, __pyx_n_s_ndim, __pyx_n_s_shape, __pyx_n_s_nbmulti, __pyx_n_s_rootdic, __pyx_n_s_subkey, __pyx_n_s_subval, __pyx_n_s_inputnamelist, __pyx_n_s_indloc, __pyx_n_s_valloc, __pyx_n_s_cond, __pyx_n_s_pcount, __pyx_n_s_err, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_disp, __pyx_n_s_matlin); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(3, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadFromDict, 295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 295, __pyx_L1_error)
  __pyx_tuple__204 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "metaphor/monal/driver/_driver.py":394
 *             return False
 * 
 *     def loadWeightsBinary(self, source):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = False
 *         try:
 */
  __pyx_tuple__205 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_res, __pyx_n_s_sourceopen); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadWeightsBinary, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 394, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":405
 *             return res
 * 
 *     def loadWeightsASCII(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         #res = False
 *         #dim = 0
 */
  __pyx_tuple__207 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_ff, __pyx_n_s_lst, __pyx_n_s_res, __pyx_n_s_ind, __pyx_n_s_st); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadWeightsASCII, 405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 405, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":492
 *         return res
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         outnorm = zeros((2,))
 *         for _ in range(2):
 */
  __pyx_tuple__209 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_lst, __pyx_n_s_index, __pyx_n_s_outnorm, __pyx_n_s__173, __pyx_n_s_st, __pyx_n_s_oname, __pyx_n_s_value); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadNormFromASCIIStrList, 492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 492, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":510
 *         return 2
 * 
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = bool(lst)
 *         if not res:
 */
  __pyx_tuple__211 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_lst, __pyx_n_s_index, __pyx_n_s_res, __pyx_n_s_dim, __pyx_n_s_wformat, __pyx_n_s_st, __pyx_n_s_llst, __pyx_n_s_row, __pyx_n_s_locallst, __pyx_n_s_locrow, __pyx_n_s_wname, __pyx_n_s_ind); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadFromASCIIStrList, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 510, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":551
 *         return dim
 * 
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]
 */
  __pyx_tuple__213 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_lst, __pyx_n_s_index, __pyx_n_s_dim, __pyx_n_s_st, __pyx_n_s_llst, __pyx_n_s_i1, __pyx_n_s_i2, __pyx_n_s_nd, __pyx_n_s_mat, __pyx_n_s_ind, __pyx_n_s_ww); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadASCIIDispersion, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 551, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":577
 * 
 *     @Property
 *     def extraCount(self):             # <<<<<<<<<<<<<<
 *         if self._extraweights is None:
 *             return 0
 */
  __pyx_tuple__215 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_extraCount_2, 577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 577, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":583
 * 
 *     @Property
 *     def action(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._lastaction
 * 
 */
  __pyx_tuple__217 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_action, 583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 583, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":587
 * 
 *     @action.setter
 *     def _setaction(self, value):  # DriverBase             # <<<<<<<<<<<<<<
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:
 */
  __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setaction, 587, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 587, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":596
 *         raise NotImplementedError()
 * 
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 */
  __pyx_tuple__221 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_jacob, __pyx_n_s_method, __pyx_n_s_full, __pyx_n_s_res, __pyx_n_s_halfDispersionMatrix_2); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeFromJacobian, 596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 596, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":605
 *         return self._leverages
 * 
 *     def computeUsageLeverages(self, params=None):# DriverBase             # <<<<<<<<<<<<<<
 *         dispersion = self._dispersionMatrix
 *         levs = []
 */
  __pyx_tuple__223 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_params, __pyx_n_s_dispersion, __pyx_n_s_levs, __pyx_n_s_index, __pyx_n_s__173, __pyx_n_s_grad, __pyx_n_s_lev); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeUsageLeverages, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 605, __pyx_L1_error)
  __pyx_tuple__225 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "metaphor/monal/driver/_driver.py":614
 *         return asarray(levs)
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase             # <<<<<<<<<<<<<<
 *         if curw is None:
 *             curw = self.weights
 */
  __pyx_tuple__226 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_curw, __pyx_n_s_out, __pyx_n_s_jacob, __pyx_n_s_restable, __pyx_n_s_leverages_2, __pyx_n_s_targets, __pyx_n_s_residuals); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getTransferResults, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 614, __pyx_L1_error)
  __pyx_tuple__228 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "metaphor/monal/driver/_driver.py":629
 *         return restable, jacob
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         if C.USE_INTEGRATED_LEVERAGE:
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 */
  __pyx_tuple__229 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_curw, __pyx_n_s_restable, __pyx_n_s_outputs, __pyx_n_s_jacobians, __pyx_n_s_actualepochs); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainingResults, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_tuple__231 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "metaphor/monal/driver/_driver.py":635
 *             return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 *     def computeTrainingResultsIntegrated(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 */
  __pyx_tuple__232 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_curw, __pyx_n_s_restable, __pyx_n_s_outputs, __pyx_n_s_jacobians, __pyx_n_s_actualepochs, __pyx_n_s_press, __pyx_n_s_residuals, __pyx_n_s_singular, __pyx_n_s_leverages_2, __pyx_n_s_deltash, __pyx_n_s_cost, __pyx_n_s_ind, __pyx_n_s_sing, __pyx_n_s_results, __pyx_n_s_N_2, __pyx_n_s_q, __pyx_n_s_correlflat, __pyx_n_s_maxcorrel, __pyx_n_s_meancorrel, __pyx_n_s_maxindex, __pyx_n_s_correl, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(6, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainingResultsIntegrated, 635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 635, __pyx_L1_error)
  __pyx_tuple__234 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);

  /* "metaphor/monal/driver/_driver.py":773
 * #         return results
 * 
 *     def computeTrainingResultsOld(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode externe
 * 
 */
  __pyx_tuple__235 = PyTuple_Pack(26, __pyx_n_s_self, __pyx_n_s_curw, __pyx_n_s_restable, __pyx_n_s_outputs, __pyx_n_s_jacobians, __pyx_n_s_actualepochs, __pyx_n_s_results, __pyx_n_s_residuals, __pyx_n_s_jacob, __pyx_n_s_leverages_2, __pyx_n_s_leverageUsages, __pyx_n_s_N_2, __pyx_n_s_q, __pyx_n_s_cost, __pyx_n_s_vec, __pyx_n_s_ind, __pyx_n_s_res, __pyx_n_s_lev, __pyx_n_s_val, __pyx_n_s_press, __pyx_n_s_correlflat, __pyx_n_s_maxcorrel, __pyx_n_s_meancorrel, __pyx_n_s_maxindex, __pyx_n_s_correl, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(6, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainingResultsOld, 773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 773, __pyx_L1_error)
  __pyx_tuple__237 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);

  /* "metaphor/monal/driver/_driver.py":935
 * #         return results, restable
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase             # <<<<<<<<<<<<<<
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1
 */
  __pyx_tuple__238 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_savingformat, __pyx_n_s_ff, __pyx_n_s_nm, __pyx_n_s_val, __pyx_n_s_norm, __pyx_n_s_N_2, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_saveParameters, 935, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 935, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":114
 * 
 * #------------------------------------------------------------------------------
 * @Properties(("dispersionMatrix", "studentvariable", "stdtrain", "mu",             # <<<<<<<<<<<<<<
 *     "confidencelevel", "trainingResults", "correlMatrix", "determinant",
 *     "leverages", "projectionMatrix", "rank", "jacobian",
 */
  __pyx_tuple__240 = PyTuple_Pack(20, __pyx_n_u_dispersionMatrix_2, __pyx_n_u_studentvariable_2, __pyx_n_u_stdtrain_2, __pyx_n_u_mu, __pyx_n_u_confidencelevel_2, __pyx_n_u_trainingResults_2, __pyx_n_u_correlMatrix_2, __pyx_n_u_determinant_2, __pyx_n_u_leverages_2, __pyx_n_u_projectionMatrix, __pyx_n_u_rank_2, __pyx_n_u_jacobian_2, __pyx_n_u_baselen, __pyx_n_u_extraweights_2, __pyx_n_u_extraweightslist, __pyx_n_u_originParamCount_2, __pyx_n_u_extradispersions_2, __pyx_n_u_extrastddev_2, __pyx_n_u_extraVLOO_2, __pyx_n_u_lastoutput); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);
  __pyx_tuple__241 = PyTuple_Pack(2, __pyx_tuple__240, Py_False); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);

  /* "metaphor/monal/driver/_driver.py":1024
 *     _propertyName = ""
 * 
 *     def __init__( self, source="", modeldata=None, trainable=1, modelname=None,             # <<<<<<<<<<<<<<
 *             inputs=1, outputs=1, hidden=2, activfunc="TANH", statelayer=-1,
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 */
  __pyx_tuple__242 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_modeldata, __pyx_n_s_trainable, __pyx_n_s_modelname, __pyx_n_s_inputs, __pyx_n_s_outputs, __pyx_n_s_hidden, __pyx_n_s_activfunc, __pyx_n_s_statelayer, __pyx_n_s_statenodeindex, __pyx_n_s_order, __pyx_n_s_nosynapse, __pyx_n_s_existingnode, __pyx_n_s_polytype, __pyx_n_s_classif, __pyx_n_s_verbose, __pyx_n_s_datasource, __pyx_n_s_dataformat, __pyx_n_s_normalize, __pyx_n_s_weights, __pyx_n_s_kwd, __pyx_n_s_follow, __pyx_n_s_obj, __pyx_n_s_err); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(21, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_init, 1024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __pyx_tuple__244 = PyTuple_Pack(20, ((PyObject*)__pyx_kp_u__2), ((PyObject *)Py_None), ((PyObject *)__pyx_int_1), ((PyObject *)Py_None), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_2), ((PyObject*)__pyx_n_u_TANH), ((PyObject *)__pyx_int_neg_1), ((PyObject *)__pyx_int_neg_1), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_0), ((PyObject *)Py_False), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);

  /* "metaphor/monal/driver/_driver.py":1090
 *         return
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         #self._codeWriter = None
 *         super(Driver, self).__del__()
 */
  __pyx_tuple__245 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_del, 1090, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 1090, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1094
 *         super(Driver, self).__del__()
 * 
 *     def setPseudoMatrix(self):             # <<<<<<<<<<<<<<
 *         self.mainModelMaster = self.mainModel
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setPseudoMatrix, 1094, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 1094, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1098
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 * 
 *     def setWeights(self, weights):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.setWeights(weights)
 * 
 */
  __pyx_tuple__249 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_weights); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setWeights, 1098, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 1098, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1102
 * 
 *     @Property
 *     def trainable(self):             # <<<<<<<<<<<<<<
 *         return self._trainable
 *     @trainable.setter
 */
  __pyx_tuple__251 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_trainable, 1102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 1102, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1105
 *         return self._trainable
 *     @trainable.setter
 *     def trainable(self, value):             # <<<<<<<<<<<<<<
 *         self._trainable = value
 * 
 */
  __pyx_tuple__253 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_trainable, 1105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 1105, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1109
 * 
 *     @Property
 *     def inputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:
 */
  __pyx_tuple__255 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_val); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputs, 1109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 1109, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1115
 *         return val
 *     @inputs.lengetter
 *     def inputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.inputCount
 *     @inputs.setter
 */
  __pyx_tuple__257 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputs, 1115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 1115, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1118
 *         return self.inputCount
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 */
  __pyx_tuple__259 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputs, 1118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 1118, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1124
 * 
 *     @Property
 *     def outputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:
 */
  __pyx_tuple__261 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_val); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputs, 1124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 1124, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1132
 *         return val
 *     @outputs.lengetter
 *     def outputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 *     @outputs.setter
 */
  __pyx_tuple__263 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputs, 1132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 1132, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1135
 *         return self.mainModel.outputCount
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 */
  __pyx_tuple__265 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputs, 1135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 1135, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1145
 * 
 *     @Property
 *     def propertyName(self):             # <<<<<<<<<<<<<<
 *         val = ""
 *         if self._propertyName:
 */
  __pyx_tuple__267 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_val); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_propertyName_2, 1145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(0, 1145, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1153
 *         return val
 *     @propertyName.setter
 *     def propertyName(self, value):             # <<<<<<<<<<<<<<
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:
 */
  __pyx_tuple__269 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_propertyName_2, 1153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(0, 1153, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1159
 * 
 *     @Property
 *     def extendedInputCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.extendedInputCount
 * 
 */
  __pyx_tuple__271 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_extendedInputCount, 1159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 1159, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1163
 * 
 *     @Property
 *     def inputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.inputCount
 * 
 */
  __pyx_tuple__273 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputCount, 1163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(0, 1163, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1167
 * 
 *     @Property
 *     def outputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 * 
 */
  __pyx_tuple__275 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputCount, 1167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 1167, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1171
 * 
 *     @Property
 *     def paramCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.paramCount
 * 
 */
  __pyx_tuple__277 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_paramCount, 1171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 1171, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1175
 * 
 *     @property
 *     def longParamCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.longParamCount
 * 
 */
  __pyx_tuple__279 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 1175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_longParamCount, 1175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(0, 1175, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1179
 * 
 *     @property
 *     def useLongParams(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.useLongParams
 * 
 */
  __pyx_tuple__281 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_useLongParams, 1179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 1179, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1182
 *         return self.mainModel.useLongParams
 * 
 *     def gettargets(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.targets
 * 
 */
  __pyx_tuple__283 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_gettargets, 1182, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 1182, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1185
 *         return self.mainModel.targets
 * 
 *     def getlastresiduals(self, curw=None):  # Driver             # <<<<<<<<<<<<<<
 *         return self._outputs - self.mainModel.targets
 * #    getresiduals = getlastresiduals
 */
  __pyx_tuple__285 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_curw); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getlastresiduals, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __pyx_tuple__287 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);

  /* "metaphor/monal/driver/_driver.py":1190
 * 
 *     @Property
 *     def parameterNames(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             lst = self.mainModel.parameterNames
 */
  __pyx_tuple__288 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_lst); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_parameterNames, 1190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 1190, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1197
 *         return lst[index]
 *     @parameterNames.lengetter
 *     def lparameterNames(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.paramCount
 * 
 */
  __pyx_tuple__290 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_lparameterNames, 1197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 1197, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1208
 *     #===========================================================================
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver             # <<<<<<<<<<<<<<
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,
 */
  __pyx_tuple__292 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_savingformat, __pyx_n_s_ff, __pyx_n_s_N_2, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);
  __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_saveParameters, 1208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(0, 1208, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1240
 *             self.mainModel.saveParameters(filename, savingformat)
 * 
 *     def getinfo(self, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount
 */
  __pyx_tuple__294 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_style); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);
  __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getinfo, 1240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(0, 1240, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1258
 * 
 *     @Property
 *     def useOriginal(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 */
  __pyx_tuple__296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);
  __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_useOriginal, 1258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(0, 1258, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1261
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 *     def suseOriginal(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.useOriginal = value
 * 
 */
  __pyx_tuple__298 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);
  __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_suseOriginal, 1261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(0, 1261, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1264
 *         self.mainModel.useOriginal = value
 * 
 *     def getrealvalue(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 */
  __pyx_tuple__300 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_param, __pyx_n_s_style); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);
  __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getrealvalue, 1264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(0, 1264, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1267
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 *     def getindexinfo(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)
 */
  __pyx_tuple__302 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_param, __pyx_n_s_style); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);
  __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getindexinfo, 1267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(0, 1267, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1276
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 * 
 *     def setivalue(self, style, value):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.DEBUGDLL: return
 * 
 */
  __pyx_tuple__304 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_style, __pyx_n_s_value); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);
  __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setivalue, 1276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(0, 1276, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1279
 *         if style == C.DEBUGDLL: return
 * 
 *     def setrealvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 */
  __pyx_tuple__306 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_style, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);
  __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setrealvalue, 1279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 1279, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1282
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 *     def setindexvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 */
  __pyx_tuple__308 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_style, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setindexvalue, 1282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 1282, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1285
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 *     def splitModel(self, source):  # Driver             # <<<<<<<<<<<<<<
 *         """Sparation des multiModels.
 *         """
 */
  __pyx_tuple__310 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_target); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_splitModel, 1285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 1285, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1306
 * #        self.model = source  # a supprimer
 * 
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,             # <<<<<<<<<<<<<<
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,
 *             classif=False, nosynapse=0):    # Driver
 */
  __pyx_tuple__312 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_owner, __pyx_n_s_modelname, __pyx_n_s_inputs, __pyx_n_s_outputs, __pyx_n_s_hidden, __pyx_n_s_activfunc, __pyx_n_s_polytype, __pyx_n_s_modelData, __pyx_n_s_verbose, __pyx_n_s_classif, __pyx_n_s_nosynapse, __pyx_n_s_res); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);
  __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(12, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_createModel, 1306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __pyx_tuple__314 = PyTuple_Pack(11, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_2), ((PyObject*)__pyx_n_u_TANH), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None), ((PyObject *)__pyx_int_0), ((PyObject *)Py_False), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "metaphor/monal/driver/_driver.py":1331
 *         return res
 * 
 *     def checkModel(self):  # Driver # a developper             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_tuple__315 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);
  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_checkModel, 1331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(0, 1331, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1334
 *         return True
 * 
 *     def getNeuronOfId(self, valueid):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 */
  __pyx_tuple__317 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_valueid); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);
  __pyx_codeobj__318 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getNeuronOfId, 1334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__318)) __PYX_ERR(0, 1334, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1337
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 *     def initWeights(self, env=1, bias0=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.initWeights(env, bias0)
 * 
 */
  __pyx_tuple__319 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_env, __pyx_n_s_bias0, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);
  __pyx_codeobj__320 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_initWeights, 1337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__320)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __pyx_tuple__321 = PyTuple_Pack(2, ((PyObject *)__pyx_int_1), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);

  /* "metaphor/monal/driver/_driver.py":1340
 *         return self.mainModel.initWeights(env, bias0)
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver             # <<<<<<<<<<<<<<
 *         if value is None:
 *             if fname is None:
 */
  __pyx_tuple__322 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_fname); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);
  __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_writeCostFunction, 1340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __pyx_tuple__324 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "metaphor/monal/driver/_driver.py":1349
 *         self._costfunction = value
 * 
 *     def loadParameters(self, source, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if source is None: return
 *         if isinstance(source, (list, ndarray)):
 */
  __pyx_tuple__325 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);
  __pyx_codeobj__326 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadParameters, 1349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__326)) __PYX_ERR(0, 1349, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1367
 *             self.loadWeightsBinary(source)
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")
 */
  __pyx_tuple__327 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_datasource, __pyx_n_s_dataset, __pyx_n_s_dataformat, __pyx_n_s_datastyle, __pyx_n_s_normalize, __pyx_n_s_kwds, __pyx_n_s_ff, __pyx_n_s_ni, __pyx_n_s_no, __pyx_n_s_i, __pyx_n_s_st, __pyx_n_s_j, __pyx_n_s_il, __pyx_n_s_line, __pyx_n_s_stval, __pyx_n_s_value, __pyx_n_s_computelevel); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);
  __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(6, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_loadTrainingData, 1367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __pyx_tuple__329 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject*)__pyx_n_u_csv), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);

  /* "metaphor/monal/driver/_driver.py":1431
 *         return self
 * 
 *     def _UnNormalizeModel(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             return
 */
  __pyx_tuple__330 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_ni, __pyx_n_s_no, __pyx_n_s_ind, __pyx_n_s_value); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);
  __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_UnNormalizeModel, 1431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 1431, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1450
 *             self.outNormModel = None
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 */
  __pyx_tuple__332 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_nd, __pyx_n_s_result); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);
  __pyx_codeobj__333 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getNomalizingMatrixFromData, 1450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__333)) __PYX_ERR(0, 1450, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1465
 *         return result
 * 
 *     def hasOutputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.outputCount:
 */
  __pyx_tuple__334 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_res, __pyx_n_s_node); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);
  __pyx_codeobj__335 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_hasOutputMiniMaxi, 1465, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__335)) __PYX_ERR(0, 1465, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1473
 * 
 *     @Property
 *     def outputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasOutputMiniMaxi():
 *             return None
 */
  __pyx_tuple__336 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_res, __pyx_n_s_node); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);
  __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputsMinMaxList, 1473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(0, 1473, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1481
 *         return res
 * 
 *     def hasInputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.inputCount:
 */
  __pyx_tuple__338 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_res, __pyx_n_s_node); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);
  __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_hasInputMiniMaxi, 1481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) __PYX_ERR(0, 1481, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1489
 * 
 *     @Property
 *     def inputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasInputMiniMaxi():
 *             return None
 */
  __pyx_tuple__340 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_res, __pyx_n_s_node); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);
  __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputsMinMaxList, 1489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) __PYX_ERR(0, 1489, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1498
 * 
 *     @Property
 *     def inputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.inNormModel is not None:
 *             return self.inNormModel.data
 */
  __pyx_tuple__342 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s__173); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);
  __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputnorm, 1498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) __PYX_ERR(0, 1498, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1508
 *             return [[1.0,0.0] for _ in range(self.inputCount)]
 *     @inputnorm.setter
 *     def inputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.inNormModel = Normalizer(data=value)
 *     inputNorm = inputnorm
 */
  __pyx_tuple__344 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);
  __pyx_codeobj__345 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputnorm, 1508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__345)) __PYX_ERR(0, 1508, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1513
 * 
 *     @Property
 *     def outputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.outNormModel is not None:
 *             return self.outNormModel.data
 */
  __pyx_tuple__346 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s__173); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);
  __pyx_codeobj__347 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputnorm, 1513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__347)) __PYX_ERR(0, 1513, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1519
 *             return [[1.0,0.0] for _ in range(self.outputCount)]
 *     @outputnorm.setter
 *     def outputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.outNormModel = Normalizer(data=value)
 *     outputNorm = outputnorm
 */
  __pyx_tuple__348 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);
  __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_outputnorm, 1519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(0, 1519, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1523
 *     outputNorm = outputnorm
 * 
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver             # <<<<<<<<<<<<<<
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):
 */
  __pyx_tuple__350 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_inputnormindex, __pyx_n_s_outputnormindex, __pyx_n_s_scale, __pyx_n_s_shift, __pyx_n_s_ni, __pyx_n_s_no, __pyx_n_s_nd, __pyx_n_s_normnodes, __pyx_n_s_ind, __pyx_n_s_innode, __pyx_n_s_normnode, __pyx_n_s_outnode, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_name, __pyx_n_s_name); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);
  __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(5, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_normalizeModel, 1523, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __pyx_tuple__352 = PyTuple_Pack(4, ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);

  /* "metaphor/monal/driver/_driver.py":1580
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver             # <<<<<<<<<<<<<<
 *         if outResult is not None:
 *             self._outResult = outResult
 */
  __pyx_tuple__353 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_computelevel, __pyx_n_s_outResult, __pyx_n_s_no, __pyx_n_s_nd, __pyx_n_s_ns); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);
  __pyx_codeobj__354 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getComputeCondition, 1580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__354)) __PYX_ERR(0, 1580, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1598
 *         return computelevel
 * 
 *     def getResults(self, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsultats"""
 *         res = self._outResult
 */
  __pyx_tuple__355 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_donorm, __pyx_n_s_res); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);
  __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getResults, 1598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __pyx_tuple__357 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "metaphor/monal/driver/_driver.py":1606
 *         return res
 * 
 *     def getResiduals(self, donorm=True, deltares=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 */
  __pyx_tuple__358 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_donorm, __pyx_n_s_deltares, __pyx_n_s_res); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);
  __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getResiduals, 1606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __pyx_tuple__360 = PyTuple_Pack(2, ((PyObject *)Py_True), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "metaphor/monal/driver/_driver.py":1615
 *         return res + deltares  # averifier ici
 * 
 *     def getCost(self, donorm=True, doSum=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)
 */
  __pyx_tuple__361 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_donorm, __pyx_n_s_doSum, __pyx_n_s_res, __pyx_n_s_outindex, __pyx_n_s_param, __pyx_n_s_result); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);
  __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getCost, 1615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __pyx_tuple__363 = PyTuple_Pack(2, ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "metaphor/monal/driver/_driver.py":1631
 *         return squeeze(res)
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver             # <<<<<<<<<<<<<<
 *         if leverages is None:
 *             jacob = self.getjacobian(params)
 */
  __pyx_tuple__364 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_params, __pyx_n_s_leverages_2, __pyx_n_s_donorm, __pyx_n_s_root, __pyx_n_s_jacob, __pyx_n_s_residuals, __pyx_n_s_cumul, __pyx_n_s_residual, __pyx_n_s_leverage, __pyx_n_s_val); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 1631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);
  __pyx_codeobj__365 = (PyObject*)__Pyx_PyCode_New(5, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getPRESS, 1631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__365)) __PYX_ERR(0, 1631, __pyx_L1_error)
  __pyx_tuple__366 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 1631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "metaphor/monal/driver/_driver.py":1646
 *         return cumul
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # Driver             # <<<<<<<<<<<<<<
 *         return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 */
  __pyx_tuple__367 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_curw, __pyx_n_s_restable, __pyx_n_s_outputs, __pyx_n_s_jacobians, __pyx_n_s_actualepochs); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainingResults, 1646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __pyx_tuple__369 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "metaphor/monal/driver/_driver.py":1658
 *     #        return np .copy(self._jacobians[index, :, :])
 * 
 *     def getPrime(self, index=-1, doSum=True, cost=True, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture du jacobien ou du gradient du modle ou de la fonction de cot.
 *         Si cost est True, retourne le rsultat relatif  la fonction de cot,
 */
  __pyx_tuple__370 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_doSum, __pyx_n_s_cost, __pyx_n_s_donorm, __pyx_n_s_residual, __pyx_n_s_jacob, __pyx_n_s_res, __pyx_n_s_outIndex, __pyx_n_s_costD, __pyx_n_s_resloc); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);
  __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(5, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_getPrime, 1658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __pyx_tuple__372 = PyTuple_Pack(4, ((PyObject *)__pyx_int_neg_1), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);

  /* "metaphor/monal/driver/_driver.py":1690
 *         return res
 * 
 *     def computeTrainDataProgressive(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *     # Methode ancienne, hrite de Delphi.
 *     # A conserver pour faire des mesures de performance et des validations de resultats
 */
  __pyx_tuple__373 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_computelevel, __pyx_n_s_outResult, __pyx_n_s_dataindex, __pyx_n_s_indata, __pyx_n_s_back); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);
  __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainDataProgressive, 1690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(0, 1690, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1719
 *         return self._outResult
 * 
 *     def computeTrainDataDirect(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle)par la mthode directe.
 * Doit tre utilise pour les modles dynamiques
 */
  __pyx_tuple__375 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_computelevel, __pyx_n_s_outResult, __pyx_n_s_dataindex, __pyx_n_s_indata); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);
  __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainDataDirect, 1719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 1719, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1746
 *         return self._outResult
 * 
 *     def computeTrainData(self, computelevel=C.ID_COMPUTE, outResult=None):   # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle).
 * La mthode utilise est la propagation-retropropagation (mthode dite classique),
 */
  __pyx_tuple__377 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_computelevel, __pyx_n_s_outResult, __pyx_n_s_back); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);
  __pyx_codeobj__378 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_computeTrainData, 1746, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__378)) __PYX_ERR(0, 1746, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1779
 * #========================= debut des interfaces pour optimisation ==============
 * 
 *     def backupParamsNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         self._backupParams = array(self.mainModel.weights)
 *         return self.mainModel.synapseCount
 */
  __pyx_tuple__379 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);
  __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_backupParamsNT, 1779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(0, 1779, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1783
 *         return self.mainModel.synapseCount
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         if weights is not None:
 *             weights = self._backupParams + squeeze(asarray(weights))
 */
  __pyx_tuple__381 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_weights); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);
  __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_restoreParamsNT, 1783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __pyx_tuple__383 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);

  /* "metaphor/monal/driver/_driver.py":1790
 *         self.mainModel.loadParameters(weights)
 * 
 *     def costgradientNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         cost, grad = self.costAndPrime()
 *         return cost, grad, None
 */
  __pyx_tuple__384 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_cost, __pyx_n_s_grad); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);
  __pyx_codeobj__385 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_costgradientNT, 1790, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__385)) __PYX_ERR(0, 1790, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1794
 *         return cost, grad, None
 * 
 *     def costNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.cost()
 * 
 */
  __pyx_tuple__386 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);
  __pyx_codeobj__387 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_costNT, 1794, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__387)) __PYX_ERR(0, 1794, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1797
 *         return self.cost()
 * 
 *     def cost(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage.
 *         ce cot inclut l'effet de la fonction d'erreur de sortie"""
 */
  __pyx_tuple__388 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_mode, __pyx_n_s_mean, __pyx_n_s_donorm, __pyx_n_s_outCost); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 1797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);
  __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_cost, 1797, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) __PYX_ERR(0, 1797, __pyx_L1_error)
  __pyx_tuple__390 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject*)__pyx_n_u_integrated), ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 1797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);

  /* "metaphor/monal/driver/_driver.py":1818
 *         return outCost
 * 
 *     def costAndPrime(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage et le gradient de
 *         cette fonction par rapport aux paramtres.
 */
  __pyx_tuple__391 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_mode, __pyx_n_s_mean, __pyx_n_s_donorm, __pyx_n_s_cost, __pyx_n_s_grad); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);
  __pyx_codeobj__392 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_costAndPrime, 1818, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__392)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __pyx_tuple__393 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject*)__pyx_n_u_integrated), ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);

  /* "metaphor/monal/driver/_driver.py":1842
 *         return cost, grad
 * 
 *     def prime(self, weights=None, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le gradient de la fonction de cot par rapport aux paramtres.
 *         """
 */
  __pyx_tuple__394 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_donorm); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);
  __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_prime, 1842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __pyx_tuple__396 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);

  /* "metaphor/monal/driver/_driver.py":1855
 *         return self.getPrime(donorm=donorm)
 * 
 *     def residuals(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus normaliss du modle.
 */
  __pyx_tuple__397 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_res); if (unlikely(!__pyx_tuple__397)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__397);
  __Pyx_GIVEREF(__pyx_tuple__397);
  __pyx_codeobj__398 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_residuals, 1855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__398)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __pyx_tuple__399 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__399);
  __Pyx_GIVEREF(__pyx_tuple__399);

  /* "metaphor/monal/driver/_driver.py":1868
 *         return squeeze(res)
 * 
 *     def residualsPrime(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien normalis du modle.
 */
  __pyx_tuple__400 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_no, __pyx_n_s_nd, __pyx_n_s_ns, __pyx_n_s_back, __pyx_n_s_ind, __pyx_n_s_res); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);
  __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_residualsPrime, 1868, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __pyx_tuple__402 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);

  /* "metaphor/monal/driver/_driver.py":1899
 *         return sum(self._jacobians, axis = 0)
 * 
 *     def residuals2(self, weights=None, target=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus du modle.
 */
  __pyx_tuple__403 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_target, __pyx_n_s_model, __pyx_n_s_res, __pyx_n_s_res2); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__403);
  __Pyx_GIVEREF(__pyx_tuple__403);
  __pyx_codeobj__404 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_residuals2, 1899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__404)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_tuple__405 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__405);
  __Pyx_GIVEREF(__pyx_tuple__405);

  /* "metaphor/monal/driver/_driver.py":1919
 *         return res2
 * 
 *     def Jacobian2long(self, weights=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les sorties et le jacobien du modle.
 */
  __pyx_tuple__406 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_model, __pyx_n_s_result); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__406);
  __Pyx_GIVEREF(__pyx_tuple__406);
  __pyx_codeobj__407 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_Jacobian2long, 1919, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__407)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __pyx_tuple__408 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);

  /* "metaphor/monal/driver/_driver.py":1932
 *         return self._outputs, self._jacobians
 * 
 *     def Jacobian2(self, weights=None, target=None):  # Driver  #, inputs=Nonee, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien du modle, multipli par les rsidus.
 */
  __pyx_tuple__409 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_target, __pyx_n_s_outputs, __pyx_n_s_jacob, __pyx_n_s_residuals); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);
  __pyx_codeobj__410 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_Jacobian2, 1932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__410)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __pyx_tuple__411 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__411);
  __Pyx_GIVEREF(__pyx_tuple__411);

  /* "metaphor/monal/driver/_driver.py":1945
 *         #return jacob
 * 
 *     def cost2(self, weights=None, target=None):  # Driver  #, model=None, inputs=None             # <<<<<<<<<<<<<<
 *         res = self.residuals2(weights, target)
 *         return npsum(res**2)/2
 */
  __pyx_tuple__412 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_target, __pyx_n_s_res); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__412);
  __Pyx_GIVEREF(__pyx_tuple__412);
  __pyx_codeobj__413 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_cost2, 1945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__413)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __pyx_tuple__414 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__414);
  __Pyx_GIVEREF(__pyx_tuple__414);

  /* "metaphor/monal/driver/_driver.py":1949
 *         return npsum(res**2)/2
 * 
 *     def prime2(self, weights=None, target=None):  # Driver  #model=None, inputs=None,             # <<<<<<<<<<<<<<
 *         outputs, jacob = self.Jacobian2long(weights)
 *         #residuals = outputs - target
 */
  __pyx_tuple__415 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_weights, __pyx_n_s_target, __pyx_n_s_outputs, __pyx_n_s_jacob, __pyx_n_s_res); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__415);
  __Pyx_GIVEREF(__pyx_tuple__415);
  __pyx_codeobj__416 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__415, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_prime2, 1949, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__416)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __pyx_tuple__417 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__417)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__417);
  __Pyx_GIVEREF(__pyx_tuple__417);

  /* "metaphor/monal/driver/_driver.py":1958
 * 
 *     #
 *     def setLeverageComputation(self, level=0.95, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */
  __pyx_tuple__418 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_level, __pyx_n_s_doit, __pyx_n_s_nd, __pyx_n_s_no, __pyx_n_s_ind); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);
  __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setLeverageComputation, 1958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __pyx_tuple__420 = PyTuple_Pack(2, ((PyObject*)__pyx_float_0_95), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);

  /* "metaphor/monal/driver/_driver.py":1975
 *         return
 * 
 *     def setLeverageComputationOld(self, level=None, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */
  __pyx_tuple__421 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_level, __pyx_n_s_doit, __pyx_n_s_outproc); if (unlikely(!__pyx_tuple__421)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__421);
  __Pyx_GIVEREF(__pyx_tuple__421);
  __pyx_codeobj__422 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_setLeverageComputationOld, 1975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__422)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __pyx_tuple__423 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);

  /* "metaphor/monal/driver/_driver.py":1988
 *         return
 * 
 *     def isParallel(self):  # Driver             # <<<<<<<<<<<<<<
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 */
  __pyx_tuple__424 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__424);
  __Pyx_GIVEREF(__pyx_tuple__424);
  __pyx_codeobj__425 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_isParallel, 1988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__425)) __PYX_ERR(0, 1988, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1991
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,             # <<<<<<<<<<<<<<
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 */
  __pyx_tuple__426 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_initcount, __pyx_n_s_maxiter, __pyx_n_s_algo, __pyx_n_s_initweights, __pyx_n_s_seed, __pyx_n_s_callback_2, __pyx_n_s_criterion, __pyx_n_s_kwds, __pyx_n_s_best, __pyx_n_s_mem, __pyx_n_s_bests, __pyx_n_s_memw, __pyx_n_s_memdisp, __pyx_n_s_ind, __pyx_n_s_dim, __pyx_n_s_i, __pyx_n_s_startw, __pyx_n_s_cur, __pyx_n_s_N_2, __pyx_n_s_fopt, __pyx_n_s_resvec, __pyx_n_s_res); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__426);
  __Pyx_GIVEREF(__pyx_tuple__426);
  __pyx_codeobj__427 = (PyObject*)__Pyx_PyCode_New(8, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_multitrain, 1991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__427)) __PYX_ERR(0, 1991, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2051
 *         return bests
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,             # <<<<<<<<<<<<<<
 *             callback=None, **kwds):  # Driver
 *         """Lancement d'un apprentissage.
 */
  __pyx_tuple__428 = PyTuple_Pack(34, __pyx_n_s_self, __pyx_n_s_startWeights, __pyx_n_s_maxiter, __pyx_n_s_algo, __pyx_n_s_verbose, __pyx_n_s_callback_2, __pyx_n_s_kwds, __pyx_n_s_style, __pyx_n_s_optimize, __pyx_n_s_OKScipy, __pyx_n_s_N_2, __pyx_n_s_fcost, __pyx_n_s_prime, __pyx_n_s_residuals, __pyx_n_s_vecPrime, __pyx_n_s_mess, __pyx_n_s_targets, __pyx_n_s_args, __pyx_n_s_fopt, __pyx_n_s_popt, __pyx_n_s_code, __pyx_n_s_res, __pyx_n_s_Nf, __pyx_n_s_Ng, __pyx_n_s_cov, __pyx_n_s_infodict, __pyx_n_s_mesg, __pyx_n_s_ier, __pyx_n_s_warnflag, __pyx_n_s_gopt, __pyx_n_s_Bopt, __pyx_n_s_funcalls, __pyx_n_s_allvecs, __pyx_n_s_dat); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__428);
  __Pyx_GIVEREF(__pyx_tuple__428);
  __pyx_codeobj__429 = (PyObject*)__Pyx_PyCode_New(6, 0, 34, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_train, 2051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__429)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __pyx_tuple__430 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)__pyx_int_100), ((PyObject*)__pyx_n_u_LM_NT), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);

  /* "metaphor/monal/driver/_driver.py":2165
 * #        return res[0], res[1]/self.dataCount, res[2]
 * 
 *     def gradientCompute(self, inputs = None, outindex = 0):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 */
  __pyx_tuple__431 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_outindex); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__431);
  __Pyx_GIVEREF(__pyx_tuple__431);
  __pyx_codeobj__432 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_gradientCompute, 2165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__432)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __pyx_tuple__433 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__433);
  __Pyx_GIVEREF(__pyx_tuple__433);

  /* "metaphor/monal/driver/_driver.py":2168
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 *     def directInputGradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul du gradient du modle complet par rapport aux entres par la mthode directe
 *         """
 */
  __pyx_tuple__434 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_res, __pyx_n_s_ind); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__434);
  __Pyx_GIVEREF(__pyx_tuple__434);
  __pyx_codeobj__435 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_directInputGradient, 2168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__435)) __PYX_ERR(0, 2168, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2180
 *         return res
 * 
 *     def transferAndDirectGradient(self, inputs, gradient=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul simultan du transfert  travers le modle complet, et du gradient du
 *         modle complet par rapport aux paramtres par la mthode directe.
 */
  __pyx_tuple__436 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_gradient, __pyx_n_s_donorm, __pyx_n_s_middleoutputs, __pyx_n_s_outputs, __pyx_n_s_ind); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__436);
  __Pyx_GIVEREF(__pyx_tuple__436);
  __pyx_codeobj__437 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferAndDirectGradient, 2180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__437)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __pyx_tuple__438 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);

  /* "metaphor/monal/driver/_driver.py":2195
 *         return outputs, gradient
 * 
 *     def _expandvec(self, vec, inivec, fixed):             # <<<<<<<<<<<<<<
 *         index = 0
 *         target = []
 */
  __pyx_tuple__439 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_vec, __pyx_n_s_inivec, __pyx_n_s_fixed, __pyx_n_s_index, __pyx_n_s_target, __pyx_n_s_inivalue, __pyx_n_s_fix, __pyx_n_s_val); if (unlikely(!__pyx_tuple__439)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__439);
  __Pyx_GIVEREF(__pyx_tuple__439);
  __pyx_codeobj__440 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_expandvec, 2195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__440)) __PYX_ERR(0, 2195, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2207
 *         return asarray(target)
 * 
 *     def _reducevec(self, vec, fixed):             # <<<<<<<<<<<<<<
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 */
  __pyx_tuple__441 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vec, __pyx_n_s_fixed, __pyx_n_s_test, __pyx_n_s_val); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__441);
  __Pyx_GIVEREF(__pyx_tuple__441);
  __pyx_codeobj__442 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_reducevec, 2207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__442)) __PYX_ERR(0, 2207, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2210
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         res = self.inputTrainFunc(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 *         return npsum(res**2)
 */
  __pyx_tuple__443 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_inputsloc, __pyx_n_s_inputini, __pyx_n_s_fixedinputs, __pyx_n_s_outputtarget, __pyx_n_s_modelindex, __pyx_n_s_res); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__443);
  __Pyx_GIVEREF(__pyx_tuple__443);
  __pyx_codeobj__444 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__443, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputTrainCost, 2210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__444)) __PYX_ERR(0, 2210, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2214
 *         return npsum(res**2)
 * 
 *     def inputTrainFunc(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         """Cost function for input reverse computation
 *         """
 */
  __pyx_tuple__445 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_inputsloc, __pyx_n_s_inputini, __pyx_n_s_fixedinputs, __pyx_n_s_outputtarget, __pyx_n_s_modelindex, __pyx_n_s_fullinputs, __pyx_n_s_outputs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__445);
  __Pyx_GIVEREF(__pyx_tuple__445);
  __pyx_codeobj__446 = (PyObject*)__Pyx_PyCode_New(6, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__445, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputTrainFunc, 2214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__446)) __PYX_ERR(0, 2214, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2228
 *         return asarray([result - outputtarget])
 * 
 *     def inputTrainGrad(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         jacob, residual = self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 */
  __pyx_tuple__447 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_inputsloc, __pyx_n_s_inputini, __pyx_n_s_fixedinputs, __pyx_n_s_outputtarget, __pyx_n_s_modelindex, __pyx_n_s_jacob, __pyx_n_s_residual); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(0, 2228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__447);
  __Pyx_GIVEREF(__pyx_tuple__447);
  __pyx_codeobj__448 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__447, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputTrainGrad, 2228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__448)) __PYX_ERR(0, 2228, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2233
 *         return npsum(jacob, axis=0) * residual
 * 
 *     def inputTrainPrime(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */
  __pyx_tuple__449 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_inputsloc, __pyx_n_s_inputini, __pyx_n_s_fixedinputs, __pyx_n_s_outputtarget, __pyx_n_s_modelindex); if (unlikely(!__pyx_tuple__449)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__449);
  __Pyx_GIVEREF(__pyx_tuple__449);
  __pyx_codeobj__450 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__449, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputTrainPrime, 2233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__450)) __PYX_ERR(0, 2233, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2239
 *         return self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)[0]
 * 
 *     def inputTrainPrimeFull(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */
  __pyx_tuple__451 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_inputsloc, __pyx_n_s_inputini, __pyx_n_s_fixedinputs, __pyx_n_s_outputtarget, __pyx_n_s_modelindex, __pyx_n_s_fullinputs, __pyx_n_s_result, __pyx_n_s_outs, __pyx_n_s__173, __pyx_n_s_ingrads, __pyx_n_s_ingrad, __pyx_n_s_out, __pyx_n_s_residual, __pyx_n_s_trueGradList); if (unlikely(!__pyx_tuple__451)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__451);
  __Pyx_GIVEREF(__pyx_tuple__451);
  __pyx_codeobj__452 = (PyObject*)__Pyx_PyCode_New(6, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__451, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_inputTrainPrimeFull, 2239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__452)) __PYX_ERR(0, 2239, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2262
 *         return asarray([trueGradList]), residual
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,             # <<<<<<<<<<<<<<
 *         epochs=None, modelindex=-1, callback=None, debug=0, verbose=0):
 *         """Obtain the result of model reverse transfer.
 */
  __pyx_tuple__453 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_outputtarget, __pyx_n_s_inputs, __pyx_n_s_fixedinputs, __pyx_n_s_epochs, __pyx_n_s_modelindex, __pyx_n_s_callback_2, __pyx_n_s_debug, __pyx_n_s_verbose, __pyx_n_s_acc, __pyx_n_s_lst, __pyx_n_s_inname, __pyx_n_s_inputini, __pyx_n_s_args, __pyx_n_s_factor, __pyx_n_s_reducedinputs, __pyx_n_s_newreducedinputs, __pyx_n_s_code, __pyx_n_s_newinputs, __pyx_n_s__173); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__453);
  __Pyx_GIVEREF(__pyx_tuple__453);
  __pyx_codeobj__454 = (PyObject*)__Pyx_PyCode_New(9, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__453, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_reverse_train, 2262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__454)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __pyx_tuple__455 = PyTuple_Pack(7, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_neg_1), ((PyObject *)Py_None), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__455)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__455);
  __Pyx_GIVEREF(__pyx_tuple__455);

  /* "metaphor/monal/driver/_driver.py":2319
 *         return newinputs, code
 * 
 *     def transferExtra(self, inputs=None, style=C.TFR_STD, donorm=True,             # <<<<<<<<<<<<<<
 *             modelindex=-1):  #original=True,
 * 
 */
  __pyx_tuple__456 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_style, __pyx_n_s_donorm, __pyx_n_s_modelindex, __pyx_n_s_style0, __pyx_n_s_outputs, __pyx_n_s_grads, __pyx_n_s_ingrads, __pyx_n_s_levs, __pyx_n_s_gradval, __pyx_n_s_ingradval, __pyx_n_s_memweights, __pyx_n_s_res0, __pyx_n_s_res, __pyx_n_s_output, __pyx_n_s_weightloc, __pyx_n_s_disploc, __pyx_n_s_value, __pyx_n_s_gradvalue, __pyx_n_s_ingradvalue, __pyx_n_s_lev, __pyx_n_s_outlevs, __pyx_n_s_res, __pyx_n_s_lev); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);
  __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(5, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferExtra, 2319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) __PYX_ERR(0, 2319, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2374
 *             return outputs, grads, ingrads
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */
  __pyx_tuple__458 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_donorm, __pyx_n_s_output, __pyx_n_s_outputsicp, __pyx_n_s_outputsicm, __pyx_n_s_outputs, __pyx_n_s_memweights, __pyx_n_s_weightloc, __pyx_n_s_value); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);
  __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferExtraCI, 2374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __pyx_tuple__460 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);

  /* "metaphor/monal/driver/_driver.py":2397
 * # new KO ->OK avec suppression de donorm, et modif de  transferLeverages
 * 
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */
  __pyx_tuple__461 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_withCI, __pyx_n_s_modelindex, __pyx_n_s_outs, __pyx_n_s_levs, __pyx_n_s_stds, __pyx_n_s_CIp, __pyx_n_s_CIm, __pyx_n_s_out, __pyx_n_s_lev, __pyx_n_s_extrastddev_2, __pyx_n_s_weight, __pyx_n_s_disp, __pyx_n_s_std, __pyx_n_s_err, __pyx_n_s_students, __pyx_n_s_ic, __pyx_n_s__173, __pyx_n_s__173); if (unlikely(!__pyx_tuple__461)) __PYX_ERR(0, 2397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__461);
  __Pyx_GIVEREF(__pyx_tuple__461);
  __pyx_codeobj__462 = (PyObject*)__Pyx_PyCode_New(4, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__461, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferEx, 2397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__462)) __PYX_ERR(0, 2397, __pyx_L1_error)
  __pyx_tuple__463 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__463)) __PYX_ERR(0, 2397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__463);
  __Pyx_GIVEREF(__pyx_tuple__463);

  /* "metaphor/monal/driver/_driver.py":2448
 *         return outs, CIp, CIm, levs
 * 
 *     def transferLeverages(self, inputs=None, weights=None, disp=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modele, avec calcul des leviers.
 *         """
 */
  __pyx_tuple__464 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_weights, __pyx_n_s_disp, __pyx_n_s_donorm, __pyx_n_s_curweights, __pyx_n_s_curdisp, __pyx_n_s_res, __pyx_n_s_outs, __pyx_n_s_grad, __pyx_n_s_outputs, __pyx_n_s_no, __pyx_n_s_outlev, __pyx_n_s_mat, __pyx_n_s_ind, __pyx_n_s_gradloc, __pyx_n_s_value, __pyx_n_s_outindex); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__464);
  __Pyx_GIVEREF(__pyx_tuple__464);
  __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferLeverages, 2448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __pyx_tuple__466 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__466)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__466);
  __Pyx_GIVEREF(__pyx_tuple__466);

  /* "metaphor/monal/driver/_driver.py":2500
 *         return outputs, outlev
 * 
 *     def transferCI(self, inputs, donorm=True, withlev=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         """
 */
  __pyx_tuple__467 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_donorm, __pyx_n_s_withlev, __pyx_n_s_outputs, __pyx_n_s_leverages_2, __pyx_n_s_outputsicp, __pyx_n_s_outputsicm, __pyx_n_s_no, __pyx_n_s_ind, __pyx_n_s_ic); if (unlikely(!__pyx_tuple__467)) __PYX_ERR(0, 2500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__467);
  __Pyx_GIVEREF(__pyx_tuple__467);
  __pyx_codeobj__468 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferCI, 2500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__468)) __PYX_ERR(0, 2500, __pyx_L1_error)
  __pyx_tuple__469 = PyTuple_Pack(2, ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__469)) __PYX_ERR(0, 2500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__469);
  __Pyx_GIVEREF(__pyx_tuple__469);

  /* "metaphor/monal/driver/_driver.py":2539
 * 
 * 
 *     def transferCIOld(self, inputs, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         obsolete
 */
  __pyx_tuple__470 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_donorm, __pyx_n_s_outputs, __pyx_n_s_grad, __pyx_n_s__173, __pyx_n_s_outputsicp, __pyx_n_s_outputsicm, __pyx_n_s_no, __pyx_n_s_mat, __pyx_n_s_ind, __pyx_n_s_gradloc, __pyx_n_s_hh, __pyx_n_s_ic, __pyx_n_s_outindex); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__470);
  __Pyx_GIVEREF(__pyx_tuple__470);
  __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transferCIOld, 2539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __pyx_tuple__472 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__472);
  __Pyx_GIVEREF(__pyx_tuple__472);

  /* "metaphor/monal/driver/_driver.py":2575
 *         return outputs, outputsicp, outputsicm
 * 
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         gradient = None
 *         gradientInput = None
 */
  __pyx_tuple__473 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_style, __pyx_n_s_donorm, __pyx_n_s_kwds, __pyx_n_s_gradient, __pyx_n_s_gradientInput, __pyx_n_s_lev, __pyx_n_s_output, __pyx_n_s_res); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__473);
  __Pyx_GIVEREF(__pyx_tuple__473);
  __pyx_codeobj__474 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_transfer, 2575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__474)) __PYX_ERR(0, 2575, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2603
 *         return output, gradient, gradientInput
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver             # <<<<<<<<<<<<<<
 *         if inputs is None:
 *             return None
 */
  __pyx_tuple__475 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_inputs, __pyx_n_s_norminputgrad, __pyx_n_s_reverse); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(0, 2603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__475);
  __Pyx_GIVEREF(__pyx_tuple__475);
  __pyx_codeobj__476 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_normalizeInputs, 2603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__476)) __PYX_ERR(0, 2603, __pyx_L1_error)
  __pyx_tuple__477 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__477)) __PYX_ERR(0, 2603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__477);
  __Pyx_GIVEREF(__pyx_tuple__477);

  /* "metaphor/monal/driver/_driver.py":2621
 * 
 * 
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver             # <<<<<<<<<<<<<<
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 */
  __pyx_tuple__478 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_outputs, __pyx_n_s_normgrad, __pyx_n_s_reverse, __pyx_n_s_val); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);
  __pyx_codeobj__479 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_unnormalizeOutputs, 2621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__479)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __pyx_tuple__480 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__480)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__480);
  __Pyx_GIVEREF(__pyx_tuple__480);

  /* "metaphor/monal/driver/_driver.py":2642
 *         return outputs
 * 
 *     def backupParams(self):  # Driver             # <<<<<<<<<<<<<<
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 */
  __pyx_tuple__481 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__481)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__481);
  __Pyx_GIVEREF(__pyx_tuple__481);
  __pyx_codeobj__482 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_backupParams_2, 2642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__482)) __PYX_ERR(0, 2642, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2645
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver             # <<<<<<<<<<<<<<
 *         if values is not None:
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 */
  __pyx_tuple__483 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_decal); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__483);
  __Pyx_GIVEREF(__pyx_tuple__483);
  __pyx_codeobj__484 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_restoreParams, 2645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__484)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __pyx_tuple__485 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__485)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__485);
  __Pyx_GIVEREF(__pyx_tuple__485);

  /* "metaphor/monal/driver/_driver.py":2652
 * 
 *     @Property
 *     def dimension(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de variables du vecteur de paramtres"""
 *         return self.mainModel.dimension
 */
  __pyx_tuple__486 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__486)) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__486);
  __Pyx_GIVEREF(__pyx_tuple__486);
  __pyx_codeobj__487 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_dimension, 2652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__487)) __PYX_ERR(0, 2652, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2657
 * 
 *     @Property
 *     def indexInitialState(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Index des variables d'initialisation d'tat"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + self.mainModel.order
 */
  __pyx_tuple__488 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__488)) __PYX_ERR(0, 2657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);
  __pyx_codeobj__489 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_indexInitialState, 2657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__489)) __PYX_ERR(0, 2657, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2662
 * 
 *     @Property
 *     def dataWidth(self):             # <<<<<<<<<<<<<<
 *         """Largeur des donnes"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + 2*self.mainModel.order
 */
  __pyx_tuple__490 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(0, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);
  __pyx_codeobj__491 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_dataWidth, 2662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__491)) __PYX_ERR(0, 2662, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2667
 * 
 *     @Property
 *     def gradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:
 */
  __pyx_tuple__492 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__492)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__492);
  __Pyx_GIVEREF(__pyx_tuple__492);
  __pyx_codeobj__493 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_gradient, 2667, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__493)) __PYX_ERR(0, 2667, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2674
 * 
 *     @Property
 *     def hessian(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Matrice hessienne"""
 *         if self._hessian is None:
 */
  __pyx_tuple__494 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__494)) __PYX_ERR(0, 2674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__494);
  __Pyx_GIVEREF(__pyx_tuple__494);
  __pyx_codeobj__495 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_hessian_2, 2674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__495)) __PYX_ERR(0, 2674, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2681
 * 
 *     @Property
 *     def chrono(self):  # Driver             # <<<<<<<<<<<<<<
 *         rr = self._chrono
 *         self._chrono = 0
 */
  __pyx_tuple__496 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_rr); if (unlikely(!__pyx_tuple__496)) __PYX_ERR(0, 2681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__496);
  __Pyx_GIVEREF(__pyx_tuple__496);
  __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_chrono_2, 2681, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) __PYX_ERR(0, 2681, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2687
 * 
 *     @Property
 *     def dataCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self.isParallel():
 *             return self.mainModel.modelCount
 */
  __pyx_tuple__498 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);
  __pyx_codeobj__499 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_dataCount, 2687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__499)) __PYX_ERR(0, 2687, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2694
 *         return 0
 *     @dataCount.setter
 *     def sdataCount(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():
 */
  __pyx_tuple__500 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);
  __pyx_codeobj__501 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_sdataCount, 2694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__501)) __PYX_ERR(0, 2694, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2704
 *                 self._dataArray = None
 * 
 *     def _xmlText(self, decal):  # Driver             # <<<<<<<<<<<<<<
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 */
  __pyx_tuple__502 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_decal, __pyx_n_s_attr, __pyx_n_s_out, __pyx_n_s_outproc); if (unlikely(!__pyx_tuple__502)) __PYX_ERR(0, 2704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__502);
  __Pyx_GIVEREF(__pyx_tuple__502);
  __pyx_codeobj__503 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_xmlText, 2704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__503)) __PYX_ERR(0, 2704, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2713
 *         return '\n'.join(out), attr
 * 
 *     def toFullXML(self):  # Driver             # <<<<<<<<<<<<<<
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),
 *                cst.st_XMLStyleSheet, self.xml()]
 */
  __pyx_tuple__504 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_out); if (unlikely(!__pyx_tuple__504)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__504);
  __Pyx_GIVEREF(__pyx_tuple__504);
  __pyx_codeobj__505 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_toFullXML, 2713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__505)) __PYX_ERR(0, 2713, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2719
 * 
 *     @Property
 *     def NMLstring(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.toFullXML()
 * 
 */
  __pyx_tuple__506 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__506)) __PYX_ERR(0, 2719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__506);
  __Pyx_GIVEREF(__pyx_tuple__506);
  __pyx_codeobj__507 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__506, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_NMLstring, 2719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__507)) __PYX_ERR(0, 2719, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2722
 *         return self.toFullXML()
 * 
 *     def saveModel(self, filename="", savingformat=C.SF_XML, trainable=True,             # <<<<<<<<<<<<<<
 *             savedir=None, tempdir=None, package="", modeltemplate="m%d_",
 *             keeptemp=0, verbose=0, compiler="", forcelib=False,
 */
  __pyx_tuple__508 = PyTuple_Pack(27, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_savingformat, __pyx_n_s_trainable, __pyx_n_s_savedir, __pyx_n_s_tempdir, __pyx_n_s_package, __pyx_n_s_modeltemplate, __pyx_n_s_keeptemp, __pyx_n_s_verbose, __pyx_n_s_compiler, __pyx_n_s_forcelib, __pyx_n_s_forcecreate, __pyx_n_s_codeWriter, __pyx_n_s_dynamiclinking, __pyx_n_s_modulename, __pyx_n_s_originalsavedir, __pyx_n_s_codelist, __pyx_n_s_code, __pyx_n_s_clist, __pyx_n_s_st, __pyx_n_s_pathmem, __pyx_n_s_nm, __pyx_n_s_flist, __pyx_n_s_includedirs, __pyx_n_s_mainfile, __pyx_n_s_exports); if (unlikely(!__pyx_tuple__508)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__508);
  __Pyx_GIVEREF(__pyx_tuple__508);
  __pyx_codeobj__509 = (PyObject*)__Pyx_PyCode_New(15, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__508, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_saveModel, 2722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__509)) __PYX_ERR(0, 2722, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2938
 * 
 *     @Property
 *     def trainingData(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         """Donnees d'apprentissage.
 * Proprietes:
 */
  __pyx_tuple__510 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__510)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__510);
  __Pyx_GIVEREF(__pyx_tuple__510);
  __pyx_codeobj__511 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_trainingData, 2938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__511)) __PYX_ERR(0, 2938, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2950
 *         return self._dataArray[index, :]
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver             # <<<<<<<<<<<<<<
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 */
  __pyx_tuple__512 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_values); if (unlikely(!__pyx_tuple__512)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__512);
  __Pyx_GIVEREF(__pyx_tuple__512);
  __pyx_codeobj__513 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__512, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_strainingData, 2950, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__513)) __PYX_ERR(0, 2950, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2955
 *         self._dataArray[index, :] = values
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.dataCount
 *     @trainingData.lensetter
 */
  __pyx_tuple__514 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__514)) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__514);
  __Pyx_GIVEREF(__pyx_tuple__514);
  __pyx_codeobj__515 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_ltrainingData, 2955, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__515)) __PYX_ERR(0, 2955, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2958
 *         return self.dataCount
 *     @trainingData.lensetter
 *     def sltrainingData(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.dataCount = value
 * 
 */
  __pyx_tuple__516 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__516)) __PYX_ERR(0, 2958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__516);
  __Pyx_GIVEREF(__pyx_tuple__516);
  __pyx_codeobj__517 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_sltrainingData, 2958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__517)) __PYX_ERR(0, 2958, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2962
 * 
 *     @Property
 *     def confidenceLevel(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Niveau de confiance"""
 *         return self._confidencelevel
 */
  __pyx_tuple__518 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__518)) __PYX_ERR(0, 2962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__518);
  __Pyx_GIVEREF(__pyx_tuple__518);
  __pyx_codeobj__519 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_confidenceLevel, 2962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__519)) __PYX_ERR(0, 2962, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":2966
 *         return self._confidencelevel
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             from scipy import special
 */
  __pyx_tuple__520 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_special, __pyx_n_s_freedm); if (unlikely(!__pyx_tuple__520)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__520);
  __Pyx_GIVEREF(__pyx_tuple__520);
  __pyx_codeobj__521 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_confidenceLevel, 2966, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__521)) __PYX_ERR(0, 2966, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":3003
 * #         return res
 * 
 *     def addComment(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.addComment(value)
 * 
 */
  __pyx_tuple__522 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__522)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__522);
  __Pyx_GIVEREF(__pyx_tuple__522);
  __pyx_codeobj__523 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_addComment, 3003, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__523)) __PYX_ERR(0, 3003, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":994
 * 
 * #------------------------------------------------------------------------------
 * @Properties(("saveDir"), False)             # <<<<<<<<<<<<<<
 * class Driver(DriverBase):
 *     '''
 */
  __pyx_tuple__524 = PyTuple_Pack(2, __pyx_n_u_saveDir_2, Py_False); if (unlikely(!__pyx_tuple__524)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__524);
  __Pyx_GIVEREF(__pyx_tuple__524);

  /* "metaphor/monal/driver/_driver.py":3006
 *         self.mainModel.addComment(value)
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,             # <<<<<<<<<<<<<<
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 */
  __pyx_tuple__525 = PyTuple_Pack(12, __pyx_n_s_source, __pyx_n_s_filename, __pyx_n_s_savingformat, __pyx_n_s_count, __pyx_n_s_savedir, __pyx_n_s_tempdir, __pyx_n_s_package, __pyx_n_s_keeptemp, __pyx_n_s_compiler, __pyx_n_s_imax, __pyx_n_s_i, __pyx_n_s_model); if (unlikely(!__pyx_tuple__525)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__525);
  __Pyx_GIVEREF(__pyx_tuple__525);
  __pyx_codeobj__526 = (PyObject*)__Pyx_PyCode_New(9, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_monal_driver__driver_py, __pyx_n_s_saveModel, 3006, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__526)) __PYX_ERR(0, 3006, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":3202
 *     #===========================================================================
 * 
 *     print("done")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__527 = PyTuple_Pack(1, __pyx_n_u_done); if (unlikely(!__pyx_tuple__527)) __PYX_ERR(0, 3202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__527);
  __Pyx_GIVEREF(__pyx_tuple__527);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyUnicode_Type_format.type = (PyObject*)&PyUnicode_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_3 = PyFloat_FromDouble(0.3); if (unlikely(!__pyx_float_0_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_95 = PyFloat_FromDouble(0.95); if (unlikely(!__pyx_float_0_95)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_1e308 = PyFloat_FromDouble(-1e308); if (unlikely(!__pyx_float_neg_1e308)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_97 = PyInt_FromLong(97); if (unlikely(!__pyx_int_97)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_2 = PyInt_FromLong(-2); if (unlikely(!__pyx_int_neg_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_modinit_global_init_code(void); /*proto*/
static int __Pyx_modinit_variable_export_code(void); /*proto*/
static int __Pyx_modinit_function_export_code(void); /*proto*/
static int __Pyx_modinit_type_init_code(void); /*proto*/
static int __Pyx_modinit_type_import_code(void); /*proto*/
static int __Pyx_modinit_variable_import_code(void); /*proto*/
static int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_driver(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_driver(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__driver(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__driver(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static int __pyx_pymod_exec__driver(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__driver(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_driver", __pyx_methods, __pyx_k_Created_on_13_janv_2011_author, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_metaphor__monal__driver___driver) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "metaphor.monal.driver._driver")) {
      if (unlikely(PyDict_SetItemString(modules, "metaphor.monal.driver._driver", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  (void)__Pyx_modinit_type_init_code();
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "metaphor/monal/driver/_driver.py":38
 * # except:
 * #     from __builtin__ import zip, map
 * import warnings             # <<<<<<<<<<<<<<
 * import os, sys
 * import math
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":39
 * #     from __builtin__ import zip, map
 * import warnings
 * import os, sys             # <<<<<<<<<<<<<<
 * import math
 * import tempfile as tf
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":40
 * import warnings
 * import os, sys
 * import math             # <<<<<<<<<<<<<<
 * import tempfile as tf
 * from six import text_type, print_
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":41
 * import os, sys
 * import math
 * import tempfile as tf             # <<<<<<<<<<<<<<
 * from six import text_type, print_
 * from functools import reduce
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_tempfile, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tf, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":42
 * import math
 * import tempfile as tf
 * from six import text_type, print_             # <<<<<<<<<<<<<<
 * from functools import reduce
 * # import numpy as np
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_text_type);
  __Pyx_GIVEREF(__pyx_n_s_text_type);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_text_type);
  __Pyx_INCREF(__pyx_n_s_print_2);
  __Pyx_GIVEREF(__pyx_n_s_print_2);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_print_2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_six, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_text_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_text_type, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_print_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_print_2, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":43
 * import tempfile as tf
 * from six import text_type, print_
 * from functools import reduce             # <<<<<<<<<<<<<<
 * # import numpy as np
 * from numpy import ndarray,  asarray, zeros, ones, load, NaN, absolute,\
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_reduce);
  __Pyx_GIVEREF(__pyx_n_s_reduce);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_reduce);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_reduce); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":45
 * from functools import reduce
 * # import numpy as np
 * from numpy import ndarray,  asarray, zeros, ones, load, NaN, absolute,\             # <<<<<<<<<<<<<<
 *     corrcoef, sqrt, trace, savez_compressed, newaxis, squeeze, \
 *     identity, asmatrix, array, isscalar, double as npdouble, int as npint, \
 */
  __pyx_t_1 = PyList_New(22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_ndarray);
  __Pyx_GIVEREF(__pyx_n_s_ndarray);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ndarray);
  __Pyx_INCREF(__pyx_n_s_asarray);
  __Pyx_GIVEREF(__pyx_n_s_asarray);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_asarray);
  __Pyx_INCREF(__pyx_n_s_zeros);
  __Pyx_GIVEREF(__pyx_n_s_zeros);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_zeros);
  __Pyx_INCREF(__pyx_n_s_ones);
  __Pyx_GIVEREF(__pyx_n_s_ones);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_ones);
  __Pyx_INCREF(__pyx_n_s_load);
  __Pyx_GIVEREF(__pyx_n_s_load);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_load);
  __Pyx_INCREF(__pyx_n_s_NaN);
  __Pyx_GIVEREF(__pyx_n_s_NaN);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_NaN);
  __Pyx_INCREF(__pyx_n_s_absolute);
  __Pyx_GIVEREF(__pyx_n_s_absolute);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_absolute);
  __Pyx_INCREF(__pyx_n_s_corrcoef);
  __Pyx_GIVEREF(__pyx_n_s_corrcoef);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_corrcoef);
  __Pyx_INCREF(__pyx_n_s_sqrt);
  __Pyx_GIVEREF(__pyx_n_s_sqrt);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_sqrt);
  __Pyx_INCREF(__pyx_n_s_trace);
  __Pyx_GIVEREF(__pyx_n_s_trace);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_s_trace);
  __Pyx_INCREF(__pyx_n_s_savez_compressed);
  __Pyx_GIVEREF(__pyx_n_s_savez_compressed);
  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_s_savez_compressed);
  __Pyx_INCREF(__pyx_n_s_newaxis);
  __Pyx_GIVEREF(__pyx_n_s_newaxis);
  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_s_newaxis);
  __Pyx_INCREF(__pyx_n_s_squeeze);
  __Pyx_GIVEREF(__pyx_n_s_squeeze);
  PyList_SET_ITEM(__pyx_t_1, 12, __pyx_n_s_squeeze);
  __Pyx_INCREF(__pyx_n_s_identity);
  __Pyx_GIVEREF(__pyx_n_s_identity);
  PyList_SET_ITEM(__pyx_t_1, 13, __pyx_n_s_identity);
  __Pyx_INCREF(__pyx_n_s_asmatrix);
  __Pyx_GIVEREF(__pyx_n_s_asmatrix);
  PyList_SET_ITEM(__pyx_t_1, 14, __pyx_n_s_asmatrix);
  __Pyx_INCREF(__pyx_n_s_array);
  __Pyx_GIVEREF(__pyx_n_s_array);
  PyList_SET_ITEM(__pyx_t_1, 15, __pyx_n_s_array);
  __Pyx_INCREF(__pyx_n_s_isscalar);
  __Pyx_GIVEREF(__pyx_n_s_isscalar);
  PyList_SET_ITEM(__pyx_t_1, 16, __pyx_n_s_isscalar);
  __Pyx_INCREF(__pyx_n_s_double);
  __Pyx_GIVEREF(__pyx_n_s_double);
  PyList_SET_ITEM(__pyx_t_1, 17, __pyx_n_s_double);
  __Pyx_INCREF(__pyx_n_s_int);
  __Pyx_GIVEREF(__pyx_n_s_int);
  PyList_SET_ITEM(__pyx_t_1, 18, __pyx_n_s_int);
  __Pyx_INCREF(__pyx_n_s_float64);
  __Pyx_GIVEREF(__pyx_n_s_float64);
  PyList_SET_ITEM(__pyx_t_1, 19, __pyx_n_s_float64);
  __Pyx_INCREF(__pyx_n_s_copy);
  __Pyx_GIVEREF(__pyx_n_s_copy);
  PyList_SET_ITEM(__pyx_t_1, 20, __pyx_n_s_copy);
  __Pyx_INCREF(__pyx_n_s_sum);
  __Pyx_GIVEREF(__pyx_n_s_sum);
  PyList_SET_ITEM(__pyx_t_1, 21, __pyx_n_s_sum);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ndarray, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_asarray, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_zeros, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ones); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ones, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_load, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NaN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NaN, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_absolute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_absolute, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_corrcoef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_corrcoef, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sqrt, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_savez_compressed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_savez_compressed, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_newaxis, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_squeeze, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_identity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_identity, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_asmatrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_asmatrix, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_isscalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isscalar, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_double); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npdouble, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npint, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npfloat64, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npcopy, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npsum, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":49
 *     identity, asmatrix, array, isscalar, double as npdouble, int as npint, \
 *     float64 as npfloat64, copy as npcopy, sum as npsum  # nditer,
 * from numpy.lib.npyio import NpzFile             # <<<<<<<<<<<<<<
 * import numpy.random as rnd
 * from six import PY2
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_NpzFile);
  __Pyx_GIVEREF(__pyx_n_s_NpzFile);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NpzFile);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy_lib_npyio, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_NpzFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NpzFile, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":50
 *     float64 as npfloat64, copy as npcopy, sum as npsum  # nditer,
 * from numpy.lib.npyio import NpzFile
 * import numpy.random as rnd             # <<<<<<<<<<<<<<
 * from six import PY2
 * if PY2:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s__155);
  __Pyx_GIVEREF(__pyx_n_s__155);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__155);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy_random, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rnd, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":51
 * from numpy.lib.npyio import NpzFile
 * import numpy.random as rnd
 * from six import PY2             # <<<<<<<<<<<<<<
 * if PY2:
 *     import cPickle as pickle
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_PY2);
  __Pyx_GIVEREF(__pyx_n_s_PY2);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PY2);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PY2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PY2, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":52
 * import numpy.random as rnd
 * from six import PY2
 * if PY2:             # <<<<<<<<<<<<<<
 *     import cPickle as pickle
 * else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PY2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":53
 * from six import PY2
 * if PY2:
 *     import cPickle as pickle             # <<<<<<<<<<<<<<
 * else:
 *     import pickle
 */
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_cPickle, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickle, __pyx_t_1) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/monal/driver/_driver.py":52
 * import numpy.random as rnd
 * from six import PY2
 * if PY2:             # <<<<<<<<<<<<<<
 *     import cPickle as pickle
 * else:
 */
    goto __pyx_L2;
  }

  /* "metaphor/monal/driver/_driver.py":55
 *     import cPickle as pickle
 * else:
 *     import pickle             # <<<<<<<<<<<<<<
 * 
 * from ...nntoolbox.utils import getTempDir
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_pickle, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickle, __pyx_t_1) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L2:;

  /* "metaphor/monal/driver/_driver.py":57
 *     import pickle
 * 
 * from ...nntoolbox.utils import getTempDir             # <<<<<<<<<<<<<<
 * from ..Property import Property, Properties
 * from ..util.monalbase import Component, importXML, saveObj, MonalError
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_getTempDir);
  __Pyx_GIVEREF(__pyx_n_s_getTempDir);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_getTempDir);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_nntoolbox_utils, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_getTempDir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTempDir, __pyx_t_1) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":58
 * 
 * from ...nntoolbox.utils import getTempDir
 * from ..Property import Property, Properties             # <<<<<<<<<<<<<<
 * from ..util.monalbase import Component, importXML, saveObj, MonalError
 * #from nntoolbox.utils
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Property);
  __Pyx_GIVEREF(__pyx_n_s_Property);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Property);
  __Pyx_INCREF(__pyx_n_s_Properties);
  __Pyx_GIVEREF(__pyx_n_s_Properties);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Properties);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_Property, __pyx_t_2, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Property); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Property, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Properties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Properties, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":59
 * from ...nntoolbox.utils import getTempDir
 * from ..Property import Property, Properties
 * from ..util.monalbase import Component, importXML, saveObj, MonalError             # <<<<<<<<<<<<<<
 * #from nntoolbox.utils
 * #from ._dataset import DataManager
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Component);
  __Pyx_GIVEREF(__pyx_n_s_Component);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Component);
  __Pyx_INCREF(__pyx_n_s_importXML);
  __Pyx_GIVEREF(__pyx_n_s_importXML);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_importXML);
  __Pyx_INCREF(__pyx_n_s_saveObj);
  __Pyx_GIVEREF(__pyx_n_s_saveObj);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_saveObj);
  __Pyx_INCREF(__pyx_n_s_MonalError);
  __Pyx_GIVEREF(__pyx_n_s_MonalError);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_MonalError);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_util_monalbase, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Component); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Component, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_importXML); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_importXML, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_saveObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_saveObj, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MonalError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MonalError, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":62
 * #from nntoolbox.utils
 * #from ._dataset import DataManager
 * from ._optimizer import optim_leastsq, optim_bfgs             # <<<<<<<<<<<<<<
 * 
 * from ..model._monalfunc import classCostDict
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_optim_leastsq);
  __Pyx_GIVEREF(__pyx_n_s_optim_leastsq);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_optim_leastsq);
  __Pyx_INCREF(__pyx_n_s_optim_bfgs);
  __Pyx_GIVEREF(__pyx_n_s_optim_bfgs);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_optim_bfgs);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_optimizer, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_optim_leastsq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_optim_leastsq, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_optim_bfgs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_optim_bfgs, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":64
 * from ._optimizer import optim_leastsq, optim_bfgs
 * 
 * from ..model._monalfunc import classCostDict             # <<<<<<<<<<<<<<
 * from ..model import Model, Normalizer, Network, Polynom, Multimodel, \
 *     PseudoMatrix
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_classCostDict);
  __Pyx_GIVEREF(__pyx_n_s_classCostDict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_classCostDict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_model__monalfunc, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_classCostDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_classCostDict, __pyx_t_1) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":65
 * 
 * from ..model._monalfunc import classCostDict
 * from ..model import Model, Normalizer, Network, Polynom, Multimodel, \             # <<<<<<<<<<<<<<
 *     PseudoMatrix
 * from ..util.const_st import st_WEIGHTS
 */
  __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Model);
  __Pyx_GIVEREF(__pyx_n_s_Model);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Model);
  __Pyx_INCREF(__pyx_n_s_Normalizer);
  __Pyx_GIVEREF(__pyx_n_s_Normalizer);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Normalizer);
  __Pyx_INCREF(__pyx_n_s_Network);
  __Pyx_GIVEREF(__pyx_n_s_Network);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_Network);
  __Pyx_INCREF(__pyx_n_s_Polynom);
  __Pyx_GIVEREF(__pyx_n_s_Polynom);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_Polynom);
  __Pyx_INCREF(__pyx_n_s_Multimodel);
  __Pyx_GIVEREF(__pyx_n_s_Multimodel);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_Multimodel);
  __Pyx_INCREF(__pyx_n_s_PseudoMatrix);
  __Pyx_GIVEREF(__pyx_n_s_PseudoMatrix);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_PseudoMatrix);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_model, __pyx_t_2, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Model); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Model, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Normalizer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Normalizer, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Network); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Network, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Polynom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Polynom, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Multimodel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Multimodel, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PseudoMatrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PseudoMatrix, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":67
 * from ..model import Model, Normalizer, Network, Polynom, Multimodel, \
 *     PseudoMatrix
 * from ..util.const_st import st_WEIGHTS             # <<<<<<<<<<<<<<
 * from ..util.utils import compileAsExtension, compileAsDll, appdatadir, \
 *     is_windows
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_st_WEIGHTS);
  __Pyx_GIVEREF(__pyx_n_s_st_WEIGHTS);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_st_WEIGHTS);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_util_const_st, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_st_WEIGHTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_st_WEIGHTS, __pyx_t_1) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":68
 *     PseudoMatrix
 * from ..util.const_st import st_WEIGHTS
 * from ..util.utils import compileAsExtension, compileAsDll, appdatadir, \             # <<<<<<<<<<<<<<
 *     is_windows
 * 
 */
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_compileAsExtension);
  __Pyx_GIVEREF(__pyx_n_s_compileAsExtension);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_compileAsExtension);
  __Pyx_INCREF(__pyx_n_s_compileAsDll);
  __Pyx_GIVEREF(__pyx_n_s_compileAsDll);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_compileAsDll);
  __Pyx_INCREF(__pyx_n_s_appdatadir);
  __Pyx_GIVEREF(__pyx_n_s_appdatadir);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_appdatadir);
  __Pyx_INCREF(__pyx_n_s_is_windows);
  __Pyx_GIVEREF(__pyx_n_s_is_windows);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_is_windows);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_util_utils, __pyx_t_2, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_compileAsExtension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_compileAsExtension, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_compileAsDll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_compileAsDll, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_appdatadir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_appdatadir, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_is_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_windows, __pyx_t_2) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":71
 *     is_windows
 * 
 * from ...nntoolbox import utils as nntb             # <<<<<<<<<<<<<<
 * from ...nntoolbox.dataset import DataManager
 * from .. import __file__ as monalfile, monalconst as C, specialmath as sp
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_utils);
  __Pyx_GIVEREF(__pyx_n_s_utils);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_utils);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_nntoolbox, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nntb, __pyx_t_1) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":72
 * 
 * from ...nntoolbox import utils as nntb
 * from ...nntoolbox.dataset import DataManager             # <<<<<<<<<<<<<<
 * from .. import __file__ as monalfile, monalconst as C, specialmath as sp
 * from ..util import toolbox as tb, const_st as cst, monaltoolbox as mtb
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_DataManager);
  __Pyx_GIVEREF(__pyx_n_s_DataManager);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DataManager);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_nntoolbox_dataset, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DataManager); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataManager, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":73
 * from ...nntoolbox import utils as nntb
 * from ...nntoolbox.dataset import DataManager
 * from .. import __file__ as monalfile, monalconst as C, specialmath as sp             # <<<<<<<<<<<<<<
 * from ..util import toolbox as tb, const_st as cst, monaltoolbox as mtb
 * from ..lcode import codeconst as CC
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_file_2);
  __Pyx_GIVEREF(__pyx_n_s_file_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_file_2);
  __Pyx_INCREF(__pyx_n_s_monalconst);
  __Pyx_GIVEREF(__pyx_n_s_monalconst);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_monalconst);
  __Pyx_INCREF(__pyx_n_s_specialmath);
  __Pyx_GIVEREF(__pyx_n_s_specialmath);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_specialmath);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s__2, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_file_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_monalfile, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_monalconst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_specialmath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sp, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":74
 * from ...nntoolbox.dataset import DataManager
 * from .. import __file__ as monalfile, monalconst as C, specialmath as sp
 * from ..util import toolbox as tb, const_st as cst, monaltoolbox as mtb             # <<<<<<<<<<<<<<
 * from ..lcode import codeconst as CC
 * from ..lcode.codewriterC import CodeWriterC, createCodeWriter
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_toolbox);
  __Pyx_GIVEREF(__pyx_n_s_toolbox);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_toolbox);
  __Pyx_INCREF(__pyx_n_s_const_st);
  __Pyx_GIVEREF(__pyx_n_s_const_st);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_const_st);
  __Pyx_INCREF(__pyx_n_s_monaltoolbox);
  __Pyx_GIVEREF(__pyx_n_s_monaltoolbox);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_monaltoolbox);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_toolbox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tb, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_const_st); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cst, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_monaltoolbox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mtb, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":75
 * from .. import __file__ as monalfile, monalconst as C, specialmath as sp
 * from ..util import toolbox as tb, const_st as cst, monaltoolbox as mtb
 * from ..lcode import codeconst as CC             # <<<<<<<<<<<<<<
 * from ..lcode.codewriterC import CodeWriterC, createCodeWriter
 * from ..util.leverage import OutputProc
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_codeconst);
  __Pyx_GIVEREF(__pyx_n_s_codeconst);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_codeconst);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_lcode, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_codeconst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CC, __pyx_t_1) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":76
 * from ..util import toolbox as tb, const_st as cst, monaltoolbox as mtb
 * from ..lcode import codeconst as CC
 * from ..lcode.codewriterC import CodeWriterC, createCodeWriter             # <<<<<<<<<<<<<<
 * from ..util.leverage import OutputProc
 * from xml.etree.cElementTree import fromstring, parse
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_CodeWriterC);
  __Pyx_GIVEREF(__pyx_n_s_CodeWriterC);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CodeWriterC);
  __Pyx_INCREF(__pyx_n_s_createCodeWriter);
  __Pyx_GIVEREF(__pyx_n_s_createCodeWriter);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_createCodeWriter);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_lcode_codewriterC, __pyx_t_2, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CodeWriterC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CodeWriterC, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_createCodeWriter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_createCodeWriter, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":77
 * from ..lcode import codeconst as CC
 * from ..lcode.codewriterC import CodeWriterC, createCodeWriter
 * from ..util.leverage import OutputProc             # <<<<<<<<<<<<<<
 * from xml.etree.cElementTree import fromstring, parse
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_OutputProc);
  __Pyx_GIVEREF(__pyx_n_s_OutputProc);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OutputProc);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_util_leverage, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OutputProc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OutputProc, __pyx_t_1) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/monal/driver/_driver.py":78
 * from ..lcode.codewriterC import CodeWriterC, createCodeWriter
 * from ..util.leverage import OutputProc
 * from xml.etree.cElementTree import fromstring, parse             # <<<<<<<<<<<<<<
 * 
 * warnings.filterwarnings("ignore", category=RuntimeWarning)
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_fromstring);
  __Pyx_GIVEREF(__pyx_n_s_fromstring);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_fromstring);
  __Pyx_INCREF(__pyx_n_s_parse);
  __Pyx_GIVEREF(__pyx_n_s_parse);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_parse);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_xml_etree_cElementTree, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":80
 * from xml.etree.cElementTree import fromstring, parse
 * 
 * warnings.filterwarnings("ignore", category=RuntimeWarning)             # <<<<<<<<<<<<<<
 * 
 * def isNewWeight(target, weights):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_filterwarnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_category, __pyx_builtin_RuntimeWarning) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__156, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":82
 * warnings.filterwarnings("ignore", category=RuntimeWarning)
 * 
 * def isNewWeight(target, weights):             # <<<<<<<<<<<<<<
 *     if weights is None:
 *         return False
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_1isNewWeight, 0, __pyx_n_s_isNewWeight, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isNewWeight, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":104
 * #     return rnd.set_state(state)
 * 
 * def setCallback(doset=True, fct=None):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_3setCallback, 0, __pyx_n_s_setCallback, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__161);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setCallback, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":110
 * #     pass
 * 
 * def setSavingFormat( value ):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_5setSavingFormat, 0, __pyx_n_s_setSavingFormat, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setSavingFormat, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":120
 *     "extradispersions", "extrastddev", "extraVLOO",
 *     "lastoutput"), False)
 * class DriverBase(Component):             # <<<<<<<<<<<<<<
 * 
 *     mainModel = None
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Component); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_n_s_DriverBase, __pyx_n_s_DriverBase, (PyObject *) NULL, __pyx_n_s_metaphor_monal_driver__driver, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "metaphor/monal/driver/_driver.py":122
 * class DriverBase(Component):
 * 
 *     mainModel = None             # <<<<<<<<<<<<<<
 * #    _weights = None
 *     _dispersionMatrix = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_mainModel, Py_None) < 0) __PYX_ERR(0, 122, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":124
 *     mainModel = None
 * #    _weights = None
 *     _dispersionMatrix = None             # <<<<<<<<<<<<<<
 *     _extradispersions = None
 *     _extrastddev = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dispersionMatrix, Py_None) < 0) __PYX_ERR(0, 124, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":125
 * #    _weights = None
 *     _dispersionMatrix = None
 *     _extradispersions = None             # <<<<<<<<<<<<<<
 *     _extrastddev = None
 *     _extraVLOO = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extradispersions, Py_None) < 0) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":126
 *     _dispersionMatrix = None
 *     _extradispersions = None
 *     _extrastddev = None             # <<<<<<<<<<<<<<
 *     _extraVLOO = None
 * #     _halfDispersionMatrix = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extrastddev, Py_None) < 0) __PYX_ERR(0, 126, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":127
 *     _extradispersions = None
 *     _extrastddev = None
 *     _extraVLOO = None             # <<<<<<<<<<<<<<
 * #     _halfDispersionMatrix = None
 *     _extraweights = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extraVLOO, Py_None) < 0) __PYX_ERR(0, 127, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":129
 *     _extraVLOO = None
 * #     _halfDispersionMatrix = None
 *     _extraweights = None             # <<<<<<<<<<<<<<
 *     _studentvariable = 0.0
 *     _baselen = 0
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extraweights, Py_None) < 0) __PYX_ERR(0, 129, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":130
 * #     _halfDispersionMatrix = None
 *     _extraweights = None
 *     _studentvariable = 0.0             # <<<<<<<<<<<<<<
 *     _baselen = 0
 *     _stdtrain = 0.0
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_studentvariable, __pyx_float_0_0) < 0) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":131
 *     _extraweights = None
 *     _studentvariable = 0.0
 *     _baselen = 0             # <<<<<<<<<<<<<<
 *     _stdtrain = 0.0
 *     _confidencelevel = 0.95
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_baselen_2, __pyx_int_0) < 0) __PYX_ERR(0, 131, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":132
 *     _studentvariable = 0.0
 *     _baselen = 0
 *     _stdtrain = 0.0             # <<<<<<<<<<<<<<
 *     _confidencelevel = 0.95
 *     _leverages = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_stdtrain, __pyx_float_0_0) < 0) __PYX_ERR(0, 132, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":133
 *     _baselen = 0
 *     _stdtrain = 0.0
 *     _confidencelevel = 0.95             # <<<<<<<<<<<<<<
 *     _leverages = None
 *     _trainingResults = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_confidencelevel, __pyx_float_0_95) < 0) __PYX_ERR(0, 133, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":134
 *     _stdtrain = 0.0
 *     _confidencelevel = 0.95
 *     _leverages = None             # <<<<<<<<<<<<<<
 *     _trainingResults = None
 *     _bestList = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_leverages, Py_None) < 0) __PYX_ERR(0, 134, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":135
 *     _confidencelevel = 0.95
 *     _leverages = None
 *     _trainingResults = None             # <<<<<<<<<<<<<<
 *     _bestList = None
 *     _correlMatrix = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainingResults, Py_None) < 0) __PYX_ERR(0, 135, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":136
 *     _leverages = None
 *     _trainingResults = None
 *     _bestList = None             # <<<<<<<<<<<<<<
 *     _correlMatrix = None
 *     _determinant = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_bestList, Py_None) < 0) __PYX_ERR(0, 136, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":137
 *     _trainingResults = None
 *     _bestList = None
 *     _correlMatrix = None             # <<<<<<<<<<<<<<
 *     _determinant = None
 *     _jacobians = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_correlMatrix, Py_None) < 0) __PYX_ERR(0, 137, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":138
 *     _bestList = None
 *     _correlMatrix = None
 *     _determinant = None             # <<<<<<<<<<<<<<
 *     _jacobians = None
 *     _jacobian = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_determinant, Py_None) < 0) __PYX_ERR(0, 138, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":139
 *     _correlMatrix = None
 *     _determinant = None
 *     _jacobians = None             # <<<<<<<<<<<<<<
 *     _jacobian = None
 *     _lastaction = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_jacobians_2, Py_None) < 0) __PYX_ERR(0, 139, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":140
 *     _determinant = None
 *     _jacobians = None
 *     _jacobian = None             # <<<<<<<<<<<<<<
 *     _lastaction = None
 *     actualepochs = 0
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_jacobian, Py_None) < 0) __PYX_ERR(0, 140, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":141
 *     _jacobians = None
 *     _jacobian = None
 *     _lastaction = None             # <<<<<<<<<<<<<<
 *     actualepochs = 0
 *     _originParamCount = -1
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_lastaction, Py_None) < 0) __PYX_ERR(0, 141, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":142
 *     _jacobian = None
 *     _lastaction = None
 *     actualepochs = 0             # <<<<<<<<<<<<<<
 *     _originParamCount = -1
 *     _tab = ""
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_actualepochs, __pyx_int_0) < 0) __PYX_ERR(0, 142, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":143
 *     _lastaction = None
 *     actualepochs = 0
 *     _originParamCount = -1             # <<<<<<<<<<<<<<
 *     _tab = ""
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_originParamCount, __pyx_int_neg_1) < 0) __PYX_ERR(0, 143, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":144
 *     actualepochs = 0
 *     _originParamCount = -1
 *     _tab = ""             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, verbose=0):
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_tab, __pyx_kp_u__2) < 0) __PYX_ERR(0, 144, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":146
 *     _tab = ""
 * 
 *     def __init__(self, verbose=0):             # <<<<<<<<<<<<<<
 *         super(DriverBase, self).__init__(None)
 *         self.verbose = verbose
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_1__init__, 0, __pyx_n_s_DriverBase___init, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__166);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":153
 *         #self.wused = None
 * 
 *     def reprlst(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         lst = super(DriverBase, self).reprlst()
 *         lst.append("modelType : {}".format(self.modelType))
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_3reprlst, 0, __pyx_n_s_DriverBase_reprlst, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_reprlst, __pyx_t_5) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":160
 *         return lst
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def modelType(self):
 *         try:
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "metaphor/monal/driver/_driver.py":161
 * 
 *     @Property
 *     def modelType(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.modelType
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_5modelType, 0, __pyx_n_s_DriverBase_modelType, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_modelType_2, __pyx_t_5) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":166
 *         except:
 *             return 0  #self._modelType
 *     @modelType.setter             # <<<<<<<<<<<<<<
 *     def modelType(self, value):
 *         self.mainModel.modelType = value
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_modelType_2);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_modelType_2);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":167
 *             return 0  #self._modelType
 *     @modelType.setter
 *     def modelType(self, value):             # <<<<<<<<<<<<<<
 *         self.mainModel.modelType = value
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_7modelType, 0, __pyx_n_s_DriverBase_modelType, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_modelType_2, __pyx_t_5) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":170
 *         self.mainModel.modelType = value
 * 
 *     def signature(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.mainModel.signature()
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_9signature, 0, __pyx_n_s_DriverBase_signature, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_signature, __pyx_t_5) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":190
 *             return res
 * 
 *     def wused(self, paramNames=None): # ModelLib             # <<<<<<<<<<<<<<
 *         if paramNames is None:
 *             paramNames = self.paramNames
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_11wused, 0, __pyx_n_s_DriverBase_wused, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__178);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_wused, __pyx_t_5) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":205
 * 
 *     @property
 *     def weights(self):             # <<<<<<<<<<<<<<
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 *         if hasw:
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_13weights, 0, __pyx_n_s_DriverBase_weights, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":204
 *         return target
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def weights(self):
 *         hasw = hasattr(self, "_weights") and self._weights is not None
 */
  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_weights, __pyx_t_9) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":212
 *             return self.mainModel.weights
 *         return None
 *     @weights.setter             # <<<<<<<<<<<<<<
 *     def weights(self, value):
 *         self._weights = array(value).copy()
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_weights);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weights);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":213
 *         return None
 *     @weights.setter
 *     def weights(self, value):             # <<<<<<<<<<<<<<
 *         self._weights = array(value).copy()
 *         try:
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_15weights, 0, __pyx_n_s_DriverBase_weights, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_weights, __pyx_t_9) < 0) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":219
 *         except: pass
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def callback(self):  # DriverBase
 *         return self._callback
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":220
 * 
 *     @Property
 *     def callback(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._callback
 * #     @callback.setter
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_17callback, 0, __pyx_n_s_DriverBase_callback, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 219, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 219, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_callback_2, __pyx_t_9) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":226
 * #         self._callback = fct
 * 
 *     def setCallback(self, fct=None):             # <<<<<<<<<<<<<<
 *         self._callback = fct
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_19setCallback, 0, __pyx_n_s_DriverBase_setCallback, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__187);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setCallback, __pyx_t_9) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":229
 *         self._callback = fct
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def hasResampling(self):
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":230
 * 
 *     @Property
 *     def hasResampling(self):             # <<<<<<<<<<<<<<
 *         if (self._extraweights is not None) and self._extraweights.shape[0]:
 *             return self._extraweights.any()
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_21hasResampling, 0, __pyx_n_s_DriverBase_hasResampling, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hasResampling, __pyx_t_9) < 0) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":235
 *         return False
 * 
 *     def getNewWeights(self, stddev=0.3, keep0=[]):  # DriverBase             # <<<<<<<<<<<<<<
 *         """Create a new weights vector.
 *         The result is not affected to the Driver.weights property.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_23getNewWeights, 0, __pyx_n_s_DriverBase_getNewWeights, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_9)->__pyx_arg_keep0 = __pyx_t_8;
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_8__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getNewWeights, __pyx_t_9) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":245
 *         return result
 * 
 *     def loadWeightsXML(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         if target == self:
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_25loadWeightsXML, 0, __pyx_n_s_DriverBase_loadWeightsXML, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadWeightsXML, __pyx_t_9) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":281
 *             return target.loadWeightsXML(source)
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def dispersionMatrix(self):
 *         return self._dispersionMatrix
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":282
 * 
 *     @Property
 *     def dispersionMatrix(self):             # <<<<<<<<<<<<<<
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_27dispersionMatrix, 0, __pyx_n_s_DriverBase_dispersionMatrix, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dispersionMatrix_2, __pyx_t_9) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":284
 *     def dispersionMatrix(self):
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter             # <<<<<<<<<<<<<<
 *     def dispersionMatrix(self, value):
 *         self._dispersionMatrix = value
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_dispersionMatrix_2);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_dispersionMatrix_2);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":285
 *         return self._dispersionMatrix
 *     @dispersionMatrix.setter
 *     def dispersionMatrix(self, value):             # <<<<<<<<<<<<<<
 *         self._dispersionMatrix = value
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_29dispersionMatrix, 0, __pyx_n_s_DriverBase_dispersionMatrix, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dispersionMatrix_2, __pyx_t_9) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":288
 *         self._dispersionMatrix = value
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def trainingStddev(self):
 *         return self._stdtrain
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/monal/driver/_driver.py":289
 * 
 *     @Property
 *     def trainingStddev(self):             # <<<<<<<<<<<<<<
 *         return self._stdtrain
 *     @trainingStddev.setter
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_31trainingStddev, 0, __pyx_n_s_DriverBase_trainingStddev, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainingStddev, __pyx_t_9) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":291
 *     def trainingStddev(self):
 *         return self._stdtrain
 *     @trainingStddev.setter             # <<<<<<<<<<<<<<
 *     def trainingStddev(self, value):
 *         self._stdtrain = value
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_trainingStddev);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_trainingStddev);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":292
 *         return self._stdtrain
 *     @trainingStddev.setter
 *     def trainingStddev(self, value):             # <<<<<<<<<<<<<<
 *         self._stdtrain = value
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_33trainingStddev, 0, __pyx_n_s_DriverBase_trainingStddev, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainingStddev, __pyx_t_9) < 0) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":295
 *         self._stdtrain = value
 * 
 *     def loadFromDict(self, source, givetime=False): # ModelLib             # <<<<<<<<<<<<<<
 *         self._extradispersions = None
 *         self._extraweights = None
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_35loadFromDict, 0, __pyx_n_s_DriverBase_loadFromDict, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__204);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadFromDict, __pyx_t_9) < 0) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":394
 *             return False
 * 
 *     def loadWeightsBinary(self, source):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = False
 *         try:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_37loadWeightsBinary, 0, __pyx_n_s_DriverBase_loadWeightsBinary, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadWeightsBinary, __pyx_t_9) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":405
 *             return res
 * 
 *     def loadWeightsASCII(self, source, target):  # DriverBase             # <<<<<<<<<<<<<<
 *         #res = False
 *         #dim = 0
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_39loadWeightsASCII, 0, __pyx_n_s_DriverBase_loadWeightsASCII, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadWeightsASCII, __pyx_t_9) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":492
 *         return res
 * 
 *     def loadNormFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         outnorm = zeros((2,))
 *         for _ in range(2):
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_41loadNormFromASCIIStrList, 0, __pyx_n_s_DriverBase_loadNormFromASCIIStrL, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadNormFromASCIIStrList, __pyx_t_9) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":510
 *         return 2
 * 
 *     def loadFromASCIIStrList(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = bool(lst)
 *         if not res:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_43loadFromASCIIStrList, 0, __pyx_n_s_DriverBase_loadFromASCIIStrList, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadFromASCIIStrList, __pyx_t_9) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":551
 *         return dim
 * 
 *     def loadASCIIDispersion(self, lst, index):  # DriverBase             # <<<<<<<<<<<<<<
 *         dim = (self.dimension * (self.dimension + 1)) / 2
 *         st= lst[index]
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_45loadASCIIDispersion, 0, __pyx_n_s_DriverBase_loadASCIIDispersion, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadASCIIDispersion, __pyx_t_9) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":576
 *         return dim
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def extraCount(self):
 *         if self._extraweights is None:
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":577
 * 
 *     @Property
 *     def extraCount(self):             # <<<<<<<<<<<<<<
 *         if self._extraweights is None:
 *             return 0
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_47extraCount, 0, __pyx_n_s_DriverBase_extraCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extraCount_2, __pyx_t_9) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":582
 *         return self._extraweights.shape[0]
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def action(self):  # DriverBase
 *         return self._lastaction
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":583
 * 
 *     @Property
 *     def action(self):  # DriverBase             # <<<<<<<<<<<<<<
 *         return self._lastaction
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_49action, 0, __pyx_n_s_DriverBase_action, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_action, __pyx_t_9) < 0) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":586
 *         return self._lastaction
 * 
 *     @action.setter             # <<<<<<<<<<<<<<
 *     def _setaction(self, value):  # DriverBase
 *         #setting the action.
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_action);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_action);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":587
 * 
 *     @action.setter
 *     def _setaction(self, value):  # DriverBase             # <<<<<<<<<<<<<<
 *         #setting the action.
 *         if value == C.MA_CONFIDENCE_COMPUTATION:
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_51_setaction, 0, __pyx_n_s_DriverBase__setaction, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setaction, __pyx_t_9) < 0) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":596
 *         raise NotImplementedError()
 * 
 *     def computeFromJacobian(self, jacob, method=C.LEV_EARLY, full=False):  # DriverBase             # <<<<<<<<<<<<<<
 *         res = sp.getSVDChildren(jacob, method=method)
 *         halfDispersionMatrix, self._leverages, self._usageleverages, self._correlMatrix, \
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_53computeFromJacobian, 0, __pyx_n_s_DriverBase_computeFromJacobian, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_LEV_EARLY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_9)->__pyx_arg_method = __pyx_t_8;
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_10__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeFromJacobian, __pyx_t_9) < 0) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":605
 *         return self._leverages
 * 
 *     def computeUsageLeverages(self, params=None):# DriverBase             # <<<<<<<<<<<<<<
 *         dispersion = self._dispersionMatrix
 *         levs = []
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_55computeUsageLeverages, 0, __pyx_n_s_DriverBase_computeUsageLeverages, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__225);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeUsageLeverages, __pyx_t_9) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":614
 *         return asarray(levs)
 * 
 *     def getTransferResults(self, curw=None):  # DriverBase             # <<<<<<<<<<<<<<
 *         if curw is None:
 *             curw = self.weights
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_57getTransferResults, 0, __pyx_n_s_DriverBase_getTransferResults, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__228);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getTransferResults, __pyx_t_9) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":629
 *         return restable, jacob
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         if C.USE_INTEGRATED_LEVERAGE:
 *             return self.computeTrainingResultsIntegrated(curw, restable, outputs, jacobians, actualepochs)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_59computeTrainingResults, 0, __pyx_n_s_DriverBase_computeTrainingResult, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__231);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainingResults, __pyx_t_9) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":635
 *             return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 *     def computeTrainingResultsIntegrated(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode interne
 *         press, residuals, singular, leverages, self._dispersionMatrix, \
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_61computeTrainingResultsIntegrated, 0, __pyx_n_s_DriverBase_computeTrainingResult_2, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__234);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainingResultsIntegrated, __pyx_t_9) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":773
 * #         return results
 * 
 *     def computeTrainingResultsOld(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # DriverBase             # <<<<<<<<<<<<<<
 *         # methode externe
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_63computeTrainingResultsOld, 0, __pyx_n_s_DriverBase_computeTrainingResult_3, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__237);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainingResultsOld, __pyx_t_9) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":935
 * #         return results, restable
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # DriverBase             # <<<<<<<<<<<<<<
 *         if not savingformat in [C.SF_XML, C.SF_ASCII, C.SF_BINARY, C.SF_JSON]:
 *             return -1
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_10DriverBase_65saveParameters, 0, __pyx_n_s_DriverBase_saveParameters, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_9)->__pyx_arg_savingformat = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_12__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_saveParameters, __pyx_t_9) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":114
 * 
 * #------------------------------------------------------------------------------
 * @Properties(("dispersionMatrix", "studentvariable", "stdtrain", "mu",             # <<<<<<<<<<<<<<
 *     "confidencelevel", "trainingResults", "correlMatrix", "determinant",
 *     "leverages", "projectionMatrix", "rank", "jacobian",
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Properties); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/monal/driver/_driver.py":119
 *     "baselen", "extraweights", "extraweightslist", "originParamCount",
 *     "extradispersions", "extrastddev", "extraVLOO",
 *     "lastoutput"), False)             # <<<<<<<<<<<<<<
 * class DriverBase(Component):
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__241, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":120
 *     "extradispersions", "extrastddev", "extraVLOO",
 *     "lastoutput"), False)
 * class DriverBase(Component):             # <<<<<<<<<<<<<<
 * 
 *     mainModel = None
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DriverBase, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DriverBase, __pyx_t_9) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/monal/driver/_driver.py":995
 * #------------------------------------------------------------------------------
 * @Properties(("saveDir"), False)
 * class Driver(DriverBase):             # <<<<<<<<<<<<<<
 *     '''
 *     Pilote d'apprentissage de modle
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DriverBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_4, __pyx_n_s_Driver, __pyx_n_s_Driver, (PyObject *) NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_kp_s_Pilote_d_apprentissage_de_modle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "metaphor/monal/driver/_driver.py":999
 *     Pilote d'apprentissage de modle
 *     '''
 *     _version = None             # <<<<<<<<<<<<<<
 *     inNormModel = None
 *     outNormModel = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_version, Py_None) < 0) __PYX_ERR(0, 999, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1000
 *     '''
 *     _version = None
 *     inNormModel = None             # <<<<<<<<<<<<<<
 *     outNormModel = None
 *     _dataArray = None  # matrice de donnees
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inNormModel, Py_None) < 0) __PYX_ERR(0, 1000, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1001
 *     _version = None
 *     inNormModel = None
 *     outNormModel = None             # <<<<<<<<<<<<<<
 *     _dataArray = None  # matrice de donnees
 *     _inputArray = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outNormModel, Py_None) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1002
 *     inNormModel = None
 *     outNormModel = None
 *     _dataArray = None  # matrice de donnees             # <<<<<<<<<<<<<<
 *     _inputArray = None
 *     _outputArray = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dataArray, Py_None) < 0) __PYX_ERR(0, 1002, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1003
 *     outNormModel = None
 *     _dataArray = None  # matrice de donnees
 *     _inputArray = None             # <<<<<<<<<<<<<<
 *     _outputArray = None
 *     _met = None  #MoyenneEcartType des donnes
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputArray, Py_None) < 0) __PYX_ERR(0, 1003, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1004
 *     _dataArray = None  # matrice de donnees
 *     _inputArray = None
 *     _outputArray = None             # <<<<<<<<<<<<<<
 *     _met = None  #MoyenneEcartType des donnes
 *     _conditionning = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputArray, Py_None) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1005
 *     _inputArray = None
 *     _outputArray = None
 *     _met = None  #MoyenneEcartType des donnes             # <<<<<<<<<<<<<<
 *     _conditionning = None
 *     _saveDir = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_met, Py_None) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1006
 *     _outputArray = None
 *     _met = None  #MoyenneEcartType des donnes
 *     _conditionning = None             # <<<<<<<<<<<<<<
 *     _saveDir = None
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_conditionning, Py_None) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1007
 *     _met = None  #MoyenneEcartType des donnes
 *     _conditionning = None
 *     _saveDir = None             # <<<<<<<<<<<<<<
 * 
 *     _outProcList = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_saveDir, Py_None) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1009
 *     _saveDir = None
 * 
 *     _outProcList = None             # <<<<<<<<<<<<<<
 *     _gradient = None
 *     _hessian = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outProcList, Py_None) < 0) __PYX_ERR(0, 1009, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1010
 * 
 *     _outProcList = None
 *     _gradient = None             # <<<<<<<<<<<<<<
 *     _hessian = None
 *     _optimizer = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_gradient_2, Py_None) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1011
 *     _outProcList = None
 *     _gradient = None
 *     _hessian = None             # <<<<<<<<<<<<<<
 *     _optimizer = None
 *     _chrono = 0
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hessian, Py_None) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1012
 *     _gradient = None
 *     _hessian = None
 *     _optimizer = None             # <<<<<<<<<<<<<<
 *     _chrono = 0
 *     _trainable = True
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_optimizer, Py_None) < 0) __PYX_ERR(0, 1012, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1013
 *     _hessian = None
 *     _optimizer = None
 *     _chrono = 0             # <<<<<<<<<<<<<<
 *     _trainable = True
 *     _outputWeighting = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_chrono, __pyx_int_0) < 0) __PYX_ERR(0, 1013, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1014
 *     _optimizer = None
 *     _chrono = 0
 *     _trainable = True             # <<<<<<<<<<<<<<
 *     _outputWeighting = None
 *     _mode = ""
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainable_2, Py_True) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1015
 *     _chrono = 0
 *     _trainable = True
 *     _outputWeighting = None             # <<<<<<<<<<<<<<
 *     _mode = ""
 *     _outResult = None     # array(nd, no) des sor ties normalises
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputWeighting_2, Py_None) < 0) __PYX_ERR(0, 1015, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1016
 *     _trainable = True
 *     _outputWeighting = None
 *     _mode = ""             # <<<<<<<<<<<<<<
 *     _outResult = None     # array(nd, no) des sor ties normalises
 *     outGradient = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_mode_2, __pyx_kp_u__2) < 0) __PYX_ERR(0, 1016, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1017
 *     _outputWeighting = None
 *     _mode = ""
 *     _outResult = None     # array(nd, no) des sor ties normalises             # <<<<<<<<<<<<<<
 *     outGradient = None
 *     optimizer = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outResult_2, Py_None) < 0) __PYX_ERR(0, 1017, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1018
 *     _mode = ""
 *     _outResult = None     # array(nd, no) des sor ties normalises
 *     outGradient = None             # <<<<<<<<<<<<<<
 *     optimizer = None
 *     _backupParams = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outGradient, Py_None) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1019
 *     _outResult = None     # array(nd, no) des sor ties normalises
 *     outGradient = None
 *     optimizer = None             # <<<<<<<<<<<<<<
 *     _backupParams = None
 * #     _codeWriter = None
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_optimizer_2, Py_None) < 0) __PYX_ERR(0, 1019, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1020
 *     outGradient = None
 *     optimizer = None
 *     _backupParams = None             # <<<<<<<<<<<<<<
 * #     _codeWriter = None
 *     _propertyName = ""
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_backupParams, Py_None) < 0) __PYX_ERR(0, 1020, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1022
 *     _backupParams = None
 * #     _codeWriter = None
 *     _propertyName = ""             # <<<<<<<<<<<<<<
 * 
 *     def __init__( self, source="", modeldata=None, trainable=1, modelname=None,
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_propertyName_3, __pyx_kp_u__2) < 0) __PYX_ERR(0, 1022, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1024
 *     _propertyName = ""
 * 
 *     def __init__( self, source="", modeldata=None, trainable=1, modelname=None,             # <<<<<<<<<<<<<<
 *             inputs=1, outputs=1, hidden=2, activfunc="TANH", statelayer=-1,
 *             statenodeindex=-1, order=0, nosynapse=0, existingnode=0, polytype=0,
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_1__init__, 0, __pyx_n_s_Driver___init, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__244);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1090
 *         return
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         #self._codeWriter = None
 *         super(Driver, self).__del__()
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_3__del__, 0, __pyx_n_s_Driver___del, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_del, __pyx_t_9) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1094
 *         super(Driver, self).__del__()
 * 
 *     def setPseudoMatrix(self):             # <<<<<<<<<<<<<<
 *         self.mainModelMaster = self.mainModel
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_5setPseudoMatrix, 0, __pyx_n_s_Driver_setPseudoMatrix, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setPseudoMatrix, __pyx_t_9) < 0) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1098
 *         self.mainModel = PseudoMatrix(master=self.mainModelMaster)
 * 
 *     def setWeights(self, weights):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.setWeights(weights)
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_7setWeights, 0, __pyx_n_s_Driver_setWeights, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setWeights, __pyx_t_9) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1101
 *         self.mainModel.setWeights(weights)
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def trainable(self):
 *         return self._trainable
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1102
 * 
 *     @Property
 *     def trainable(self):             # <<<<<<<<<<<<<<
 *         return self._trainable
 *     @trainable.setter
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_9trainable, 0, __pyx_n_s_Driver_trainable, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainable, __pyx_t_9) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1104
 *     def trainable(self):
 *         return self._trainable
 *     @trainable.setter             # <<<<<<<<<<<<<<
 *     def trainable(self, value):
 *         self._trainable = value
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_trainable);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_trainable);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":1105
 *         return self._trainable
 *     @trainable.setter
 *     def trainable(self, value):             # <<<<<<<<<<<<<<
 *         self._trainable = value
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_11trainable, 0, __pyx_n_s_Driver_trainable, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1104, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainable, __pyx_t_9) < 0) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1108
 *         self._trainable = value
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def inputs(self, index):  # Driver
 *         val = self.mainModel.inputs[index]
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":1109
 * 
 *     @Property
 *     def inputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.inputs[index]
 *         if self.inNormModel:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_13inputs, 0, __pyx_n_s_Driver_inputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1108, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1108, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputs, __pyx_t_9) < 0) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1114
 *             return val * self.inNormModel.data[index, 0] + self.inNormModel.data[index, 1]
 *         return val
 *     @inputs.lengetter             # <<<<<<<<<<<<<<
 *     def inputs(self):  # Driver
 *         return self.inputCount
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_inputs);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_inputs);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lengetter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1115
 *         return val
 *     @inputs.lengetter
 *     def inputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.inputCount
 *     @inputs.setter
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_15inputs, 0, __pyx_n_s_Driver_inputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1114, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1114, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputs, __pyx_t_9) < 0) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1117
 *     def inputs(self):  # Driver
 *         return self.inputCount
 *     @inputs.setter             # <<<<<<<<<<<<<<
 *     def inputs(self, index, value):  # Driver
 *         if self.inNormModel:
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_inputs);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_inputs);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1118
 *         return self.inputCount
 *     @inputs.setter
 *     def inputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.inNormModel:
 *             value = (value - self.inNormModel.data[index, 1]) / self.inNormModel.data[index, 0]
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_17inputs, 0, __pyx_n_s_Driver_inputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputs, __pyx_t_9) < 0) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1123
 *         self.mainModel.inputs[index].value = value
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def outputs(self, index):  # Driver
 *         val = self.mainModel.outputs[index]
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1124
 * 
 *     @Property
 *     def outputs(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         val = self.mainModel.outputs[index]
 *         if self.outNormModel:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_19outputs, 0, __pyx_n_s_Driver_outputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputs, __pyx_t_9) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1131
 *             return val * self.outNormModel.data[0] + self.outNormModel.data[1]
 *         return val
 *     @outputs.lengetter             # <<<<<<<<<<<<<<
 *     def outputs(self):  # Driver
 *         return self.mainModel.outputCount
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_outputs);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_outputs);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_lengetter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":1132
 *         return val
 *     @outputs.lengetter
 *     def outputs(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 *     @outputs.setter
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_21outputs, 0, __pyx_n_s_Driver_outputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1131, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1131, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputs, __pyx_t_9) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1134
 *     def outputs(self):  # Driver
 *         return self.mainModel.outputCount
 *     @outputs.setter             # <<<<<<<<<<<<<<
 *     def outputs(self, index, value):  # Driver
 *         if self.outNormModel:
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_outputs);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_outputs);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1135
 *         return self.mainModel.outputCount
 *     @outputs.setter
 *     def outputs(self, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         if self.outNormModel:
 *             if self.outNormModel.data.ndim == 2:
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_23outputs, 0, __pyx_n_s_Driver_outputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputs, __pyx_t_9) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1144
 * 
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def propertyName(self):
 *         val = ""
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "metaphor/monal/driver/_driver.py":1145
 * 
 *     @Property
 *     def propertyName(self):             # <<<<<<<<<<<<<<
 *         val = ""
 *         if self._propertyName:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_25propertyName, 0, __pyx_n_s_Driver_propertyName, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1144, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_propertyName_2, __pyx_t_9) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1152
 *             val = self.mainModel.outputNames[0]
 *         return val
 *     @propertyName.setter             # <<<<<<<<<<<<<<
 *     def propertyName(self, value):
 *         self._propertyName = value
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_propertyName_2);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_propertyName_2);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":1153
 *         return val
 *     @propertyName.setter
 *     def propertyName(self, value):             # <<<<<<<<<<<<<<
 *         self._propertyName = value
 *         if hasattr(self, 'mainModel') and self.mainModel.outputCount==1:
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_27propertyName, 0, __pyx_n_s_Driver_propertyName, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1152, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1152, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_propertyName_2, __pyx_t_9) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1158
 *             self.mainModel.outputNames[0] = value
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def extendedInputCount(self):
 *         return self.mainModel.extendedInputCount
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1159
 * 
 *     @Property
 *     def extendedInputCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.extendedInputCount
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_29extendedInputCount, 0, __pyx_n_s_Driver_extendedInputCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extendedInputCount, __pyx_t_9) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1162
 *         return self.mainModel.extendedInputCount
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def inputCount(self):  # Driver
 *         return self.mainModel.inputCount
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1163
 * 
 *     @Property
 *     def inputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.inputCount
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_31inputCount, 0, __pyx_n_s_Driver_inputCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputCount, __pyx_t_9) < 0) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1166
 *         return self.mainModel.inputCount
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def outputCount(self):  # Driver
 *         return self.mainModel.outputCount
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1167
 * 
 *     @Property
 *     def outputCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.outputCount
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_33outputCount, 0, __pyx_n_s_Driver_outputCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1166, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1166, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1166, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputCount, __pyx_t_9) < 0) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1170
 *         return self.mainModel.outputCount
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def paramCount(self):  # Driver
 *         return self.mainModel.paramCount
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1171
 * 
 *     @Property
 *     def paramCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.paramCount
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_35paramCount, 0, __pyx_n_s_Driver_paramCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1170, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1170, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_paramCount, __pyx_t_9) < 0) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1175
 * 
 *     @property
 *     def longParamCount(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.longParamCount
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_37longParamCount, 0, __pyx_n_s_Driver_longParamCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "metaphor/monal/driver/_driver.py":1174
 *         return self.mainModel.paramCount
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def longParamCount(self):
 *         return self.mainModel.longParamCount
 */
  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_longParamCount, __pyx_t_8) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":1179
 * 
 *     @property
 *     def useLongParams(self):             # <<<<<<<<<<<<<<
 *         return self.mainModel.useLongParams
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_39useLongParams, 0, __pyx_n_s_Driver_useLongParams, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1178
 *         return self.mainModel.longParamCount
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def useLongParams(self):
 *         return self.mainModel.useLongParams
 */
  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_useLongParams, __pyx_t_9) < 0) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1182
 *         return self.mainModel.useLongParams
 * 
 *     def gettargets(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.targets
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_41gettargets, 0, __pyx_n_s_Driver_gettargets, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_gettargets, __pyx_t_9) < 0) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1185
 *         return self.mainModel.targets
 * 
 *     def getlastresiduals(self, curw=None):  # Driver             # <<<<<<<<<<<<<<
 *         return self._outputs - self.mainModel.targets
 * #    getresiduals = getlastresiduals
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_43getlastresiduals, 0, __pyx_n_s_Driver_getlastresiduals, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__287);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getlastresiduals, __pyx_t_9) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1189
 * #    getresiduals = getlastresiduals
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def parameterNames(self, index):  # Driver
 *         try:
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1190
 * 
 *     @Property
 *     def parameterNames(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             lst = self.mainModel.parameterNames
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_45parameterNames, 0, __pyx_n_s_Driver_parameterNames, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1189, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_parameterNames, __pyx_t_9) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1196
 *             lst = self.mainModel.paramList()
 *         return lst[index]
 *     @parameterNames.lengetter             # <<<<<<<<<<<<<<
 *     def lparameterNames(self):  # Driver
 *         return self.paramCount
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_parameterNames);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_parameterNames);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_lengetter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":1197
 *         return lst[index]
 *     @parameterNames.lengetter
 *     def lparameterNames(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.paramCount
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_47lparameterNames, 0, __pyx_n_s_Driver_lparameterNames, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1196, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_lparameterNames, __pyx_t_9) < 0) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1208
 *     #===========================================================================
 * 
 *     def saveParameters(self, filename, savingformat=C.SF_XML):  # Driver             # <<<<<<<<<<<<<<
 *         if savingformat == C.SF_BINARY:
 *             savez_compressed(filename, propertyname=self.propertyName,
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_49saveParameters, 0, __pyx_n_s_Driver_saveParameters, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_9)->__pyx_arg_savingformat = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_14__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_saveParameters, __pyx_t_9) < 0) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1240
 *             self.mainModel.saveParameters(filename, savingformat)
 * 
 *     def getinfo(self, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.INPUT_COUNT:
 *             return self.mainModel.inputCount
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_51getinfo, 0, __pyx_n_s_Driver_getinfo, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getinfo, __pyx_t_9) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1257
 *         raise MonalError ("getinfo incomplete with style = {}".format(style))
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def useOriginal(self):  # Driver
 *         return self.mainModel.useOriginal
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":1258
 * 
 *     @Property
 *     def useOriginal(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_53useOriginal, 0, __pyx_n_s_Driver_useOriginal, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_useOriginal, __pyx_t_9) < 0) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1260
 *     def useOriginal(self):  # Driver
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter             # <<<<<<<<<<<<<<
 *     def suseOriginal(self, value):  # Driver
 *         self.mainModel.useOriginal = value
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_useOriginal);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_useOriginal);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":1261
 *         return self.mainModel.useOriginal
 *     @useOriginal.setter
 *     def suseOriginal(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.useOriginal = value
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_55suseOriginal, 0, __pyx_n_s_Driver_suseOriginal, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_suseOriginal, __pyx_t_9) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1264
 *         self.mainModel.useOriginal = value
 * 
 *     def getrealvalue(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_57getrealvalue, 0, __pyx_n_s_Driver_getrealvalue, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getrealvalue, __pyx_t_9) < 0) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1267
 *         raise MonalError ("getrealvalue incomplete with style = {}".format(style))
 * 
 *     def getindexinfo(self, param, style):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.II_P_LAYER_LENGTH:
 *             return self.mainModel.layerLength(param)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_59getindexinfo, 0, __pyx_n_s_Driver_getindexinfo, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getindexinfo, __pyx_t_9) < 0) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1276
 *         raise MonalError ("getindexinfo incomplete with style = {}".format(style))
 * 
 *     def setivalue(self, style, value):  # Driver             # <<<<<<<<<<<<<<
 *         if style == C.DEBUGDLL: return
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_61setivalue, 0, __pyx_n_s_Driver_setivalue, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setivalue, __pyx_t_9) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1279
 *         if style == C.DEBUGDLL: return
 * 
 *     def setrealvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_63setrealvalue, 0, __pyx_n_s_Driver_setrealvalue, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setrealvalue, __pyx_t_9) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1282
 *         raise NotImplementedError("setrealvalue not implemented yet")
 * 
 *     def setindexvalue(self, style, index, value):  # Driver             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_65setindexvalue, 0, __pyx_n_s_Driver_setindexvalue, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setindexvalue, __pyx_t_9) < 0) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1285
 *         raise NotImplementedError("setindexvaluenNot implemented yet")
 * 
 *     def splitModel(self, source):  # Driver             # <<<<<<<<<<<<<<
 *         """Sparation des multiModels.
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_67splitModel, 0, __pyx_n_s_Driver_splitModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_splitModel, __pyx_t_9) < 0) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1306
 * #        self.model = source  # a supprimer
 * 
 *     def _createModel(self, owner=None, modelname=None, inputs=1, outputs=0,             # <<<<<<<<<<<<<<
 *             hidden=2, activfunc="TANH", polytype=0, modelData=None, verbose=0,
 *             classif=False, nosynapse=0):    # Driver
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_69_createModel, 0, __pyx_n_s_Driver__createModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__313)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__314);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_createModel, __pyx_t_9) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1331
 *         return res
 * 
 *     def checkModel(self):  # Driver # a developper             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_71checkModel, 0, __pyx_n_s_Driver_checkModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_checkModel, __pyx_t_9) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1334
 *         return True
 * 
 *     def getNeuronOfId(self, valueid):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_73getNeuronOfId, 0, __pyx_n_s_Driver_getNeuronOfId, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__318)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getNeuronOfId, __pyx_t_9) < 0) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1337
 *         return self.mainModel.getNeuronOfId(valueid)
 * 
 *     def initWeights(self, env=1, bias0=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.initWeights(env, bias0)
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_75initWeights, 0, __pyx_n_s_Driver_initWeights, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__320)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__321);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_initWeights, __pyx_t_9) < 0) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1340
 *         return self.mainModel.initWeights(env, bias0)
 * 
 *     def writeCostFunction(self, value=None, fname=None):    # Driver             # <<<<<<<<<<<<<<
 *         if value is None:
 *             if fname is None:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_77writeCostFunction, 0, __pyx_n_s_Driver_writeCostFunction, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__323)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__324);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_writeCostFunction, __pyx_t_9) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1349
 *         self._costfunction = value
 * 
 *     def loadParameters(self, source, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if source is None: return
 *         if isinstance(source, (list, ndarray)):
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_79loadParameters, 0, __pyx_n_s_Driver_loadParameters, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__326)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadParameters, __pyx_t_9) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1367
 *             self.loadWeightsBinary(source)
 * 
 *     def loadTrainingData(self, datasource=None, dataset=None, dataformat=None, datastyle="csv", normalize=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if datasource is not None and dataset is not None:
 *             raise MonalError ("Either file source or dataset but not both")
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_81loadTrainingData, 0, __pyx_n_s_Driver_loadTrainingData, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__329);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_loadTrainingData, __pyx_t_9) < 0) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1431
 *         return self
 * 
 *     def _UnNormalizeModel(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             return
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_83_UnNormalizeModel, 0, __pyx_n_s_Driver__UnNormalizeModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_UnNormalizeModel, __pyx_t_9) < 0) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1450
 *             self.outNormModel = None
 * 
 *     def getNomalizingMatrixFromData(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self._dataArray is None:
 *             nd = self.mainModel.inputCount + self.mainModel.outputCount
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_85getNomalizingMatrixFromData, 0, __pyx_n_s_Driver_getNomalizingMatrixFromDa, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__333)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getNomalizingMatrixFromData, __pyx_t_9) < 0) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1465
 *         return result
 * 
 *     def hasOutputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.outputCount:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_87hasOutputMiniMaxi, 0, __pyx_n_s_Driver_hasOutputMiniMaxi, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__335)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hasOutputMiniMaxi, __pyx_t_9) < 0) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1472
 *         return res
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def outputsMinMaxList(self):
 *         if not self.hasOutputMiniMaxi():
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/monal/driver/_driver.py":1473
 * 
 *     @Property
 *     def outputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasOutputMiniMaxi():
 *             return None
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_89outputsMinMaxList, 0, __pyx_n_s_Driver_outputsMinMaxList, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__337)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputsMinMaxList, __pyx_t_9) < 0) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1481
 *         return res
 * 
 *     def hasInputMiniMaxi(self):             # <<<<<<<<<<<<<<
 *         res = False
 *         if self.inputCount:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_91hasInputMiniMaxi, 0, __pyx_n_s_Driver_hasInputMiniMaxi, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__339)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hasInputMiniMaxi, __pyx_t_9) < 0) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1488
 *         return res
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def inputsMinMaxList(self):
 *         if not self.hasInputMiniMaxi():
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/monal/driver/_driver.py":1489
 * 
 *     @Property
 *     def inputsMinMaxList(self):             # <<<<<<<<<<<<<<
 *         if not self.hasInputMiniMaxi():
 *             return None
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_93inputsMinMaxList, 0, __pyx_n_s_Driver_inputsMinMaxList, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__341)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputsMinMaxList, __pyx_t_9) < 0) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1497
 *         return res
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def inputnorm(self):
 *         if self.inNormModel is not None:
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/monal/driver/_driver.py":1498
 * 
 *     @Property
 *     def inputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.inNormModel is not None:
 *             return self.inNormModel.data
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_95inputnorm, 0, __pyx_n_s_Driver_inputnorm, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__343)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1497, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1497, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputnorm, __pyx_t_9) < 0) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1507
 *         else:
 *             return [[1.0,0.0] for _ in range(self.inputCount)]
 *     @inputnorm.setter             # <<<<<<<<<<<<<<
 *     def inputnorm(self, value):
 *         self.inNormModel = Normalizer(data=value)
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_inputnorm);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_inputnorm);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":1508
 *             return [[1.0,0.0] for _ in range(self.inputCount)]
 *     @inputnorm.setter
 *     def inputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.inNormModel = Normalizer(data=value)
 *     inputNorm = inputnorm
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_97inputnorm, 0, __pyx_n_s_Driver_inputnorm, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__345)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1507, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1507, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputnorm, __pyx_t_9) < 0) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1510
 *     def inputnorm(self, value):
 *         self.inNormModel = Normalizer(data=value)
 *     inputNorm = inputnorm             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_inputnorm);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_inputnorm);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputNorm, __pyx_t_9) < 0) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1512
 *     inputNorm = inputnorm
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def outputnorm(self):
 *         if self.outNormModel is not None:
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "metaphor/monal/driver/_driver.py":1513
 * 
 *     @Property
 *     def outputnorm(self):             # <<<<<<<<<<<<<<
 *         if self.outNormModel is not None:
 *             return self.outNormModel.data
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_99outputnorm, 0, __pyx_n_s_Driver_outputnorm, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__347)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputnorm, __pyx_t_9) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1518
 *         else:
 *             return [[1.0,0.0] for _ in range(self.outputCount)]
 *     @outputnorm.setter             # <<<<<<<<<<<<<<
 *     def outputnorm(self, value):
 *         self.outNormModel = Normalizer(data=value)
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_outputnorm);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_outputnorm);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":1519
 *             return [[1.0,0.0] for _ in range(self.outputCount)]
 *     @outputnorm.setter
 *     def outputnorm(self, value):             # <<<<<<<<<<<<<<
 *         self.outNormModel = Normalizer(data=value)
 *     outputNorm = outputnorm
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_101outputnorm, 0, __pyx_n_s_Driver_outputnorm, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__349)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputnorm, __pyx_t_9) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1521
 *     def outputnorm(self, value):
 *         self.outNormModel = Normalizer(data=value)
 *     outputNorm = outputnorm             # <<<<<<<<<<<<<<
 * 
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver
 */
  __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_outputnorm);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_outputnorm);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_outputNorm, __pyx_t_9) < 0) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1523
 *     outputNorm = outputnorm
 * 
 *     def normalizeModel(self, inputnormindex=1, outputnormindex=1, scale=1, shift=0):  # Driver             # <<<<<<<<<<<<<<
 *         self._UnNormalizeModel()
 *         if not (inputnormindex or outputnormindex):
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_103normalizeModel, 0, __pyx_n_s_Driver_normalizeModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__351)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__352);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_normalizeModel, __pyx_t_9) < 0) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1580
 *                     self._outputArray[:, ind] = (self._dataArray[:, ni+ind] - self._met[ni+ind, 1]) / self._met[ni+ind, 0]
 * 
 *     def _getComputeCondition(self, computelevel, outResult):  # Driver             # <<<<<<<<<<<<<<
 *         if outResult is not None:
 *             self._outResult = outResult
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_105_getComputeCondition, 0, __pyx_n_s_Driver__getComputeCondition, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__354)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getComputeCondition, __pyx_t_9) < 0) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1598
 *         return computelevel
 * 
 *     def getResults(self, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsultats"""
 *         res = self._outResult
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_107getResults, 0, __pyx_n_s_Driver_getResults, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__356)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__357);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getResults, __pyx_t_9) < 0) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1606
 *         return res
 * 
 *     def getResiduals(self, donorm=True, deltares=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des rsidus"""
 *         res = self.costFunction.derive(self._outResult, self._outputArray)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_109getResiduals, 0, __pyx_n_s_Driver_getResiduals, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__360);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getResiduals, __pyx_t_9) < 0) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1615
 *         return res + deltares  # averifier ici
 * 
 *     def getCost(self, donorm=True, doSum=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture des cots"""
 *         res = self.costFunction(self._outResult, self._outputArray)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_111getCost, 0, __pyx_n_s_Driver_getCost, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__362)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__363);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getCost, __pyx_t_9) < 0) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1631
 *         return squeeze(res)
 * 
 *     def getPRESS(self, params=None, leverages=None, donorm=False, root=False):  # Driver             # <<<<<<<<<<<<<<
 *         if leverages is None:
 *             jacob = self.getjacobian(params)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_113getPRESS, 0, __pyx_n_s_Driver_getPRESS, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__365)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__366);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getPRESS, __pyx_t_9) < 0) __PYX_ERR(0, 1631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1646
 *         return cumul
 * 
 *     def computeTrainingResults(self, curw=None, restable=None, outputs=None, jacobians=None, actualepochs=-1):  # Driver             # <<<<<<<<<<<<<<
 *         return self.computeTrainingResultsOld(curw, restable, outputs, jacobians, actualepochs)
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_115computeTrainingResults, 0, __pyx_n_s_Driver_computeTrainingResults, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__368)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__369);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainingResults, __pyx_t_9) < 0) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1658
 *     #        return np .copy(self._jacobians[index, :, :])
 * 
 *     def getPrime(self, index=-1, doSum=True, cost=True, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Lecture du jacobien ou du gradient du modle ou de la fonction de cot.
 *         Si cost est True, retourne le rsultat relatif  la fonction de cot,
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_117getPrime, 0, __pyx_n_s_Driver_getPrime, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__371)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__372);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getPrime, __pyx_t_9) < 0) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1690
 *         return res
 * 
 *     def computeTrainDataProgressive(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *     # Methode ancienne, hrite de Delphi.
 *     # A conserver pour faire des mesures de performance et des validations de resultats
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_119computeTrainDataProgressive, 0, __pyx_n_s_Driver_computeTrainDataProgressi, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults4), 1)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ID_COMPUTE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_9)->__pyx_arg_computelevel = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_16__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainDataProgressive, __pyx_t_9) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1719
 *         return self._outResult
 * 
 *     def computeTrainDataDirect(self, computelevel=C.ID_COMPUTE, outResult=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle)par la mthode directe.
 * Doit tre utilise pour les modles dynamiques
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_121computeTrainDataDirect, 0, __pyx_n_s_Driver_computeTrainDataDirect, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults5), 1)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ID_COMPUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_t_9)->__pyx_arg_computelevel = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_18__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainDataDirect, __pyx_t_9) < 0) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1746
 *         return self._outResult
 * 
 *     def computeTrainData(self, computelevel=C.ID_COMPUTE, outResult=None):   # Driver             # <<<<<<<<<<<<<<
 *         """Calcul des Jacobiens, Gradients et Hessiens (un par sortie du modle).
 * La mthode utilise est la propagation-retropropagation (mthode dite classique),
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_123computeTrainData, 0, __pyx_n_s_Driver_computeTrainData, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__378)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults6), 1)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ID_COMPUTE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_t_9)->__pyx_arg_computelevel = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_20__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_computeTrainData, __pyx_t_9) < 0) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1779
 * #========================= debut des interfaces pour optimisation ==============
 * 
 *     def backupParamsNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         self._backupParams = array(self.mainModel.weights)
 *         return self.mainModel.synapseCount
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_125backupParamsNT, 0, __pyx_n_s_Driver_backupParamsNT, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__380)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_backupParamsNT, __pyx_t_9) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1783
 *         return self.mainModel.synapseCount
 * 
 *     def restoreParamsNT(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         if weights is not None:
 *             weights = self._backupParams + squeeze(asarray(weights))
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_127restoreParamsNT, 0, __pyx_n_s_Driver_restoreParamsNT, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__382)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__383);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_restoreParamsNT, __pyx_t_9) < 0) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1790
 *         self.mainModel.loadParameters(weights)
 * 
 *     def costgradientNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         cost, grad = self.costAndPrime()
 *         return cost, grad, None
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_129costgradientNT, 0, __pyx_n_s_Driver_costgradientNT, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__385)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_costgradientNT, __pyx_t_9) < 0) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1794
 *         return cost, grad, None
 * 
 *     def costNT(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.cost()
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_131costNT, 0, __pyx_n_s_Driver_costNT, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__387)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_costNT, __pyx_t_9) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1797
 *         return self.cost()
 * 
 *     def cost(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage.
 *         ce cot inclut l'effet de la fonction d'erreur de sortie"""
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_133cost, 0, __pyx_n_s_Driver_cost, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__389)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__390);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_cost, __pyx_t_9) < 0) __PYX_ERR(0, 1797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1818
 *         return outCost
 * 
 *     def costAndPrime(self, weights=None, mode="integrated", mean=False, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le cot moyen d'apprentissage et le gradient de
 *         cette fonction par rapport aux paramtres.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_135costAndPrime, 0, __pyx_n_s_Driver_costAndPrime, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__392)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__393);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_costAndPrime, __pyx_t_9) < 0) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1842
 *         return cost, grad
 * 
 *     def prime(self, weights=None, donorm=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcule et retourne le gradient de la fonction de cot par rapport aux paramtres.
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_137prime, 0, __pyx_n_s_Driver_prime, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__395)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__396);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_prime, __pyx_t_9) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1855
 *         return self.getPrime(donorm=donorm)
 * 
 *     def residuals(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus normaliss du modle.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_139residuals, 0, __pyx_n_s_Driver_residuals, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__398)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__399);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_residuals, __pyx_t_9) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1868
 *         return squeeze(res)
 * 
 *     def residualsPrime(self, weights=None):  # Driver             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien normalis du modle.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_141residualsPrime, 0, __pyx_n_s_Driver_residualsPrime, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__401)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__402);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_residualsPrime, __pyx_t_9) < 0) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1899
 *         return sum(self._jacobians, axis = 0)
 * 
 *     def residuals2(self, weights=None, target=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les rsidus du modle.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_143residuals2, 0, __pyx_n_s_Driver_residuals2, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__404)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__405);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_residuals2, __pyx_t_9) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1919
 *         return res2
 * 
 *     def Jacobian2long(self, weights=None):  # Driver  #, inputs=None, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne les sorties et le jacobien du modle.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_145Jacobian2long, 0, __pyx_n_s_Driver_Jacobian2long, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__407)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__408);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Jacobian2long, __pyx_t_9) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1932
 *         return self._outputs, self._jacobians
 * 
 *     def Jacobian2(self, weights=None, target=None):  # Driver  #, inputs=Nonee, model=None             # <<<<<<<<<<<<<<
 *         """Mise en forme pour les routines d'optimisation.
 *         Calcule et retourne le jacobien du modle, multipli par les rsidus.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_147Jacobian2, 0, __pyx_n_s_Driver_Jacobian2, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__410)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__411);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Jacobian2, __pyx_t_9) < 0) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1945
 *         #return jacob
 * 
 *     def cost2(self, weights=None, target=None):  # Driver  #, model=None, inputs=None             # <<<<<<<<<<<<<<
 *         res = self.residuals2(weights, target)
 *         return npsum(res**2)/2
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_149cost2, 0, __pyx_n_s_Driver_cost2, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__413)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__414);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_cost2, __pyx_t_9) < 0) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1949
 *         return npsum(res**2)/2
 * 
 *     def prime2(self, weights=None, target=None):  # Driver  #model=None, inputs=None,             # <<<<<<<<<<<<<<
 *         outputs, jacob = self.Jacobian2long(weights)
 *         #residuals = outputs - target
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_151prime2, 0, __pyx_n_s_Driver_prime2, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__416)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__417);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_prime2, __pyx_t_9) < 0) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1958
 * 
 *     #
 *     def setLeverageComputation(self, level=0.95, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_153setLeverageComputation, 0, __pyx_n_s_Driver_setLeverageComputation, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__419)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__420);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setLeverageComputation, __pyx_t_9) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1975
 *         return
 * 
 *     def setLeverageComputationOld(self, level=None, doit=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul de la matrice de dispersion, et des leviers
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_155setLeverageComputationOld, 0, __pyx_n_s_Driver_setLeverageComputationOld, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__422)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__423);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setLeverageComputationOld, __pyx_t_9) < 0) __PYX_ERR(0, 1975, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1988
 *         return
 * 
 *     def isParallel(self):  # Driver             # <<<<<<<<<<<<<<
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_157isParallel, 0, __pyx_n_s_Driver_isParallel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__425)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_isParallel, __pyx_t_9) < 0) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":1991
 *         return isinstance(self.mainModel, Multimodel) and self.mainModel.isParallel
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,             # <<<<<<<<<<<<<<
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver
 *         if maxiter <= 0:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_159multitrain, 0, __pyx_n_s_Driver_multitrain, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__427)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults7), 1)) __PYX_ERR(0, 1991, __pyx_L1_error)

  /* "metaphor/monal/driver/_driver.py":1992
 * 
 *     def multitrain(self, initcount=1, maxiter=0, algo="LM", initweights=None,
 *                    seed=-1, callback=None, criterion=C.TCR_COST, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         if maxiter <= 0:
 *             maxiter = 100*(1 + self.mainModel.dimension)
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_TCR_COST); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_t_9)->__pyx_arg_criterion = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_22__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_multitrain, __pyx_t_9) < 0) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2051
 *         return bests
 * 
 *     def train(self, startWeights=None, maxiter=100, algo="LM_NT", verbose=0,             # <<<<<<<<<<<<<<
 *             callback=None, **kwds):  # Driver
 *         """Lancement d'un apprentissage.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_161train, 0, __pyx_n_s_Driver_train, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__429)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__430);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_train, __pyx_t_9) < 0) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2165
 * #        return res[0], res[1]/self.dataCount, res[2]
 * 
 *     def gradientCompute(self, inputs = None, outindex = 0):  # Driver             # <<<<<<<<<<<<<<
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_163gradientCompute, 0, __pyx_n_s_Driver_gradientCompute, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__432)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__433);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_gradientCompute, __pyx_t_9) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2168
 *         return self.mainModel.gradientCompute(inputs, outindex)
 * 
 *     def directInputGradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul du gradient du modle complet par rapport aux entres par la mthode directe
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_165directInputGradient, 0, __pyx_n_s_Driver_directInputGradient, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__435)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_directInputGradient, __pyx_t_9) < 0) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2180
 *         return res
 * 
 *     def transferAndDirectGradient(self, inputs, gradient=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Calcul simultan du transfert  travers le modle complet, et du gradient du
 *         modle complet par rapport aux paramtres par la mthode directe.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_167transferAndDirectGradient, 0, __pyx_n_s_Driver_transferAndDirectGradient, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__437)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__438);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferAndDirectGradient, __pyx_t_9) < 0) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2195
 *         return outputs, gradient
 * 
 *     def _expandvec(self, vec, inivec, fixed):             # <<<<<<<<<<<<<<
 *         index = 0
 *         target = []
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_169_expandvec, 0, __pyx_n_s_Driver__expandvec, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__440)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_expandvec, __pyx_t_9) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2207
 *         return asarray(target)
 * 
 *     def _reducevec(self, vec, fixed):             # <<<<<<<<<<<<<<
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_171_reducevec, 0, __pyx_n_s_Driver__reducevec, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__442)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_reducevec, __pyx_t_9) < 0) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2210
 *         return asarray([val for test, val in zip(fixed, vec) if not test])
 * 
 *     def inputTrainCost(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         res = self.inputTrainFunc(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 *         return npsum(res**2)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_173inputTrainCost, 0, __pyx_n_s_Driver_inputTrainCost, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__444)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputTrainCost, __pyx_t_9) < 0) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2214
 *         return npsum(res**2)
 * 
 *     def inputTrainFunc(self, inputsloc, inputini, fixedinputs, outputtarget, modelindex):             # <<<<<<<<<<<<<<
 *         """Cost function for input reverse computation
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_175inputTrainFunc, 0, __pyx_n_s_Driver_inputTrainFunc, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__446)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputTrainFunc, __pyx_t_9) < 0) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2228
 *         return asarray([result - outputtarget])
 * 
 *     def inputTrainGrad(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         jacob, residual = self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_177inputTrainGrad, 0, __pyx_n_s_Driver_inputTrainGrad, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__448)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputTrainGrad, __pyx_t_9) < 0) __PYX_ERR(0, 2228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2233
 *         return npsum(jacob, axis=0) * residual
 * 
 *     def inputTrainPrime(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_179inputTrainPrime, 0, __pyx_n_s_Driver_inputTrainPrime, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__450)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputTrainPrime, __pyx_t_9) < 0) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2239
 *         return self.inputTrainPrimeFull(inputsloc, inputini, fixedinputs, outputtarget, modelindex)[0]
 * 
 *     def inputTrainPrimeFull(self, inputsloc, inputini, fixedinputs,             # <<<<<<<<<<<<<<
 *         outputtarget, modelindex):
 *         """Prime function for input reverse computation
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_181inputTrainPrimeFull, 0, __pyx_n_s_Driver_inputTrainPrimeFull, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__452)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inputTrainPrimeFull, __pyx_t_9) < 0) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2262
 *         return asarray([trueGradList]), residual
 * 
 *     def reverse_train(self, outputtarget, inputs=None, fixedinputs=None,             # <<<<<<<<<<<<<<
 *         epochs=None, modelindex=-1, callback=None, debug=0, verbose=0):
 *         """Obtain the result of model reverse transfer.
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_183reverse_train, 0, __pyx_n_s_Driver_reverse_train, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__454)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__455);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_reverse_train, __pyx_t_9) < 0) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2319
 *         return newinputs, code
 * 
 *     def transferExtra(self, inputs=None, style=C.TFR_STD, donorm=True,             # <<<<<<<<<<<<<<
 *             modelindex=-1):  #original=True,
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_185transferExtra, 0, __pyx_n_s_Driver_transferExtra, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__457)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults8), 1)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_t_9)->__pyx_arg_style = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_24__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferExtra, __pyx_t_9) < 0) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2374
 *             return outputs, grads, ingrads
 * 
 *     def transferExtraCI(self, inputs=None, donorm=True):  #original=True,             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_187transferExtraCI, 0, __pyx_n_s_Driver_transferExtraCI, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__459)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__460);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferExtraCI, __pyx_t_9) < 0) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2397
 * # new KO ->OK avec suppression de donorm, et modif de  transferLeverages
 * 
 *     def transferEx(self, inputs=None, withCI=0, modelindex=-1): # Driver  , original=True             # <<<<<<<<<<<<<<
 *         if (self.weights is not None) and (len(self.weights) > self.paramCount):
 *             self.mainModel.weights = self.weights
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_189transferEx, 0, __pyx_n_s_Driver_transferEx, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__462)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__463);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferEx, __pyx_t_9) < 0) __PYX_ERR(0, 2397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2448
 *         return outs, CIp, CIm, levs
 * 
 *     def transferLeverages(self, inputs=None, weights=None, disp=None, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modele, avec calcul des leviers.
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_191transferLeverages, 0, __pyx_n_s_Driver_transferLeverages, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__465)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__466);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferLeverages, __pyx_t_9) < 0) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2500
 *         return outputs, outlev
 * 
 *     def transferCI(self, inputs, donorm=True, withlev=False):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         """
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_193transferCI, 0, __pyx_n_s_Driver_transferCI, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__468)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__469);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferCI, __pyx_t_9) < 0) __PYX_ERR(0, 2500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2539
 * 
 * 
 *     def transferCIOld(self, inputs, donorm=True):  # Driver             # <<<<<<<<<<<<<<
 *         """Transfert par le modle, avec calcul des intervalles de confiance.
 *         obsolete
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_195transferCIOld, 0, __pyx_n_s_Driver_transferCIOld, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__471)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__472);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transferCIOld, __pyx_t_9) < 0) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2575
 *         return outputs, outputsicp, outputsicm
 * 
 *     def transfer(self, inputs=None, style=C.TFR_STD, donorm=False, **kwds):  # Driver             # <<<<<<<<<<<<<<
 *         gradient = None
 *         gradientInput = None
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_197transfer, 0, __pyx_n_s_Driver_transfer, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__474)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults9), 1)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_TFR_STD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_t_9)->__pyx_arg_style = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_26__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_transfer, __pyx_t_9) < 0) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2603
 *         return output, gradient, gradientInput
 * 
 *     def normalizeInputs(self, inputs, norminputgrad=False, reverse=False):  # Driver             # <<<<<<<<<<<<<<
 *         if inputs is None:
 *             return None
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_199normalizeInputs, 0, __pyx_n_s_Driver_normalizeInputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__476)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__477);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_normalizeInputs, __pyx_t_9) < 0) __PYX_ERR(0, 2603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2621
 * 
 * 
 *     def unnormalizeOutputs(self, outputs, normgrad=False, reverse=False):   # Driver             # <<<<<<<<<<<<<<
 *         if isinstance(outputs, list):
 *             return [self.unnormalizeOutputs(val, normgrad, reverse) for val in outputs]
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_201unnormalizeOutputs, 0, __pyx_n_s_Driver_unnormalizeOutputs, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__479)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__480);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_unnormalizeOutputs, __pyx_t_9) < 0) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2642
 *         return outputs
 * 
 *     def backupParams(self):  # Driver             # <<<<<<<<<<<<<<
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_203backupParams, 0, __pyx_n_s_Driver_backupParams, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__482)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_backupParams_2, __pyx_t_9) < 0) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2645
 *         self.backupParams = self.maimModel.getParamsStr()
 * 
 *     def restoreParams(self, values=None, decal=0):  # Driver             # <<<<<<<<<<<<<<
 *         if values is not None:
 *             self.mainModel.loadParameters(self.backupParams + asarray(values))
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_205restoreParams, 0, __pyx_n_s_Driver_restoreParams, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__484)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__485);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_restoreParams, __pyx_t_9) < 0) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2651
 *             self.mainModel.loadParameters(self.backupParams)
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def dimension(self):  # Driver
 *         """Nombre de variables du vecteur de paramtres"""
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2652
 * 
 *     @Property
 *     def dimension(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de variables du vecteur de paramtres"""
 *         return self.mainModel.dimension
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_207dimension, 0, __pyx_n_s_Driver_dimension, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__487)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2651, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2651, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2651, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dimension, __pyx_t_9) < 0) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2656
 *         return self.mainModel.dimension
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def indexInitialState(self):  # Driver
 *         """Index des variables d'initialisation d'tat"""
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2657
 * 
 *     @Property
 *     def indexInitialState(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Index des variables d'initialisation d'tat"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + self.mainModel.order
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_209indexInitialState, 0, __pyx_n_s_Driver_indexInitialState, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__489)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2656, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2656, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2656, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_indexInitialState, __pyx_t_9) < 0) __PYX_ERR(0, 2657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2661
 *         return self.mainModel.inputCount + self.mainModel.outputCount + self.mainModel.order
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def dataWidth(self):
 *         """Largeur des donnes"""
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2662
 * 
 *     @Property
 *     def dataWidth(self):             # <<<<<<<<<<<<<<
 *         """Largeur des donnes"""
 *         return self.mainModel.inputCount + self.mainModel.outputCount + 2*self.mainModel.order
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_211dataWidth, 0, __pyx_n_s_Driver_dataWidth, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__491)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2661, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2661, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2661, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dataWidth, __pyx_t_9) < 0) __PYX_ERR(0, 2662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2666
 *         return self.mainModel.inputCount + self.mainModel.outputCount + 2*self.mainModel.order
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def gradient(self):  # Driver
 *         """Vecteur gradient de l'apprentissage"""
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2667
 * 
 *     @Property
 *     def gradient(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Vecteur gradient de l'apprentissage"""
 *         if self._gradient is None:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_213gradient, 0, __pyx_n_s_Driver_gradient, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__493)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2666, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2666, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2666, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_gradient, __pyx_t_9) < 0) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2673
 *         return self._gradient
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def hessian(self):  # Driver
 *         """Matrice hessienne"""
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2674
 * 
 *     @Property
 *     def hessian(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Matrice hessienne"""
 *         if self._hessian is None:
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_215hessian, 0, __pyx_n_s_Driver_hessian, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__495)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2673, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2673, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2673, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hessian_2, __pyx_t_9) < 0) __PYX_ERR(0, 2674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2680
 *         return self._hessian
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def chrono(self):  # Driver
 *         rr = self._chrono
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2681
 * 
 *     @Property
 *     def chrono(self):  # Driver             # <<<<<<<<<<<<<<
 *         rr = self._chrono
 *         self._chrono = 0
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_217chrono, 0, __pyx_n_s_Driver_chrono, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__497)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2680, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2680, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2680, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_chrono_2, __pyx_t_9) < 0) __PYX_ERR(0, 2681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2686
 *         return rr
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def dataCount(self):  # Driver
 *         if self.isParallel():
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "metaphor/monal/driver/_driver.py":2687
 * 
 *     @Property
 *     def dataCount(self):  # Driver             # <<<<<<<<<<<<<<
 *         if self.isParallel():
 *             return self.mainModel.modelCount
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_219dataCount, 0, __pyx_n_s_Driver_dataCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__499)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2686, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2686, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2686, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dataCount, __pyx_t_9) < 0) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2693
 *             return self._dataArray.shape[0]
 *         return 0
 *     @dataCount.setter             # <<<<<<<<<<<<<<
 *     def sdataCount(self, value):  # Driver
 *         """Nombre de donnes d'apprentissage"""
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_dataCount);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_dataCount);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2694
 *         return 0
 *     @dataCount.setter
 *     def sdataCount(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         """Nombre de donnes d'apprentissage"""
 *         if self.isParallel():
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_221sdataCount, 0, __pyx_n_s_Driver_sdataCount, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__501)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2693, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2693, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2693, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sdataCount, __pyx_t_9) < 0) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2704
 *                 self._dataArray = None
 * 
 *     def _xmlText(self, decal):  # Driver             # <<<<<<<<<<<<<<
 *         attr = '{0}="{1}"'.format(cst.st_xmlns_xsi, cst.st_XMLSchema)
 *         attr += ' {0}="{1}"'.format(cst.st_XMLSchemaLoc, cst.st_ModelURL)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_223_xmlText, 0, __pyx_n_s_Driver__xmlText, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__503)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_xmlText, __pyx_t_9) < 0) __PYX_ERR(0, 2704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2713
 *         return '\n'.join(out), attr
 * 
 *     def toFullXML(self):  # Driver             # <<<<<<<<<<<<<<
 *         out = [cst.st_XMLHeader % (cst.st_XMLVersion, cst.st_XMLEncoding),
 *                cst.st_XMLStyleSheet, self.xml()]
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_225toFullXML, 0, __pyx_n_s_Driver_toFullXML, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__505)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_toFullXML, __pyx_t_9) < 0) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2718
 *         return '\n'.join(out)
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def NMLstring(self):  # Driver
 *         return self.toFullXML()
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "metaphor/monal/driver/_driver.py":2719
 * 
 *     @Property
 *     def NMLstring(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.toFullXML()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_227NMLstring, 0, __pyx_n_s_Driver_NMLstring, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__507)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2718, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2718, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2718, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NMLstring, __pyx_t_9) < 0) __PYX_ERR(0, 2719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2722
 *         return self.toFullXML()
 * 
 *     def saveModel(self, filename="", savingformat=C.SF_XML, trainable=True,             # <<<<<<<<<<<<<<
 *             savedir=None, tempdir=None, package="", modeltemplate="m%d_",
 *             keeptemp=0, verbose=0, compiler="", forcelib=False,
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_229saveModel, 0, __pyx_n_s_Driver_saveModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__509)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults10), 1)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_t_9)->__pyx_arg_savingformat = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_8metaphor_5monal_6driver_7_driver_28__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_saveModel, __pyx_t_9) < 0) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2937
 *     # end saveModel
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def trainingData(self, index):  # Driver
 *         """Donnees d'apprentissage.
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/monal/driver/_driver.py":2938
 * 
 *     @Property
 *     def trainingData(self, index):  # Driver             # <<<<<<<<<<<<<<
 *         """Donnees d'apprentissage.
 * Proprietes:
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_231trainingData, 0, __pyx_n_s_Driver_trainingData, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__511)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2937, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2937, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2937, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_trainingData, __pyx_t_9) < 0) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2949
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         return self._dataArray[index, :]
 *     @trainingData.setter             # <<<<<<<<<<<<<<
 *     def strainingData(self, index, values):  # Driver
 *         if not (0 <= index < self.dataCount):
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_trainingData);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_trainingData);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/monal/driver/_driver.py":2950
 *         return self._dataArray[index, :]
 *     @trainingData.setter
 *     def strainingData(self, index, values):  # Driver             # <<<<<<<<<<<<<<
 *         if not (0 <= index < self.dataCount):
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_233strainingData, 0, __pyx_n_s_Driver_strainingData, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__513)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2949, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2949, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2949, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_strainingData, __pyx_t_9) < 0) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2954
 *             raise tb.IndexValueError(index, (cst.st_IndexErrorWithLimits % (0, index, self.dataCount)))
 *         self._dataArray[index, :] = values
 *     @trainingData.lengetter             # <<<<<<<<<<<<<<
 *     def ltrainingData(self):  # Driver
 *         return self.dataCount
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_trainingData);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_trainingData);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lengetter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":2955
 *         self._dataArray[index, :] = values
 *     @trainingData.lengetter
 *     def ltrainingData(self):  # Driver             # <<<<<<<<<<<<<<
 *         return self.dataCount
 *     @trainingData.lensetter
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_235ltrainingData, 0, __pyx_n_s_Driver_ltrainingData, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__515)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ltrainingData, __pyx_t_9) < 0) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2957
 *     def ltrainingData(self):  # Driver
 *         return self.dataCount
 *     @trainingData.lensetter             # <<<<<<<<<<<<<<
 *     def sltrainingData(self, value):  # Driver
 *         self.dataCount = value
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_trainingData);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_trainingData);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_lensetter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "metaphor/monal/driver/_driver.py":2958
 *         return self.dataCount
 *     @trainingData.lensetter
 *     def sltrainingData(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.dataCount = value
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_237sltrainingData, 0, __pyx_n_s_Driver_sltrainingData, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__517)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2957, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2957, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2957, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sltrainingData, __pyx_t_9) < 0) __PYX_ERR(0, 2958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2961
 *         self.dataCount = value
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def confidenceLevel(self):  # Driver
 *         """Niveau de confiance"""
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "metaphor/monal/driver/_driver.py":2962
 * 
 *     @Property
 *     def confidenceLevel(self):  # Driver             # <<<<<<<<<<<<<<
 *         """Niveau de confiance"""
 *         return self._confidencelevel
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_239confidenceLevel, 0, __pyx_n_s_Driver_confidenceLevel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__519)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_confidenceLevel, __pyx_t_9) < 0) __PYX_ERR(0, 2962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":2965
 *         """Niveau de confiance"""
 *         return self._confidencelevel
 *     @confidenceLevel.setter             # <<<<<<<<<<<<<<
 *     def confidenceLevel(self, value):  # Driver
 *         try:
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_confidenceLevel);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_confidenceLevel);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/monal/driver/_driver.py":2966
 *         return self._confidencelevel
 *     @confidenceLevel.setter
 *     def confidenceLevel(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         try:
 *             from scipy import special
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_241confidenceLevel, 0, __pyx_n_s_Driver_confidenceLevel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__521)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2965, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_confidenceLevel, __pyx_t_9) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":3003
 * #         return res
 * 
 *     def addComment(self, value):  # Driver             # <<<<<<<<<<<<<<
 *         self.mainModel.addComment(value)
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_6Driver_243addComment, 0, __pyx_n_s_Driver_addComment, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__523)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_addComment, __pyx_t_9) < 0) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "metaphor/monal/driver/_driver.py":994
 * 
 * #------------------------------------------------------------------------------
 * @Properties(("saveDir"), False)             # <<<<<<<<<<<<<<
 * class Driver(DriverBase):
 *     '''
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Properties); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__524, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/monal/driver/_driver.py":995
 * #------------------------------------------------------------------------------
 * @Properties(("saveDir"), False)
 * class Driver(DriverBase):             # <<<<<<<<<<<<<<
 *     '''
 *     Pilote d'apprentissage de modle
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Driver, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Driver, __pyx_t_9) < 0) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":3006
 *         self.mainModel.addComment(value)
 * 
 * def saveModel(source, filename, savingformat=C.SF_XML, count=0, savedir=None,             # <<<<<<<<<<<<<<
 *                   tempdir=None, package="models", keeptemp=0, compiler=""):   # _driver
 *     if isinstance(source, Driver):
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_5monal_6driver_7_driver_7saveModel, 0, __pyx_n_s_saveModel, NULL, __pyx_n_s_metaphor_monal_driver__driver, __pyx_d, ((PyObject *)__pyx_codeobj__526)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults11), 1)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SF_XML); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_t_4)->__pyx_arg_savingformat = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_8metaphor_5monal_6driver_7_driver_30__defaults__);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_saveModel, __pyx_t_4) < 0) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/monal/driver/_driver.py":3022
 *                 compiler=compiler) #keeptemp = CC.KT_BEFORE,
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     #import time
 *     #===========================================================================
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "metaphor/monal/driver/_driver.py":3202
 *     #===========================================================================
 * 
 *     print("done")             # <<<<<<<<<<<<<<
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__527, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/monal/driver/_driver.py":3022
 *                 compiler=compiler) #keeptemp = CC.KT_BEFORE,
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     #import time
 *     #===========================================================================
 */
  }

  /* "metaphor/monal/driver/_driver.py":1
 * #-*- coding: UTF-8 -*-             # <<<<<<<<<<<<<<
 * #===============================================================================
 * # $Id: _driver.py 4793 2018-09-13 11:27:59Z jeanluc $
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init metaphor.monal.driver._driver", 0, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init metaphor.monal.driver._driver");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* GetModuleGlobalName */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    if (likely(result)) {
        Py_INCREF(result);
    } else if (unlikely(PyErr_Occurred())) {
        result = NULL;
    } else {
#else
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* PyObjectSetAttrStr */
    #if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* PyCFunctionFastCall */
    #if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
    #if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = f->f_localsplus;
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCallMethO */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
    #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyObjectCallMethod1 */
      static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = NULL;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyCFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            args = PyTuple_New(2);
            if (unlikely(!args)) goto done;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
    goto done;
done:
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) return NULL;
    result = __Pyx__PyObject_CallMethod1(method, arg);
    Py_DECREF(method);
    return result;
}

/* append */
      static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* SaveResetException */
      #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if PY_VERSION_HEX >= 0x030700A3
    *type = tstate->exc_state.exc_type;
    *value = tstate->exc_state.exc_value;
    *tb = tstate->exc_state.exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A3
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = type;
    tstate->exc_state.exc_value = value;
    tstate->exc_state.exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
      #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
#endif
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if PY_VERSION_HEX >= 0x030700A3
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = local_type;
    tstate->exc_state.exc_value = local_value;
    tstate->exc_state.exc_traceback = local_tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyIntBinop */
        #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* GetAttr */
        static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
        static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyErrFetchRestore */
        #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* GetItemInt */
        static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* DictGetItem */
        #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* BytesEquals */
        static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
        static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* PyObjectCallMethod0 */
        static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
        static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
        static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
        static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
        static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* PyIntBinop */
        #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) {
            Py_RETURN_TRUE;
        } else {
            Py_RETURN_FALSE;
        }
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            if ((double)a == (double)b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    return PyObject_RichCompare(op1, op2, Py_EQ);
}
#endif

/* None */
        static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyErrExceptionMatches */
        #if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* ObjectGetItem */
        #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* SliceObject */
        static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* SetItemInt */
        static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            if (8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) {
                return PyFloat_FromDouble((double)a / (double)b);
            }
            return PyInt_Type.tp_as_number->nb_true_divide(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            }
        }
                if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53)))
                    || __Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) {
                    return PyFloat_FromDouble((double)a / (double)b);
                }
                return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            return PyLong_FromLong(x);
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("divide", return NULL)
            result = ((double)a) / (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
}
#endif

/* RaiseException */
          #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* FastTypeChecks */
          #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            return PyInt_FromLong(a & b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_and(op1, op2);
            }
        }
                x = a & b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla & llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
}
#endif

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* FetchCommonType */
          static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
          #include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* Import */
              static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
              static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* UnpackUnboundCMethod */
              static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
    }
#endif
    return 0;
}

/* CallUnboundCMethod2 */
              #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* SwapException */
              #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A3
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = *type;
    tstate->exc_state.exc_value = *value;
    tstate->exc_state.exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* CalculateMetaclass */
              static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
              static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback */
              #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
      use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (PyObject_Not(use_cline) != 0) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
              static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
              #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
              #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
              static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CheckBinaryVersion */
              static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
              static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
